[dark theme] changes for desktop app
This commit is contained in:
parent
b4814420f7
commit
683a87fbe5
|
@ -105,6 +105,7 @@
|
|||
, feedback: {
|
||||
url: "https://helpdesk.onlyoffice.com/?desktop=true"
|
||||
}
|
||||
, uiTheme: urlParams["uitheme"]
|
||||
},
|
||||
mode : urlParams["mode"] || 'edit',
|
||||
lang : urlParams["lang"] || 'en',
|
||||
|
|
|
@ -115,6 +115,9 @@ define([
|
|||
titlebuttons[obj.action].btn.click();
|
||||
}
|
||||
} else
|
||||
if (/theme:changed/.test(cmd)) {
|
||||
Common.UI.Themes.setTheme(param);
|
||||
} else
|
||||
if (/element:show/.test(cmd)) {
|
||||
var _mr = /title:(?:(true|show)|(false|hide))/.exec(param);
|
||||
if ( _mr ) {
|
||||
|
@ -235,6 +238,9 @@ define([
|
|||
Common.NotificationCenter.on({
|
||||
'modal:show': _onModalDialog.bind(this, 'open'),
|
||||
'modal:close': _onModalDialog.bind(this, 'close')
|
||||
, 'uitheme:changed' : function (name) {
|
||||
native.execCommand("uitheme:changed", name);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
@ -76,7 +76,7 @@ define([
|
|||
}
|
||||
|
||||
Common.localStorage.setItem('ui-theme', name);
|
||||
Common.NotificationCenter.trigger('uitheme:change', name);
|
||||
Common.NotificationCenter.trigger('uitheme:changed', name);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -32,7 +32,10 @@ var params = (function() {
|
|||
return urlParams;
|
||||
})();
|
||||
|
||||
var ui_theme_name = params.uitheme || localStorage.getItem("ui-theme");
|
||||
if ( !!params.uitheme && localStorage.getItem("ui-theme") != params.uitheme)
|
||||
localStorage.setItem("ui-theme", params.uitheme);
|
||||
|
||||
var ui_theme_name = localStorage.getItem("ui-theme");
|
||||
if ( !!ui_theme_name ) {
|
||||
document.body.classList.add(ui_theme_name);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue