mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 06:29:46 +08:00
[all] fix bug 49030
This commit is contained in:
@ -18,6 +18,9 @@ define([
|
||||
}
|
||||
|
||||
return {
|
||||
THEME_LIGHT_ID: 'theme-light',
|
||||
THEME_DARK_ID: 'theme-dark',
|
||||
|
||||
init: function (api) {
|
||||
var me = this;
|
||||
$(window).on('storage', function (e) {
|
||||
@ -49,7 +52,7 @@ define([
|
||||
},
|
||||
|
||||
current: function () {
|
||||
return Common.localStorage.getItem('ui-theme', 'theme-light');
|
||||
return Common.localStorage.getItem('ui-theme') || 'theme-light';
|
||||
},
|
||||
|
||||
isDarkTheme: function () {
|
||||
|
||||
@ -465,8 +465,8 @@ define([
|
||||
editable : false,
|
||||
cls : 'input-group-nr',
|
||||
data : [
|
||||
{ value: 'theme-light', displayValue: this.txtThemeLight },
|
||||
{ value: 'theme-dark', displayValue: this.txtThemeDark }
|
||||
{ value: Common.UI.Themes.THEME_LIGHT_ID, displayValue: this.txtThemeLight },
|
||||
{ value: Common.UI.Themes.THEME_DARK_ID, displayValue: this.txtThemeDark }
|
||||
]
|
||||
});
|
||||
|
||||
@ -601,7 +601,7 @@ define([
|
||||
this.chPaste.setValue(Common.Utils.InternalSettings.get("de-settings-paste-button"));
|
||||
|
||||
item = this.cmbTheme.store.findWhere({value: Common.UI.Themes.current()});
|
||||
this.cmbTheme.setValue(item ? item.get('value') : 0);
|
||||
this.cmbTheme.setValue(item ? item.get('value') : Common.UI.Themes.THEME_LIGHT_ID);
|
||||
},
|
||||
|
||||
applySettings: function() {
|
||||
|
||||
@ -404,8 +404,8 @@ define([
|
||||
editable : false,
|
||||
cls : 'input-group-nr',
|
||||
data : [
|
||||
{ value: 'theme-light', displayValue: this.txtThemeLight },
|
||||
{ value: 'theme-dark', displayValue: this.txtThemeDark }
|
||||
{ value: Common.UI.Themes.THEME_LIGHT_ID, displayValue: this.txtThemeLight },
|
||||
{ value: Common.UI.Themes.THEME_DARK_ID, displayValue: this.txtThemeDark }
|
||||
]
|
||||
});
|
||||
|
||||
@ -530,7 +530,7 @@ define([
|
||||
this.chPaste.setValue(Common.Utils.InternalSettings.get("pe-settings-paste-button"));
|
||||
|
||||
item = this.cmbTheme.store.findWhere({value: Common.UI.Themes.current()});
|
||||
this.cmbTheme.setValue(item ? item.get('value') : 0);
|
||||
this.cmbTheme.setValue(item ? item.get('value') : Common.UI.Themes.THEME_LIGHT_ID);
|
||||
},
|
||||
|
||||
applySettings: function() {
|
||||
|
||||
@ -1010,8 +1010,8 @@ define([
|
||||
editable : false,
|
||||
cls : 'input-group-nr',
|
||||
data : [
|
||||
{ value: 'theme-light', displayValue: this.txtThemeLight },
|
||||
{ value: 'theme-dark', displayValue: this.txtThemeDark }
|
||||
{ value: Common.UI.Themes.THEME_LIGHT_ID, displayValue: this.txtThemeLight },
|
||||
{ value: Common.UI.Themes.THEME_DARK_ID, displayValue: this.txtThemeDark }
|
||||
]
|
||||
});
|
||||
|
||||
@ -1176,7 +1176,7 @@ define([
|
||||
this.chPaste.setValue(Common.Utils.InternalSettings.get("sse-settings-paste-button"));
|
||||
|
||||
item = this.cmbTheme.store.findWhere({value: Common.UI.Themes.current()});
|
||||
this.cmbTheme.setValue(item ? item.get('value') : 0);
|
||||
this.cmbTheme.setValue(item ? item.get('value') : Common.UI.Themes.THEME_LIGHT_ID);
|
||||
},
|
||||
|
||||
applySettings: function() {
|
||||
|
||||
Reference in New Issue
Block a user