Fix #456: make Funkwhale themable by loading external stylesheets

This commit is contained in:
Eliot Berriot 2018-07-26 19:51:55 +02:00
parent 14e0ac97dc
commit d7f12caf5c
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
8 changed files with 111 additions and 0 deletions

View file

@ -1,5 +1,7 @@
<template>
<div id="app">
<!-- here, we display custom stylesheets, if any -->
<link v-for="url in customStylesheets" rel="stylesheet" property="stylesheet" :href="url" :key="url">
<div class="ui main text container instance-chooser" v-if="!$store.state.instance.instanceUrl">
<div class="ui padded segment">
<h1 class="ui header"><translate>Choose your instance</translate></h1>
@ -175,6 +177,11 @@ export default {
return null
}
return _.get(this.nodeinfo, 'software.version')
},
customStylesheets () {
if (this.$store.state.instance.frontSettings) {
return this.$store.state.instance.frontSettings.additionalStylesheets || []
}
}
},
watch: {