Skip to content

Commit

Permalink
Fix font change preview update
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
  • Loading branch information
skjnldsv authored and nextcloud-command committed Aug 17, 2022
1 parent 1c60ff5 commit eb8d1ff
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion apps/theming/src/UserThemes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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(','))
},
/**
Expand Down
2 changes: 1 addition & 1 deletion apps/theming/src/components/ItemPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading

0 comments on commit eb8d1ff

Please sign in to comment.