Minor fixes/adjustments

This commit is contained in:
Alicia Sykes
2024-04-13 12:25:50 +01:00
parent 0a56db5397
commit 743b5340f8
3 changed files with 10 additions and 24 deletions

View File

@@ -17,7 +17,7 @@
:class="`item-group-container ${!tabbedView ? 'showing-all' : ''}`">
<!-- Section heading buttons -->
<MinimalHeading
v-for="(section, index) in getSections(sections)"
v-for="(section, index) in sections"
:key="`heading-${index}`"
:index="index"
:title="section.name"
@@ -29,7 +29,7 @@
/>
<!-- Section item groups -->
<MinimalSection
v-for="(section, index) in getSections(sections)"
v-for="(section, index) in sections"
:key="`body-${index}`"
:index="index"
:title="section.name"
@@ -57,7 +57,6 @@ import HomeMixin from '@/mixins/HomeMixin';
import MinimalSection from '@/components/MinimalView/MinimalSection.vue';
import MinimalHeading from '@/components/MinimalView/MinimalHeading.vue';
import MinimalSearch from '@/components/MinimalView/MinimalSearch.vue';
import { localStorageKeys } from '@/utils/defaults';
import ConfigLauncher from '@/components/Settings/ConfigLauncher';
export default {
@@ -83,17 +82,6 @@ export default {
sectionSelected(index) {
this.selectedSection = index;
},
/* Returns sections from local storage if available, otherwise uses the conf.yml */
getSections(sections) {
// If the user has stored sections in local storage, return those
const localSections = localStorage[localStorageKeys.CONF_SECTIONS];
if (localSections) {
const json = JSON.parse(localSections);
if (json.length >= 1) return json;
}
// Otherwise, return the usuall data from conf.yml
return sections;
},
/* Clears input field, once a searched item is opened */
finishedSearching() {
if (this.$refs.filterComp) this.$refs.filterComp.clearMinFilterInput();