From e6c2a8d9653ffde924632ca2f260c3a8cddc14ed Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 11 Sep 2020 00:15:04 +0200
Subject: viewer: item display order
github: resolves #28
---
viewer/src/components/LdCommand.vue | 1 +
viewer/src/components/LdCommandSort.vue | 57 +++++++++++++++++++++++++++++++++
viewer/src/components/LdGallery.vue | 6 +++-
3 files changed, 63 insertions(+), 1 deletion(-)
create mode 100644 viewer/src/components/LdCommandSort.vue
(limited to 'viewer/src/components')
diff --git a/viewer/src/components/LdCommand.vue b/viewer/src/components/LdCommand.vue
index d3705de..6059162 100644
--- a/viewer/src/components/LdCommand.vue
+++ b/viewer/src/components/LdCommand.vue
@@ -23,6 +23,7 @@
+
.
+-->
+
+
+
+
+
+
+
+
+ {{ sort.name }}
+
+
+
+
+
+
+
diff --git a/viewer/src/components/LdGallery.vue b/viewer/src/components/LdGallery.vue
index 5a72d99..0c0a43c 100644
--- a/viewer/src/components/LdGallery.vue
+++ b/viewer/src/components/LdGallery.vue
@@ -20,7 +20,7 @@
-
+
@@ -35,6 +35,10 @@ export default class LdPicture extends Vue {
@Prop({ type: Array, required: true }) readonly items!: Gallery.Item[];
@Prop(String) readonly noresult?: string;
+ get sortedItems() {
+ return this.items.sort(this.$uiStore.sortFn);
+ }
+
get hasNoResults(): boolean {
return Boolean(this.noresult) && this.items.length === 0;
}
--
cgit v1.2.3