Adds more themes, adds ability to hide unneeded components

This commit is contained in:
Alicia Sykes
2021-04-16 14:29:19 +01:00
parent 7f3e8dd818
commit c5f630849f
12 changed files with 116 additions and 51 deletions

View File

@@ -1,8 +1,9 @@
<template>
<section>
<SearchBar @user-is-searchin="userIsTypingSomething" ref="SearchBar" />
<div class="options-container">
<ThemeSelector :themes="availableThemes" :confTheme="getInitialTheme()"/>
<SearchBar @user-is-searchin="userIsTypingSomething" ref="SearchBar" v-if="searchVisible" />
<div class="options-container" v-if="settingsVisible">
<ThemeSelector :themes="availableThemes"
:confTheme="getInitialTheme()" :userThemes="getUserThemes()" />
<LayoutSelector :displayLayout="displayLayout" @layoutUpdated="updateDisplayLayout"/>
<ItemSizeSelector :iconSize="iconSize" @iconSizeUpdated="updateIconSize" />
</div>
@@ -11,6 +12,7 @@
</template>
<script>
import Defaults from '@/utils/defaults';
import SearchBar from '@/components/Settings/SearchBar';
import ThemeSelector from '@/components/Settings/ThemeSelector';
import LayoutSelector from '@/components/Settings/LayoutSelector';
@@ -48,6 +50,15 @@ export default {
getInitialTheme() {
return this.appConfig.theme || '';
},
getUserThemes() {
return this.appConfig.cssThemes || [];
},
},
data() {
return {
searchVisible: Defaults.visibleComponents.searchBar,
settingsVisible: Defaults.visibleComponents.settings,
};
},
};
</script>