diff options
| author | Pitu <[email protected]> | 2020-07-18 04:47:24 +0900 |
|---|---|---|
| committer | Pitu <[email protected]> | 2020-07-18 04:47:24 +0900 |
| commit | 609ff7ceb4c1d452db3f7d56a89305090ecd467a (patch) | |
| tree | 77e86616de15892af24dc2fae0c915818e009171 /src/site/components/grid | |
| parent | Add logout button (diff) | |
| download | host.fuwn.me-609ff7ceb4c1d452db3f7d56a89305090ecd467a.tar.xz host.fuwn.me-609ff7ceb4c1d452db3f7d56a89305090ecd467a.zip | |
Update displaying thumbnails of unsupported file types
Diffstat (limited to 'src/site/components/grid')
| -rw-r--r-- | src/site/components/grid/Grid.vue | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/site/components/grid/Grid.vue b/src/site/components/grid/Grid.vue index da9b26c..d0a5ea3 100644 --- a/src/site/components/grid/Grid.vue +++ b/src/site/components/grid/Grid.vue @@ -96,7 +96,7 @@ <button v-if="moreFiles" class="button is-primary" - @click="loadMoreFilesWaterfall">Load more</button> + @click="loadMoreFiles">Load more</button> </template> <div v-else> <b-table @@ -172,6 +172,10 @@ </div> </template> </b-table> + <button + v-if="moreFiles" + class="button is-primary mt2" + @click="loadMoreFiles">Load more</button> </div> <b-modal :active.sync="isAlbumsModalActive" :width="640" @@ -240,9 +244,9 @@ export default { albums: [], isAlbumsModalActive: false, showingModalForFile: null, - filesOffsetWaterfall: 0, - filesOffsetEndWaterfall: 50, - filesPerPageWaterfall: 50 + filesOffset: 0, + filesOffsetEnd: 50, + filesPerPage: 50 }; }, computed: { @@ -250,18 +254,18 @@ export default { return this.$store.state.user; }, blank() { - return require('@/assets/images/blank.png'); + return require('@/assets/images/blank2.jpg'); }, gridFiles() { - return this.files.slice(this.filesOffsetWaterfall, this.filesOffsetEndWaterfall); + return this.files.slice(this.filesOffset, this.filesOffsetEnd); }, moreFiles() { - return this.files.length > this.filesOffsetEndWaterfall; + return this.files.length > this.filesOffsetEnd; } }, methods: { - loadMoreFilesWaterfall() { - this.filesOffsetEndWaterfall = this.filesOffsetEndWaterfall + this.filesPerPageWaterfall; + loadMoreFiles() { + this.filesOffsetEnd = this.filesOffsetEnd + this.filesPerPage; }, async search() { const data = await this.$search.do(this.searchTerm, [ |