feat: block launching profiles for incompatible systems

This commit is contained in:
zhom
2026-02-16 22:18:11 +04:00
parent d52493b7e4
commit af2aa36ac6
16 changed files with 309 additions and 13 deletions
+18
View File
@@ -48,3 +48,21 @@ export const getCurrentOS = () => {
}
return "unknown";
};
export function isCrossOsProfile(profile: { host_os?: string }): boolean {
if (!profile.host_os) return false;
return profile.host_os !== getCurrentOS();
}
export function getOSDisplayName(os: string): string {
switch (os) {
case "macos":
return "macOS";
case "windows":
return "Windows";
case "linux":
return "Linux";
default:
return os;
}
}