2017-01-17 04:57:03 +11:00
|
|
|
export default {
|
|
|
|
data: () => ({
|
|
|
|
availableStyles: [],
|
|
|
|
selected: false
|
|
|
|
}),
|
|
|
|
created () {
|
|
|
|
const self = this
|
|
|
|
window.fetch('/static/css/themes.json')
|
|
|
|
.then((data) => data.json())
|
|
|
|
.then((themes) => { self.availableStyles = themes })
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
selected () {
|
2017-02-15 08:21:23 +11:00
|
|
|
this.$store.dispatch('setOption', { name: 'theme', value: this.selected })
|
2017-01-17 04:57:03 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|