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">
|
<script setup lang="ts">
|
||||||
import type { QueueTrack } from '~/composables/audio/queue'
|
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 { computed, nextTick, onMounted, ref, watchEffect } from 'vue'
|
||||||
|
|
||||||
import { useQueue } from '~/composables/audio/queue'
|
import { useQueue } from '~/composables/audio/queue'
|
||||||
|
@ -49,6 +49,8 @@ const customStylesheets = computed(() => {
|
||||||
return store.state.instance.frontSettings.additionalStylesheets ?? []
|
return store.state.instance.frontSettings.additionalStylesheets ?? []
|
||||||
})
|
})
|
||||||
|
|
||||||
|
useStyleTag(computed(() => store.state.instance.settings.ui.custom_css.value))
|
||||||
|
|
||||||
// Fake content
|
// Fake content
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await nextTick()
|
await nextTick()
|
||||||
|
|
|
@ -108,11 +108,16 @@ interface SubsonicSettings {
|
||||||
enabled: { value: boolean }
|
enabled: { value: boolean }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface UISettings {
|
||||||
|
custom_css: { value: string }
|
||||||
|
}
|
||||||
|
|
||||||
interface Settings {
|
interface Settings {
|
||||||
instance: InstanceSettings
|
instance: InstanceSettings
|
||||||
users: UsersSettings
|
users: UsersSettings
|
||||||
moderation: ModerationSettings
|
moderation: ModerationSettings
|
||||||
subsonic: SubsonicSettings
|
subsonic: SubsonicSettings
|
||||||
|
ui: UISettings
|
||||||
}
|
}
|
||||||
|
|
||||||
const logger = useLogger()
|
const logger = useLogger()
|
||||||
|
@ -169,6 +174,11 @@ const store: Module<State, RootState> = {
|
||||||
enabled: {
|
enabled: {
|
||||||
value: true
|
value: true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
ui: {
|
||||||
|
custom_css: {
|
||||||
|
value: ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue