diff options
author | Pytal <24800714+Pytal@users.noreply.github.com> | 2022-08-17 21:33:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-17 21:33:39 +0300 |
commit | 2f538bb20f7859b2f09d0d088be9ee47c6cdadde (patch) | |
tree | dd3d6371a18fe551eb30cd46075e7fb6bbed6a0f /apps/theming | |
parent | 48752a91bd6e37ba98ee349900e0071a70001c7d (diff) | |
parent | eb8d1ff6da1fd6258a2f7605ff94bfe04e2c8219 (diff) |
Merge pull request #33584 from nextcloud/fix/theme-font-preview
Diffstat (limited to 'apps/theming')
-rw-r--r-- | apps/theming/src/UserThemes.vue | 7 | ||||
-rw-r--r-- | apps/theming/src/components/ItemPreview.vue | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/apps/theming/src/UserThemes.vue b/apps/theming/src/UserThemes.vue index f3e51f0a375..381cb142a71 100644 --- a/apps/theming/src/UserThemes.vue +++ b/apps/theming/src/UserThemes.vue @@ -124,11 +124,16 @@ export default { updateBodyAttributes() { const enabledThemesIDs = this.themes.filter(theme => theme.enabled === true).map(theme => theme.id) + const enabledFontsIDs = this.fonts.filter(font => font.enabled === true).map(font => font.id) + this.themes.forEach(theme => { document.body.toggleAttribute(`data-theme-${theme.id}`, theme.enabled) }) + this.fonts.forEach(font => { + document.body.toggleAttribute(`data-theme-${font.id}`, font.enabled) + }) - document.body.setAttribute('data-themes', enabledThemesIDs.join(',')) + document.body.setAttribute('data-themes', [...enabledThemesIDs, ...enabledFontsIDs].join(',')) }, /** diff --git a/apps/theming/src/components/ItemPreview.vue b/apps/theming/src/components/ItemPreview.vue index fac25ac7ae7..90fee453ddf 100644 --- a/apps/theming/src/components/ItemPreview.vue +++ b/apps/theming/src/components/ItemPreview.vue @@ -67,7 +67,7 @@ export default { return this.selected }, set(checked) { - console.debug('Selecting theme', this.theme, checked) + console.debug('Changed theme', this.theme.id, checked) // If this is a radio, we can only enable if (!this.unique) { |