aboutsummaryrefslogtreecommitdiff
path: root/src/site/components/grid/Grid.vue
diff options
context:
space:
mode:
authorZephyrrus <[email protected]>2020-07-01 20:15:08 +0300
committerZephyrrus <[email protected]>2020-07-01 20:15:08 +0300
commit8416dc81a34b80de0ac9a4d0be923466bcffdec4 (patch)
tree7db11aa615c448af9d65281e3cc457c8a4adf73f /src/site/components/grid/Grid.vue
parentfix: remove .bmp from the imageExtensions because sharp doesn't support it (diff)
downloadhost.fuwn.me-8416dc81a34b80de0ac9a4d0be923466bcffdec4.tar.xz
host.fuwn.me-8416dc81a34b80de0ac9a4d0be923466bcffdec4.zip
fix: use file id instead of index and remove load more button
Diffstat (limited to 'src/site/components/grid/Grid.vue')
-rw-r--r--src/site/components/grid/Grid.vue14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/site/components/grid/Grid.vue b/src/site/components/grid/Grid.vue
index 15ff5fd..b6615be 100644
--- a/src/site/components/grid/Grid.vue
+++ b/src/site/components/grid/Grid.vue
@@ -33,7 +33,7 @@
<!-- TODO: Implement pagination -->
<WaterfallItem v-for="(item, index) in gridFiles"
- :key="index"
+ :key="item.id"
:width="width"
move-class="item-move">
<template v-if="isPublic">
@@ -93,10 +93,6 @@
</template>
</WaterfallItem>
</Waterfall>
- <button
- v-if="moreFiles"
- class="button is-primary"
- @click="loadMoreFilesWaterfall">Load more</button>
</template>
<div v-else>
<b-table
@@ -254,16 +250,10 @@ export default {
return require('@/assets/images/blank.png');
},
gridFiles() {
- return this.files.slice(this.filesOffsetWaterfall, this.filesOffsetEndWaterfall);
+ return this.files;
},
- moreFiles() {
- return this.files.length > this.filesOffsetEndWaterfall;
- }
},
methods: {
- loadMoreFilesWaterfall() {
- this.filesOffsetEndWaterfall = this.filesOffsetEndWaterfall + this.filesPerPageWaterfall;
- },
async search() {
const data = await this.$search.do(this.searchTerm, [
'name',