forked from matrix/element-web
Merge pull request #9909 from vector-im/matthew/low_bandwidth
Low bandwidth mode
This commit is contained in:
commit
f4192e4f9d
|
@ -134,6 +134,8 @@ For a good example, see https://riot.im/develop/config.json.
|
||||||
in the `labs` section of settings. The available optional experimental features vary from
|
in the `labs` section of settings. The available optional experimental features vary from
|
||||||
release to release. Some of the available features are described in the Labs Feature section
|
release to release. Some of the available features are described in the Labs Feature section
|
||||||
of this README.
|
of this README.
|
||||||
|
1. `showLabsSettings`: Shows the "labs" tab of user settings even when no `features` are enabled
|
||||||
|
or present. Useful for getting at settings which may be otherwise hidden.
|
||||||
1. `brand`: String to pass to your homeserver when configuring email notifications, to let the
|
1. `brand`: String to pass to your homeserver when configuring email notifications, to let the
|
||||||
homeserver know what email template to use when talking to you.
|
homeserver know what email template to use when talking to you.
|
||||||
1. `branding`: Configures various branding and logo details, such as:
|
1. `branding`: Configures various branding and logo details, such as:
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
"integrations_rest_url": "https://scalar.vector.im/api",
|
"integrations_rest_url": "https://scalar.vector.im/api",
|
||||||
"integrations_jitsi_widget_url": "https://scalar.vector.im/api/widgets/jitsi.html",
|
"integrations_jitsi_widget_url": "https://scalar.vector.im/api/widgets/jitsi.html",
|
||||||
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
|
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
|
||||||
|
"showLabsSettings": false,
|
||||||
"features": {
|
"features": {
|
||||||
"feature_groups": "labs",
|
"feature_groups": "labs",
|
||||||
"feature_pinning": "labs",
|
"feature_pinning": "labs",
|
||||||
|
|
|
@ -141,14 +141,12 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notifications in Electron use the HTML5 notification API
|
// Notifications in Electron use the HTML5 notification API
|
||||||
const notification = new global.Notification(
|
const notifBody = {
|
||||||
title,
|
body: msg,
|
||||||
{
|
silent: true, // we play our own sounds
|
||||||
body: msg,
|
};
|
||||||
icon: avatarUrl,
|
if (avatarUrl) notifBody['icon'] = avatarUrl;
|
||||||
silent: true, // we play our own sounds
|
const notification = new global.Notification(title, notifBody);
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
notification.onclick = () => {
|
notification.onclick = () => {
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
|
|
|
@ -76,15 +76,13 @@ export default class WebPlatform extends VectorBasePlatform {
|
||||||
}
|
}
|
||||||
|
|
||||||
displayNotification(title: string, msg: string, avatarUrl: string, room: Object) {
|
displayNotification(title: string, msg: string, avatarUrl: string, room: Object) {
|
||||||
const notification = new global.Notification(
|
const notifBody = {
|
||||||
title,
|
body: msg,
|
||||||
{
|
tag: "vector",
|
||||||
body: msg,
|
silent: true, // we play our own sounds
|
||||||
icon: avatarUrl,
|
};
|
||||||
tag: "vector",
|
if (avatarUrl) notifBody['icon'] = avatarUrl;
|
||||||
silent: true, // we play our own sounds
|
const notification = new global.Notification(title, notifBody);
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
notification.onclick = function() {
|
notification.onclick = function() {
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
|
|
Loading…
Reference in New Issue