diff options
Diffstat (limited to 'viewer/src/views/GalleryDirectory.vue')
-rw-r--r-- | viewer/src/views/GalleryDirectory.vue | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/viewer/src/views/GalleryDirectory.vue b/viewer/src/views/GalleryDirectory.vue index 1df0c4d..d01032d 100644 --- a/viewer/src/views/GalleryDirectory.vue +++ b/viewer/src/views/GalleryDirectory.vue | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | <template> | 20 | <template> |
21 | <div class="thumbnail-tiles"> | 21 | <div class="thumbnail-tiles"> |
22 | <div v-for="(item) in directory.properties.items" :key="item.path"> | 22 | <div v-for="(item) in orderedItems" :key="item.path"> |
23 | <router-link :to="item.path"> | 23 | <router-link :to="item.path"> |
24 | <gallery-thumbnail :item="item" /> | 24 | <gallery-thumbnail :item="item" /> |
25 | </router-link> | 25 | </router-link> |
@@ -32,13 +32,19 @@ | |||
32 | 32 | ||
33 | <script lang="ts"> | 33 | <script lang="ts"> |
34 | import { Component, Vue, Prop } from "vue-property-decorator"; | 34 | import { Component, Vue, Prop } from "vue-property-decorator"; |
35 | import Tools from "@/tools"; | ||
35 | import GalleryThumbnail from "./GalleryThumbnail.vue"; | 36 | import GalleryThumbnail from "./GalleryThumbnail.vue"; |
37 | import Gallery from "./Gallery.vue"; | ||
36 | 38 | ||
37 | @Component({ | 39 | @Component({ |
38 | components: { GalleryThumbnail }, | 40 | components: { GalleryThumbnail }, |
39 | }) | 41 | }) |
40 | export default class GalleryDirectory extends Vue { | 42 | export default class GalleryDirectory extends Vue { |
41 | @Prop({ required: true }) readonly directory!: Gallery.Directory; | 43 | @Prop({ required: true }) readonly directory!: Gallery.Directory; |
44 | |||
45 | get orderedItems() { | ||
46 | return Tools.directoriesFirst(this.directory.properties.items); | ||
47 | } | ||
42 | } | 48 | } |
43 | </script> | 49 | </script> |
44 | 50 | ||