Completed theme switching functionality

This commit is contained in:
Alicia Sykes
2021-04-15 12:51:43 +01:00
parent e31e6d4239
commit 8b3d3cab88
12 changed files with 88 additions and 39 deletions

View File

@@ -2,7 +2,7 @@
<section>
<SearchBar @user-is-searchin="userIsTypingSomething" ref="SearchBar" />
<div class="options-container">
<ThemeSelector class="theme-selector" :themes="availableThemes" />
<ThemeSelector :themes="availableThemes" :confTheme="getInitialTheme()"/>
<LayoutSelector :displayLayout="displayLayout" @layoutUpdated="updateDisplayLayout"/>
<ItemSizeSelector :iconSize="iconSize" @iconSizeUpdated="updateIconSize" />
</div>
@@ -23,6 +23,7 @@ export default {
displayLayout: String,
iconSize: String,
availableThemes: Object,
appConfig: Object,
},
components: {
SearchBar,
@@ -44,6 +45,9 @@ export default {
updateIconSize(iconSize) {
this.$emit('change-icon-size', iconSize);
},
getInitialTheme() {
return this.appConfig.theme || '';
},
},
};
</script>