'use client'; import { formatFileSize, formatDateTime } from '@/lib/utils'; import { type ApkEnvironment } from '@/lib/apk-parser'; interface Apk { name: string; environment: ApkEnvironment; rawEnvironment: string; commit: string | null; size: number; modifiedAt: string; downloadUrl: string; } interface ApkTableProps { apks: Apk[]; } function getEnvironmentBadgeClass(env: ApkEnvironment): string { switch (env) { case 'product': return 'bg-blue-100 text-blue-800'; case 'dev': case 'sandbox': return 'bg-green-100 text-green-800'; default: return 'bg-gray-100 text-gray-800'; } } export default function ApkTable({ apks }: ApkTableProps) { if (!apks || apks.length === 0) { return (

暂无 APK 文件

); } return (
{apks.map((apk) => ( ))}
Commit ID 文件大小 创建时间 操作
{apk.commit || '-'} {apk.rawEnvironment}
{formatFileSize(apk.size)} {formatDateTime(new Date(apk.modifiedAt))} 下载
); }