aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/components/LdGallery.vue
diff options
context:
space:
mode:
authorZero~Informatique2020-06-19 22:12:03 +0200
committerZero~Informatique2020-06-19 22:12:03 +0200
commit69dc0d20706ed41e5ecdbb77515066d8a7d7703b (patch)
tree8b69fcb1d4a96290134980e75281563f8b4c271e /viewer/src/components/LdGallery.vue
parenta053076d692be5e3698fe1a2c071d077cb4b6b73 (diff)
downloadldgallery-69dc0d20706ed41e5ecdbb77515066d8a7d7703b.tar.gz
viewer: code update (no functional change)
Types { [x: T]: R } updated to Record<T, R> Methods in template updated to getters (computed in VueJS), which are reactive and cached Code formatting
Diffstat (limited to 'viewer/src/components/LdGallery.vue')
-rw-r--r--viewer/src/components/LdGallery.vue4
1 files changed, 2 insertions, 2 deletions
diff --git a/viewer/src/components/LdGallery.vue b/viewer/src/components/LdGallery.vue
index e512758..5a72d99 100644
--- a/viewer/src/components/LdGallery.vue
+++ b/viewer/src/components/LdGallery.vue
@@ -18,7 +18,7 @@
18--> 18-->
19 19
20<template> 20<template>
21 <ld-error v-if="hasNoResults()" icon="search" :message="noresult" /> 21 <ld-error v-if="hasNoResults" icon="search" :message="noresult" />
22 <div v-else class="thumbnail-tiles"> 22 <div v-else class="thumbnail-tiles">
23 <router-link v-for="item in items" :key="item.path" :to="item.path"> 23 <router-link v-for="item in items" :key="item.path" :to="item.path">
24 <ld-thumbnail :item="item" /> 24 <ld-thumbnail :item="item" />
@@ -35,7 +35,7 @@ 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 hasNoResults(): boolean {
39 return Boolean(this.noresult) && this.items.length === 0; 39 return Boolean(this.noresult) && this.items.length === 0;
40 } 40 }
41} 41}