mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-02-10 18:05:32 +08:00
[DE] fix modified icons using
This commit is contained in:
@ -82,7 +82,10 @@ define([
|
||||
text: locale.txtThemeWhite || 'White',
|
||||
type: 'light',
|
||||
source: 'static',
|
||||
icons: './resources/img/v2',
|
||||
icons: {
|
||||
basepath: './resources/img/v2',
|
||||
cls: 'next-mod',
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@ -456,9 +459,13 @@ define([
|
||||
document.body.className = document.body.className.replace(/theme-[\w-]+\s?/gi, '').trim();
|
||||
document.body.classList.add(theme_id, 'theme-type-' + themes_map[theme_id].type);
|
||||
|
||||
if ( !!themes_map[theme_id].icons ) {
|
||||
const base_url = themes_map[theme_id].icons;
|
||||
if ( !!themes_map[theme_id].icons && themes_map[theme_id].icons.basepath ) {
|
||||
const base_url = themes_map[theme_id].icons.basepath;
|
||||
window.uitheme.apply_icons_from_url(theme_id, base_url);
|
||||
|
||||
if ( themes_map[theme_id].icons.cls ) {
|
||||
document.body.classList.add('theme-icons-cls-' + themes_map[theme_id].icons.cls);
|
||||
}
|
||||
}
|
||||
|
||||
if ( this.api.asc_setContentDarkMode )
|
||||
@ -538,8 +545,12 @@ define([
|
||||
document.body.classList.add('theme-type-' + obj.type);
|
||||
|
||||
if (themes_map[theme_id].icons) {
|
||||
if (!document.querySelector('style#' + theme_id)) {
|
||||
window.uitheme.apply_icons_from_url(theme_id, themes_map[theme_id].icons);
|
||||
if (themes_map[theme_id].icons.basepath && !document.querySelector('style#' + theme_id)) {
|
||||
window.uitheme.apply_icons_from_url(theme_id, themes_map[theme_id].icons.basepath);
|
||||
}
|
||||
|
||||
if ( themes_map[theme_id].icons.cls ) {
|
||||
document.body.classList.add('theme-icons-cls-' + themes_map[theme_id].icons.cls);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
}
|
||||
{{/spritesheet}}
|
||||
{{#sprites}}
|
||||
{{#parselang name}}.{{name}}{{/parselang}} {
|
||||
{{#extracls}}{{/extracls}}{{#parselang name}}.{{name}}{{/parselang}} {
|
||||
@btn-icon-offset: 0;
|
||||
background-position: @btn-icon-offset {{px.offset_y}};
|
||||
|
||||
|
||||
@ -145,6 +145,7 @@
|
||||
@import "thumbnails.less";
|
||||
|
||||
@import "sprites/iconssmall@1x";
|
||||
@import "sprites/iconssmall@1x.v2";
|
||||
@import "sprites/iconsbig@1x";
|
||||
@import "sprites/iconshuge@1x";
|
||||
@import "sprites/iconssmall@2x";
|
||||
|
||||
Reference in New Issue
Block a user