forked from matrix/element-web
Merge branch 'jryans/restore-device-name' into 'element'
Restore device name See merge request new-vector/element/element-web/element-web!11
This commit is contained in:
commit
4ec679aaed
|
@ -173,21 +173,18 @@ export default class WebPlatform extends VectorBasePlatform {
|
||||||
}
|
}
|
||||||
|
|
||||||
getDefaultDeviceDisplayName(): string {
|
getDefaultDeviceDisplayName(): string {
|
||||||
// TODO: Revert this after launch
|
// strip query-string and fragment from uri
|
||||||
// // strip query-string and fragment from uri
|
const u = url.parse(window.location.href);
|
||||||
// const u = url.parse(window.location.href);
|
u.protocol = "";
|
||||||
// u.protocol = "";
|
u.search = "";
|
||||||
// u.search = "";
|
u.hash = "";
|
||||||
// u.hash = "";
|
// Remove trailing slash if present
|
||||||
// // Remove trailing slash if present
|
u.pathname = u.pathname.replace(/\/$/, "");
|
||||||
// u.pathname = u.pathname.replace(/\/$/, "");
|
|
||||||
|
|
||||||
// let appName = u.format();
|
let appName = u.format();
|
||||||
// // Remove leading slashes if present
|
// Remove leading slashes if present
|
||||||
// appName = appName.replace(/^\/\//, "");
|
appName = appName.replace(/^\/\//, "");
|
||||||
// // `appName` is now in the format `develop.element.io`.
|
// `appName` is now in the format `develop.element.io`.
|
||||||
|
|
||||||
const appName = "Riot Web";
|
|
||||||
|
|
||||||
const ua = new UAParser();
|
const ua = new UAParser();
|
||||||
const browserName = ua.getBrowser().name || "unknown browser";
|
const browserName = ua.getBrowser().name || "unknown browser";
|
||||||
|
|
Loading…
Reference in New Issue