Make UI language, timestamps and live feedback consistent
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { T5_ZOMBIE_MAPS, T6_ZOMBIE_MAPS } from './map-aliases.js';
|
||||
import { gameTitle } from './ui/server-labels.js';
|
||||
|
||||
export interface LibraryVersion {
|
||||
id: number; version: number; sha256: string; size: number;
|
||||
@@ -30,7 +31,7 @@ export function mapLabel(canonical: string): string {
|
||||
return matches.length > 1 ? `${matches[0].friendly} + ${matches.length - 1} variants` : matches[0]?.friendly ?? canonical;
|
||||
}
|
||||
export function scopeLabel(s: Pick<LibraryScript, 'scope_type' | 'scope_value'>): string {
|
||||
return s.scope_type === 'game' ? (s.scope_value ?? '').toUpperCase()
|
||||
return s.scope_type === 'game' ? gameTitle(s.scope_value)
|
||||
: s.scope_type === 'map' ? mapLabel(s.scope_value ?? '') : 'Unscoped';
|
||||
}
|
||||
export interface BetaSelection { scriptId: number; versionId: number; }
|
||||
|
||||
Reference in New Issue
Block a user