Skip to content

Commit 9fb5a6d

Browse files
authored
Merge pull request element-hq#13460 from vector-im/jryans/stylise-macos
Tweak default device name on macOS
2 parents 678f419 + ab40d5b commit 9fb5a6d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/vector/platform/WebPlatform.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/*
44
Copyright 2016 Aviral Dasgupta
55
Copyright 2016 OpenMarket Ltd
6+
Copyright 2017-2020 New Vector Ltd
67
78
Licensed under the Apache License, Version 2.0 (the "License");
89
you may not use this file except in compliance with the License.
@@ -186,7 +187,9 @@ export default class WebPlatform extends VectorBasePlatform {
186187

187188
const ua = new UAParser();
188189
const browserName = ua.getBrowser().name || "unknown browser";
189-
const osName = ua.getOS().name || "unknown os";
190+
let osName = ua.getOS().name || "unknown OS";
191+
// Stylise the value from the parser to match Apple's current branding.
192+
if (osName === "Mac OS") osName = "macOS";
190193
return _t('%(appName)s via %(browserName)s on %(osName)s', {appName: appName, browserName: browserName, osName: osName});
191194
}
192195

0 commit comments

Comments
 (0)