fix: show actual environment name for 'other' category
- Add rawEnvironment field to preserve extracted environment name - Display rawEnvironment (e.g., 'timeshift') instead of 'other' in badge Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ const fetcher = (url: string) => fetch(url).then((res) => res.json());
|
||||
interface Apk {
|
||||
name: string;
|
||||
environment: ApkEnvironment;
|
||||
rawEnvironment: string;
|
||||
commit: string | null;
|
||||
size: number;
|
||||
modifiedAt: string;
|
||||
|
||||
@@ -6,6 +6,7 @@ import { type ApkEnvironment } from '@/lib/apk-parser';
|
||||
interface Apk {
|
||||
name: string;
|
||||
environment: ApkEnvironment;
|
||||
rawEnvironment: string;
|
||||
commit: string | null;
|
||||
size: number;
|
||||
modifiedAt: string;
|
||||
@@ -28,10 +29,6 @@ function getEnvironmentBadgeClass(env: ApkEnvironment): string {
|
||||
}
|
||||
}
|
||||
|
||||
function formatEnvironment(env: ApkEnvironment): string {
|
||||
return env;
|
||||
}
|
||||
|
||||
export default function ApkTable({ apks }: ApkTableProps) {
|
||||
if (!apks || apks.length === 0) {
|
||||
return (
|
||||
@@ -69,7 +66,7 @@ export default function ApkTable({ apks }: ApkTableProps) {
|
||||
{apk.commit || '-'}
|
||||
</span>
|
||||
<span className={`px-2 py-0.5 text-xs font-medium rounded ${getEnvironmentBadgeClass(apk.environment)}`}>
|
||||
{formatEnvironment(apk.environment)}
|
||||
{apk.rawEnvironment}
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user