mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-04-07 14:06:16 +08:00
[forms] fix bug 61142
This commit is contained in:
@ -1967,7 +1967,7 @@ define([
|
||||
uitype: 'fillform',
|
||||
uithemes: true
|
||||
};
|
||||
var api;
|
||||
var api, nativevars;
|
||||
|
||||
var native = window.desktop || window.AscDesktopEditor;
|
||||
!!native && native.execCommand('webapps:features', JSON.stringify(features));
|
||||
@ -1975,6 +1975,8 @@ define([
|
||||
if ( !!native ) {
|
||||
$('#header-logo, .brand-logo').hide();
|
||||
|
||||
nativevars = window.RendererProcessVariable;
|
||||
|
||||
window.on_native_message = function (cmd, param) {
|
||||
if (/theme:changed/.test(cmd)) {
|
||||
if ( Common.UI.Themes && !!Common.UI.Themes.setTheme )
|
||||
@ -2021,6 +2023,9 @@ define([
|
||||
isActive: function () {
|
||||
return !!native;
|
||||
},
|
||||
isOffline: function () {
|
||||
return api && api.asc_isOffline();
|
||||
},
|
||||
process: function (opts) {
|
||||
if ( !!native && !!api ) {
|
||||
if ( opts == 'goback' ) {
|
||||
@ -2033,6 +2038,10 @@ define([
|
||||
|
||||
return false;
|
||||
},
|
||||
systemThemeType: function () {
|
||||
return nativevars.theme && !!nativevars.theme.system ? nativevars.theme.system :
|
||||
window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
||||
},
|
||||
}
|
||||
};
|
||||
DE.Controllers.Desktop = new Desktop();
|
||||
|
||||
Reference in New Issue
Block a user