Open separate windows with theme, update settings theme on change
This commit is contained in:
parent
d014fa779e
commit
d8e5e5fcf2
10 changed files with 38 additions and 14 deletions
|
@ -5,6 +5,7 @@ $(document).on('keyup', function(e) {
|
|||
});
|
||||
|
||||
const $body = $(document.body);
|
||||
$body.addClass(window.theme);
|
||||
|
||||
// got.js appears to need this to successfully submit debug logs to the cloud
|
||||
window.setImmediate = window.nodeSetImmediate;
|
||||
|
|
|
@ -5,6 +5,7 @@ $(document).on('keyup', function(e) {
|
|||
});
|
||||
|
||||
const $body = $(document.body);
|
||||
$body.addClass(window.theme);
|
||||
|
||||
window.view = new Whisper.ConfirmationDialogView({
|
||||
message: i18n('audioPermissionNeeded'),
|
||||
|
|
|
@ -5,6 +5,7 @@ $(document).on('keyup', function(e) {
|
|||
});
|
||||
|
||||
const $body = $(document.body);
|
||||
$body.addClass(window.theme);
|
||||
|
||||
const getInitialData = async () => ({
|
||||
deviceName: await window.getDeviceName(),
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* global i18n: false */
|
||||
/* global Whisper: false */
|
||||
/* global $: false */
|
||||
|
||||
/* eslint-disable no-new */
|
||||
|
||||
|
@ -82,7 +83,14 @@
|
|||
el: this.$('.theme-settings'),
|
||||
name: 'theme-setting',
|
||||
value: window.initialData.themeSetting,
|
||||
setFn: window.setThemeSetting,
|
||||
setFn: theme => {
|
||||
$(document.body)
|
||||
.removeClass('android')
|
||||
.removeClass('android-dark')
|
||||
.removeClass('ios')
|
||||
.addClass(theme);
|
||||
window.setThemeSetting(theme);
|
||||
},
|
||||
});
|
||||
if (Settings.isAudioNotificationSupported()) {
|
||||
new CheckboxView({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue