Tweak default device name on macOS
This tweak's the OS name in the default device name for macOS devices to match Apple's current branding. Fixes https://github.com/vector-im/riot-web/issues/13459
This commit is contained in:
parent
678f419f01
commit
dec5ea1637
1 changed files with 3 additions and 1 deletions
|
@ -186,7 +186,9 @@ export default class WebPlatform extends VectorBasePlatform {
|
||||||
|
|
||||||
const ua = new UAParser();
|
const ua = new UAParser();
|
||||||
const browserName = ua.getBrowser().name || "unknown browser";
|
const browserName = ua.getBrowser().name || "unknown browser";
|
||||||
const osName = ua.getOS().name || "unknown os";
|
let osName = ua.getOS().name || "unknown OS";
|
||||||
|
// Stylise the value from the parser to match Apple's current branding.
|
||||||
|
if (osName === "Mac OS") osName = "macOS";
|
||||||
return _t('%(appName)s via %(browserName)s on %(osName)s', {appName: appName, browserName: browserName, osName: osName});
|
return _t('%(appName)s via %(browserName)s on %(osName)s', {appName: appName, browserName: browserName, osName: osName});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue