aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/views/GalleryDirectory.vue
diff options
context:
space:
mode:
authorZero~Informatique2020-01-30 17:04:09 +0100
committerZero~Informatique2020-01-30 17:24:08 +0100
commit76af6cffce939ef3c9a0952e6f7adc234e92f782 (patch)
tree3b9ae6aa0f5b64b49c58904b670c9df34cbdd12e /viewer/src/views/GalleryDirectory.vue
parent234d0d13c767786393494810526a77d3d89b0e83 (diff)
downloadldgallery-76af6cffce939ef3c9a0952e6f7adc234e92f782.tar.gz
viewer: directories first and sorted by title in the navigation mode
Diffstat (limited to 'viewer/src/views/GalleryDirectory.vue')
-rw-r--r--viewer/src/views/GalleryDirectory.vue8
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">
34import { Component, Vue, Prop } from "vue-property-decorator"; 34import { Component, Vue, Prop } from "vue-property-decorator";
35import Tools from "@/tools";
35import GalleryThumbnail from "./GalleryThumbnail.vue"; 36import GalleryThumbnail from "./GalleryThumbnail.vue";
37import Gallery from "./Gallery.vue";
36 38
37@Component({ 39@Component({
38 components: { GalleryThumbnail }, 40 components: { GalleryThumbnail },
39}) 41})
40export default class GalleryDirectory extends Vue { 42export 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