From 6688587eb6bdf118687c630378d40e36a3700a52 Mon Sep 17 00:00:00 2001 From: Zephyrrus Date: Thu, 2 Jul 2020 02:48:21 +0300 Subject: feat: move toolbar into a level and add slot for pagination on grid --- src/site/components/grid/Grid.vue | 57 ++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 27 deletions(-) (limited to 'src/site/components/grid/Grid.vue') diff --git a/src/site/components/grid/Grid.vue b/src/site/components/grid/Grid.vue index b6615be..279472c 100644 --- a/src/site/components/grid/Grid.vue +++ b/src/site/components/grid/Grid.vue @@ -1,37 +1,40 @@
@@ -185,12 +183,10 @@ import { mapState } from 'vuex'; import Waterfall from './waterfall/Waterfall.vue'; -import WaterfallItem from './waterfall/WaterfallItem.vue'; export default { components: { Waterfall, - WaterfallItem, }, props: { files: { @@ -253,13 +249,13 @@ export default { const data = await this.$search.do(this.searchTerm, ['name', 'original', 'type', 'albums:name']); console.log('> Search result data', data); }, - deleteFile(file, index) { - this.$buefy.dialog.confirm({ + deleteFile(file) { + this.$emit('delete', file); + /* this.$buefy.dialog.confirm({ title: 'Deleting file', message: 'Are you sure you want to delete this file?', confirmText: 'Delete File', type: 'is-danger', - hasIcon: true, onConfirm: async () => { const response = await this.$axios.$delete(`file/${file.id}`); if (this.showList) { @@ -274,7 +270,7 @@ export default { } return this.$buefy.toast.open(response.message); }, - }); + }); */ }, isAlbumSelected(id) { if (!this.showingModalForFile) return false; @@ -311,10 +307,6 @@ export default { const foundIndex = this.hoveredItems.indexOf(id); if (foundIndex > -1) return; this.hoveredItems.push(id); - /// XXX: THIS IS NOT OK! - this.$nextTick(() => { - this.$refs.video.forEach((e) => e.play().catch(() => {})); - }); }, mouseOut(id) { console.log('out', id); -- cgit v1.2.3 From 5d61b4d000a114857e4519be25c5834f510d450f Mon Sep 17 00:00:00 2001 From: Zephyrrus Date: Tue, 7 Jul 2020 02:50:03 +0300 Subject: feat: refactor waterfall to be more efficient --- src/site/components/grid/Grid.vue | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/site/components/grid/Grid.vue') diff --git a/src/site/components/grid/Grid.vue b/src/site/components/grid/Grid.vue index e6a8c64..f98108e 100644 --- a/src/site/components/grid/Grid.vue +++ b/src/site/components/grid/Grid.vue @@ -25,6 +25,7 @@ v-if="showWaterfall" :gutterWidth="10" :gutterHeight="4" + :options="{fitWidth: true}" :itemWidth="width" :items="gridFiles">