Merge pull request #8241 from vector-im/dbkr/fix_platform_name
Fix device names on desktop
This commit is contained in:
commit
0022834af4
1 changed files with 6 additions and 6 deletions
|
@ -28,17 +28,17 @@ const ipcRenderer = window.ipcRenderer;
|
||||||
|
|
||||||
function platformFriendlyName(): string {
|
function platformFriendlyName(): string {
|
||||||
// used to use window.process but the same info is available here
|
// used to use window.process but the same info is available here
|
||||||
if (navigator.userAgent.indexOf('Macintosh')) {
|
if (navigator.userAgent.includes('Macintosh')) {
|
||||||
return 'macOS';
|
return 'macOS';
|
||||||
} else if (navigator.userAgent.indexOf('FreeBSD')) {
|
} else if (navigator.userAgent.includes('FreeBSD')) {
|
||||||
return 'FreeBSD';
|
return 'FreeBSD';
|
||||||
} else if (navigator.userAgent.indexOf('OpenBSD')) {
|
} else if (navigator.userAgent.includes('OpenBSD')) {
|
||||||
return 'OpenBSD';
|
return 'OpenBSD';
|
||||||
} else if (navigator.userAgent.indexOf('SunOS')) {
|
} else if (navigator.userAgent.includes('SunOS')) {
|
||||||
return 'SunOS';
|
return 'SunOS';
|
||||||
} else if (navigator.userAgent.indexOf('Windows')) {
|
} else if (navigator.userAgent.includes('Windows')) {
|
||||||
return 'Windows';
|
return 'Windows';
|
||||||
} else if (navigator.userAgent.indexOf('Linux')) {
|
} else if (navigator.userAgent.includes('Linux')) {
|
||||||
return 'Linux';
|
return 'Linux';
|
||||||
} else {
|
} else {
|
||||||
return 'Unknown';
|
return 'Unknown';
|
||||||
|
|
Loading…
Reference in a new issue