feat(ui): respect custom css
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2338>
This commit is contained in:
parent
72dd944f04
commit
c793799161
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import type { QueueTrack } from '~/composables/audio/queue'
|
||||
|
||||
import { useIntervalFn, useToggle, useWindowSize } from '@vueuse/core'
|
||||
import { useIntervalFn, useStyleTag, useToggle, useWindowSize } from '@vueuse/core'
|
||||
import { computed, nextTick, onMounted, ref, watchEffect } from 'vue'
|
||||
|
||||
import { useQueue } from '~/composables/audio/queue'
|
||||
|
@ -49,6 +49,8 @@ const customStylesheets = computed(() => {
|
|||
return store.state.instance.frontSettings.additionalStylesheets ?? []
|
||||
})
|
||||
|
||||
useStyleTag(computed(() => store.state.instance.settings.ui.custom_css.value))
|
||||
|
||||
// Fake content
|
||||
onMounted(async () => {
|
||||
await nextTick()
|
||||
|
|
|
@ -108,11 +108,16 @@ interface SubsonicSettings {
|
|||
enabled: { value: boolean }
|
||||
}
|
||||
|
||||
interface UISettings {
|
||||
custom_css: { value: string }
|
||||
}
|
||||
|
||||
interface Settings {
|
||||
instance: InstanceSettings
|
||||
users: UsersSettings
|
||||
moderation: ModerationSettings
|
||||
subsonic: SubsonicSettings
|
||||
ui: UISettings
|
||||
}
|
||||
|
||||
const logger = useLogger()
|
||||
|
@ -169,6 +174,11 @@ const store: Module<State, RootState> = {
|
|||
enabled: {
|
||||
value: true
|
||||
}
|
||||
},
|
||||
ui: {
|
||||
custom_css: {
|
||||
value: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue