aboutsummaryrefslogtreecommitdiff
path: root/src/site/components/grid/Grid.vue
diff options
context:
space:
mode:
authorPitu <[email protected]>2020-06-25 02:14:11 +0900
committerPitu <[email protected]>2020-06-25 02:14:11 +0900
commit04319acf2056f44615fb32f64cc65bc759a15e23 (patch)
tree0f8dc1f9114de19e833bd2d002c017cb26fbc0d6 /src/site/components/grid/Grid.vue
parentHandle nuxt routes on page load (diff)
downloadhost.fuwn.me-04319acf2056f44615fb32f64cc65bc759a15e23.tar.xz
host.fuwn.me-04319acf2056f44615fb32f64cc65bc759a15e23.zip
Only display `Show more` button when there's more to show
Diffstat (limited to 'src/site/components/grid/Grid.vue')
-rw-r--r--src/site/components/grid/Grid.vue7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/site/components/grid/Grid.vue b/src/site/components/grid/Grid.vue
index 3b65011..da9b26c 100644
--- a/src/site/components/grid/Grid.vue
+++ b/src/site/components/grid/Grid.vue
@@ -93,7 +93,9 @@
</template>
</WaterfallItem>
</Waterfall>
- <button class="button is-primary"
+ <button
+ v-if="moreFiles"
+ class="button is-primary"
@click="loadMoreFilesWaterfall">Load more</button>
</template>
<div v-else>
@@ -252,6 +254,9 @@ export default {
},
gridFiles() {
return this.files.slice(this.filesOffsetWaterfall, this.filesOffsetEndWaterfall);
+ },
+ moreFiles() {
+ return this.files.length > this.filesOffsetEndWaterfall;
}
},
methods: {