Move install skin to config

This commit is contained in:
Oleg Korshul 2021-04-05 18:00:00 +03:00
parent 192995c854
commit 66ed60e991
2 changed files with 4 additions and 5 deletions

View file

@ -92,7 +92,8 @@ require([
var api = new Asc.asc_docs_api({ var api = new Asc.asc_docs_api({
'id-view' : 'editor_sdk', 'id-view' : 'editor_sdk',
using : 'reporter' using : 'reporter',
skin : (localStorage.getItem("ui-theme") == "theme-dark") ? "flatDark" : "flat"
}); });
var setDocumentTitle = function(title) { var setDocumentTitle = function(title) {

View file

@ -93,12 +93,10 @@ require([
var api = new Asc.asc_docs_api({ var api = new Asc.asc_docs_api({
'id-view' : 'editor_sdk', 'id-view' : 'editor_sdk',
using : 'reporter' using : 'reporter',
skin : (localStorage.getItem("ui-theme") == "theme-dark") ? "flatDark" : "flat"
}); });
var value = localStorage.getItem("ui-theme");
api.asc_setSkin(value == "theme-dark" ? 'flatDark' : "flat");
var setDocumentTitle = function(title) { var setDocumentTitle = function(title) {
(title) && (window.document.title += (' - ' + title)); (title) && (window.document.title += (' - ' + title));
}; };