aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/components/LdGallery.vue
diff options
context:
space:
mode:
authorpacien2020-09-25 16:01:49 +0200
committerpacien2020-09-25 16:01:49 +0200
commite93f7b1eb84c083d67567115284c0002a3a7d5fc (patch)
tree8d373e8f7f571485e1330928f43b090ed004c525 /viewer/src/components/LdGallery.vue
parent8e3ac8fe44bebb38e1882ca7f06b8100078ad88d (diff)
parentfd542f75a1d94ee5f804d0925823276b97f38581 (diff)
downloadldgallery-e93f7b1eb84c083d67567115284c0002a3a7d5fc.tar.gz
Merge branch 'develop' for release v2.0v2.0
Diffstat (limited to 'viewer/src/components/LdGallery.vue')
-rw-r--r--viewer/src/components/LdGallery.vue16
1 files changed, 9 insertions, 7 deletions
diff --git a/viewer/src/components/LdGallery.vue b/viewer/src/components/LdGallery.vue
index 29c18b9..edd479c 100644
--- a/viewer/src/components/LdGallery.vue
+++ b/viewer/src/components/LdGallery.vue
@@ -18,11 +18,11 @@
18--> 18-->
19 19
20<template> 20<template>
21 <div class="thumbnail-tiles"> 21 <ld-error v-if="hasNoResults" icon="search" :message="noresult" />
22 <router-link v-for="item in items" :key="item.path" :to="item.path"> 22 <div v-else class="thumbnail-tiles">
23 <router-link v-for="item in sortedItems" :key="item.path" :to="item.path">
23 <ld-thumbnail :item="item" /> 24 <ld-thumbnail :item="item" />
24 </router-link> 25 </router-link>
25 <div v-if="hasNoResults()" class="noresult">{{noresult}}</div>
26 </div> 26 </div>
27</template> 27</template>
28 28
@@ -35,7 +35,11 @@ export default class LdPicture extends Vue {
35 @Prop({ type: Array, required: true }) readonly items!: Gallery.Item[]; 35 @Prop({ type: Array, required: true }) readonly items!: Gallery.Item[];
36 @Prop(String) readonly noresult?: string; 36 @Prop(String) readonly noresult?: string;
37 37
38 hasNoResults(): boolean { 38 get sortedItems() {
39 return this.items.sort(this.$uiStore.sort.fn);
40 }
41
42 get hasNoResults(): boolean {
39 return Boolean(this.noresult) && this.items.length === 0; 43 return Boolean(this.noresult) && this.items.length === 0;
40 } 44 }
41} 45}
@@ -47,11 +51,9 @@ export default class LdPicture extends Vue {
47 flex-wrap: wrap; 51 flex-wrap: wrap;
48 align-items: center; 52 align-items: center;
49 justify-content: space-evenly; 53 justify-content: space-evenly;
54
50 & > a { 55 & > a {
51 margin: 2px; 56 margin: 2px;
52 } 57 }
53 & .noresult {
54 margin-top: 40px;
55 }
56} 58}
57</style> 59</style>