aboutsummaryrefslogtreecommitdiff
path: root/src/site/components/grid/Grid.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/site/components/grid/Grid.vue')
-rw-r--r--src/site/components/grid/Grid.vue12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/site/components/grid/Grid.vue b/src/site/components/grid/Grid.vue
index 3a15335..ea568f0 100644
--- a/src/site/components/grid/Grid.vue
+++ b/src/site/components/grid/Grid.vue
@@ -21,9 +21,8 @@
</div>
</nav>
- <template v-if="!showList">
+ <template v-if="!images.showList">
<Waterfall
- v-if="showWaterfall"
:gutterWidth="10"
:gutterHeight="4"
:options="{fitWidth: true}"
@@ -196,7 +195,6 @@ export default {
},
data() {
return {
- showWaterfall: true,
searchTerm: null,
showList: false,
hoveredItems: [],
@@ -226,10 +224,15 @@ export default {
return (this.files || []).filter((v) => !v.hideFromList);
}
},
+ watch: {
+ showList: 'displayTypeChange'
+ },
created() {
// TODO: Create a middleware for this
this.getAlbums();
this.getTags();
+
+ this.showList = this.images.showList;
},
methods: {
async search() {
@@ -332,6 +335,9 @@ export default {
},
isHovered(id) {
return this.hoveredItems.includes(id);
+ },
+ displayTypeChange(showList) {
+ this.$store.commit('images/setShowList', showList);
}
}
};