From 69dc0d20706ed41e5ecdbb77515066d8a7d7703b Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 19 Jun 2020 22:12:03 +0200 Subject: viewer: code update (no functional change) Types { [x: T]: R } updated to Record Methods in template updated to getters (computed in VueJS), which are reactive and cached Code formatting --- viewer/src/components/LdThumbnail.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'viewer/src/components/LdThumbnail.vue') diff --git a/viewer/src/components/LdThumbnail.vue b/viewer/src/components/LdThumbnail.vue index bfcc595..0ddeb6b 100644 --- a/viewer/src/components/LdThumbnail.vue +++ b/viewer/src/components/LdThumbnail.vue @@ -22,14 +22,14 @@
- +
{{item.title}}
@@ -50,12 +50,12 @@ export default class LdThumbnail extends Vue { return this.$galleryStore.resourceRoot + resource; } - pictureStyle() { + get pictureStyle() { const resolution = this.item.thumbnail!.resolution; return { width: `${resolution.width}px`, height: `${resolution.height}px` }; } - getIcon() { + get icon() { return Navigation.getIcon(this.item); } } -- cgit v1.2.3