aboutsummaryrefslogtreecommitdiff
path: root/src/site/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/site/components')
-rw-r--r--src/site/components/grid/Grid.vue24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/site/components/grid/Grid.vue b/src/site/components/grid/Grid.vue
index 027bdf2..eaeb4f7 100644
--- a/src/site/components/grid/Grid.vue
+++ b/src/site/components/grid/Grid.vue
@@ -79,6 +79,13 @@
<Waterfall
:gutterWidth="10"
:gutterHeight="4">
+ <!-- Gotta implement search and pagination here -->
+ <input v-model="searchTerm"
+ type="text"
+ placeholder="Search..."
+ @input="search()"
+ @keyup.enter="search()">
+
<WaterfallItem v-for="(item, index) in files"
v-if="showWaterfall && item.thumb"
:key="index"
@@ -153,14 +160,29 @@ export default {
}
},
data() {
- return { showWaterfall: true };
+ return {
+ showWaterfall: true,
+ searchTerm: null
+ };
},
computed: {
config() {
return this.$store.state.config;
}
},
+ mounted() {
+ this.$search.items(this.files);
+ },
methods: {
+ async search() {
+ const data = await this.$search.do(this.searchTerm, [
+ 'name',
+ 'original',
+ 'type',
+ 'albums:name'
+ ]);
+ console.log('> Search result data', data);
+ },
deleteFile(file, index) {
this.$dialog.confirm({
title: 'Deleting file',