feat(platform): Update platform naming and add keywords and custom HTML fields

This commit is contained in:
web@ppanel
2025-02-22 23:35:30 +07:00
parent 557c5cdc29
commit 6384237782
4 changed files with 13 additions and 5 deletions
+2 -2
View File
@@ -56,13 +56,13 @@ export function Logout() {
}
}
export function getPlatform(): 'windows' | 'mac' | 'linux' | 'android' | 'ios' | 'harmony' {
export function getPlatform(): 'windows' | 'macos' | 'linux' | 'android' | 'ios' | 'harmony' {
const parser = new UAParser();
const os = parser.getOS();
const osName = os.name?.toLowerCase() || '';
if (osName.includes('windows')) return 'windows';
if (osName.includes('mac')) return 'mac';
if (osName.includes('mac')) return 'macos';
if (
osName.includes('linux') ||
osName.includes('ubuntu') ||