Support a config option to change the default device name (#20790)
parent
cfa97212f7
commit
7078373fbb
|
@ -166,6 +166,8 @@ For a good example, see https://develop.element.io/config.json.
|
||||||
the well-known location is used instead.
|
the well-known location is used instead.
|
||||||
1. `analyticsOwner`: The entity that analytics data is being sent to. Used in copy
|
1. `analyticsOwner`: The entity that analytics data is being sent to. Used in copy
|
||||||
when explaining to the user where data is being sent. If not set, defaults to `brand`.
|
when explaining to the user where data is being sent. If not set, defaults to `brand`.
|
||||||
|
1. `defaultDeviceDisplayName`: The default device display name to use for new logins
|
||||||
|
and registrations. If not set then a calculated version will be used.
|
||||||
|
|
||||||
Note that `index.html` also has an og:image meta tag that is set to an image
|
Note that `index.html` also has an og:image meta tag that is set to an image
|
||||||
hosted on riot.im. This is the image used if links to your copy of Element
|
hosted on riot.im. This is the image used if links to your copy of Element
|
||||||
|
|
|
@ -180,6 +180,8 @@ export async function loadApp(fragParams: {}) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const defaultDeviceName = config['defaultDeviceDisplayName'] ?? platform.getDefaultDeviceDisplayName();
|
||||||
|
|
||||||
const MatrixChat = sdk.getComponent('structures.MatrixChat');
|
const MatrixChat = sdk.getComponent('structures.MatrixChat');
|
||||||
return <MatrixChat
|
return <MatrixChat
|
||||||
onNewScreen={onNewScreen}
|
onNewScreen={onNewScreen}
|
||||||
|
@ -190,7 +192,7 @@ export async function loadApp(fragParams: {}) {
|
||||||
enableGuest={!config.disable_guests}
|
enableGuest={!config.disable_guests}
|
||||||
onTokenLoginCompleted={onTokenLoginCompleted}
|
onTokenLoginCompleted={onTokenLoginCompleted}
|
||||||
initialScreenAfterLogin={getScreenFromLocation(window.location)}
|
initialScreenAfterLogin={getScreenFromLocation(window.location)}
|
||||||
defaultDeviceDisplayName={platform.getDefaultDeviceDisplayName()}
|
defaultDeviceDisplayName={defaultDeviceName}
|
||||||
/>;
|
/>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue