APK wrapper registers platform=android via AETHERFORGE_PLATFORM; fleet UI shows robot icons, Android Access Depth probes, and a shortened mining onion timeline.
25 lines
951 B
TypeScript
25 lines
951 B
TypeScript
/** Fleet-visible platform label and icon helpers (Crucible, Access Depth, ROI). */
|
|
|
|
export function isAndroidPlatform(platform?: string): boolean {
|
|
return (platform || '').toLowerCase().includes('android');
|
|
}
|
|
|
|
export function platformLabel(platform?: string): string {
|
|
const p = (platform || '').toLowerCase();
|
|
if (isAndroidPlatform(p)) return 'Android';
|
|
if (p.includes('darwin') || p.includes('mac')) return 'macOS';
|
|
if (p.includes('linux')) return 'Linux';
|
|
if (p.includes('win') || p === 'windows') return 'Windows';
|
|
return platform?.trim() || 'Unknown';
|
|
}
|
|
|
|
export function platformIcon(platform?: string): string {
|
|
if (!platform) return '⬡';
|
|
const p = platform.toLowerCase();
|
|
if (p.includes('android')) return '🤖';
|
|
if (p.includes('darwin') || p.includes('mac')) return '🍎';
|
|
if (p === 'windows' || p.includes('windows') || p.includes('win')) return '⊞';
|
|
if (p.includes('linux')) return '🐧';
|
|
return '⬡';
|
|
}
|