diff options
author | Zero~Informatique | 2020-01-31 07:59:58 +0100 |
---|---|---|
committer | Zero~Informatique | 2020-01-31 08:01:18 +0100 |
commit | 63e7ef894755deef318d9dcb129a94d34f33bdf2 (patch) | |
tree | 719204705226e5561c53ddbb4448f0447a75a1bb /viewer/src/views | |
parent | 1e0b65a0a4556810ad4a7acac764a57a7daf8cf0 (diff) | |
download | ldgallery-63e7ef894755deef318d9dcb129a94d34f33bdf2.tar.gz |
viewer: unknown types now show a question mark icon instead of a folder icon. this is unified with the breadcrumb
Diffstat (limited to 'viewer/src/views')
-rw-r--r-- | viewer/src/views/GalleryThumbnail.vue | 11 | ||||
-rw-r--r-- | viewer/src/views/TopBreadcrumb.vue | 9 |
2 files changed, 10 insertions, 10 deletions
diff --git a/viewer/src/views/GalleryThumbnail.vue b/viewer/src/views/GalleryThumbnail.vue index 2ed0bc2..2a372cd 100644 --- a/viewer/src/views/GalleryThumbnail.vue +++ b/viewer/src/views/GalleryThumbnail.vue | |||
@@ -22,13 +22,13 @@ | |||
22 | <v-lazy-image | 22 | <v-lazy-image |
23 | v-if="item.thumbnail" | 23 | v-if="item.thumbnail" |
24 | class="thumbnail" | 24 | class="thumbnail" |
25 | :src="pictureSrc" | 25 | :src="pictureSrc()" |
26 | :title="item.path" | 26 | :title="item.path" |
27 | @intersect="loading=true" | 27 | @intersect="loading=true" |
28 | @load="loading=false" | 28 | @load="loading=false" |
29 | /> | 29 | /> |
30 | <div v-else class="flex-column flex-center"> | 30 | <div v-else class="flex-column flex-center"> |
31 | <fa-icon icon="folder" size="4x" /> | 31 | <fa-icon :icon="getIcon()" size="4x" /> |
32 | {{item.title}} | 32 | {{item.title}} |
33 | </div> | 33 | </div> |
34 | </div> | 34 | </div> |
@@ -36,6 +36,7 @@ | |||
36 | 36 | ||
37 | <script lang="ts"> | 37 | <script lang="ts"> |
38 | import { Component, Vue, Prop } from "vue-property-decorator"; | 38 | import { Component, Vue, Prop } from "vue-property-decorator"; |
39 | import Tools from "@/tools"; | ||
39 | 40 | ||
40 | @Component | 41 | @Component |
41 | export default class GalleryThumbnail extends Vue { | 42 | export default class GalleryThumbnail extends Vue { |
@@ -43,9 +44,13 @@ export default class GalleryThumbnail extends Vue { | |||
43 | 44 | ||
44 | loading: boolean = false; | 45 | loading: boolean = false; |
45 | 46 | ||
46 | get pictureSrc() { | 47 | pictureSrc() { |
47 | return `${process.env.VUE_APP_DATA_URL}${this.item.thumbnail}`; | 48 | return `${process.env.VUE_APP_DATA_URL}${this.item.thumbnail}`; |
48 | } | 49 | } |
50 | |||
51 | getIcon() { | ||
52 | return Tools.getIcon(this.item); | ||
53 | } | ||
49 | } | 54 | } |
50 | </script> | 55 | </script> |
51 | 56 | ||
diff --git a/viewer/src/views/TopBreadcrumb.vue b/viewer/src/views/TopBreadcrumb.vue index eb7fdd1..9104b80 100644 --- a/viewer/src/views/TopBreadcrumb.vue +++ b/viewer/src/views/TopBreadcrumb.vue | |||
@@ -31,17 +31,12 @@ | |||
31 | 31 | ||
32 | <script lang="ts"> | 32 | <script lang="ts"> |
33 | import { Component, Vue } from "vue-property-decorator"; | 33 | import { Component, Vue } from "vue-property-decorator"; |
34 | import Tools from "@/tools"; | ||
34 | 35 | ||
35 | @Component | 36 | @Component |
36 | export default class TopBreadcrumb extends Vue { | 37 | export default class TopBreadcrumb extends Vue { |
37 | getIcon(item: Gallery.Item) { | 38 | getIcon(item: Gallery.Item) { |
38 | if (item.path.length <= 1) return "home"; | 39 | return Tools.getIcon(item); |
39 | switch (item.properties.type) { | ||
40 | case "picture": | ||
41 | return "image"; | ||
42 | case "directory": | ||
43 | return "folder"; | ||
44 | } | ||
45 | } | 40 | } |
46 | } | 41 | } |
47 | </script> | 42 | </script> |