summaryrefslogtreecommitdiffstats
path: root/apps/theming/src/UserThemes.vue
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2022-08-17 15:28:01 +0200
committernextcloud-command <nextcloud-command@users.noreply.github.com>2022-08-17 14:11:05 +0000
commiteb8d1ff6da1fd6258a2f7605ff94bfe04e2c8219 (patch)
tree28ce5299956952293c91a6f7bd3c6569c357ea92 /apps/theming/src/UserThemes.vue
parent1c60ff5936bf9c8358072023aeafa8a7ccd0c800 (diff)
downloadnextcloud-server-eb8d1ff6da1fd6258a2f7605ff94bfe04e2c8219.tar.gz
nextcloud-server-eb8d1ff6da1fd6258a2f7605ff94bfe04e2c8219.zip
Fix font change preview update
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps/theming/src/UserThemes.vue')
-rw-r--r--apps/theming/src/UserThemes.vue7
1 files changed, 6 insertions, 1 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(','))
},
/**