Remove iOS theme in favor of plain light/dark themes
This commit is contained in:
parent
19cbfae127
commit
fc5c52fbdf
16 changed files with 51 additions and 623 deletions
|
@ -114,6 +114,17 @@
|
|||
}
|
||||
});
|
||||
|
||||
function mapOldThemeToNew(theme) {
|
||||
switch (theme) {
|
||||
case 'android-dark':
|
||||
return 'dark';
|
||||
case 'android':
|
||||
case 'ios':
|
||||
default:
|
||||
return 'light';
|
||||
}
|
||||
}
|
||||
|
||||
// We need this 'first' check because we don't want to start the app up any other time
|
||||
// than the first time. And storage.fetch() will cause onready() to fire.
|
||||
let first = true;
|
||||
|
@ -171,6 +182,10 @@
|
|||
},
|
||||
};
|
||||
|
||||
const themeSetting = window.Events.getThemeSetting();
|
||||
const newThemeSetting = mapOldThemeToNew(themeSetting);
|
||||
window.Events.setThemeSetting(newThemeSetting);
|
||||
|
||||
try {
|
||||
await ConversationController.load();
|
||||
} finally {
|
||||
|
|
|
@ -5,7 +5,7 @@ $(document).on('keyup', function(e) {
|
|||
});
|
||||
|
||||
const $body = $(document.body);
|
||||
$body.addClass(window.theme);
|
||||
$body.addClass(`${window.theme}-theme`);
|
||||
|
||||
// got.js appears to need this to successfully submit debug logs to the cloud
|
||||
window.setImmediate = window.nodeSetImmediate;
|
||||
|
|
|
@ -5,7 +5,7 @@ $(document).on('keyup', function(e) {
|
|||
});
|
||||
|
||||
const $body = $(document.body);
|
||||
$body.addClass(window.theme);
|
||||
$body.addClass(`${window.theme}-theme`);
|
||||
|
||||
window.view = new Whisper.ConfirmationDialogView({
|
||||
message: i18n('audioPermissionNeeded'),
|
||||
|
|
|
@ -5,7 +5,7 @@ $(document).on('keyup', function(e) {
|
|||
});
|
||||
|
||||
const $body = $(document.body);
|
||||
$body.addClass(window.theme);
|
||||
$body.addClass(`${window.theme}-theme`);
|
||||
|
||||
const getInitialData = async () => ({
|
||||
deviceName: await window.getDeviceName(),
|
||||
|
|
|
@ -16,12 +16,11 @@
|
|||
openInbox: 'openInbox',
|
||||
},
|
||||
applyTheme: function() {
|
||||
var theme = storage.get('theme-setting') || 'android';
|
||||
var theme = storage.get('theme-setting') || 'light';
|
||||
this.$el
|
||||
.removeClass('ios')
|
||||
.removeClass('android-dark')
|
||||
.removeClass('android')
|
||||
.addClass(theme);
|
||||
.removeClass('light-theme')
|
||||
.removeClass('dark-theme')
|
||||
.addClass(`${theme}-theme`);
|
||||
},
|
||||
applyHideMenu: function() {
|
||||
var hideMenuBar = storage.get('hide-menu-bar', false);
|
||||
|
|
|
@ -85,10 +85,9 @@
|
|||
value: window.initialData.themeSetting,
|
||||
setFn: theme => {
|
||||
$(document.body)
|
||||
.removeClass('android')
|
||||
.removeClass('android-dark')
|
||||
.removeClass('ios')
|
||||
.addClass(theme);
|
||||
.removeClass('dark-theme')
|
||||
.removeClass('light-theme')
|
||||
.addClass(`${theme}-theme`);
|
||||
window.setThemeSetting(theme);
|
||||
},
|
||||
});
|
||||
|
@ -132,7 +131,8 @@
|
|||
nameOnly: i18n('nameOnly'),
|
||||
audioNotificationDescription: i18n('audioNotificationDescription'),
|
||||
isAudioNotificationSupported: Settings.isAudioNotificationSupported(),
|
||||
themeAndroidDark: i18n('themeAndroidDark'),
|
||||
themeLight: i18n('themeLight'),
|
||||
themeDark: i18n('themeDark'),
|
||||
hideMenuBar: i18n('hideMenuBar'),
|
||||
clearDataHeader: i18n('clearDataHeader'),
|
||||
clearDataButton: i18n('clearDataButton'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue