From 26210d495aed813baac1095b5c7a7c7879d2d206 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 25 Sep 2020 10:42:33 +0200
Subject: viewer: refactor how the available sorts are stored
github: resolves #259
---
viewer/src/components/LdCommandSort.vue | 13 ++++++-------
viewer/src/components/LdGallery.vue | 2 +-
2 files changed, 7 insertions(+), 8 deletions(-)
(limited to 'viewer/src/components')
diff --git a/viewer/src/components/LdCommandSort.vue b/viewer/src/components/LdCommandSort.vue
index 30644c1..cfaa5c1 100644
--- a/viewer/src/components/LdCommandSort.vue
+++ b/viewer/src/components/LdCommandSort.vue
@@ -23,8 +23,8 @@
-
-
+
+
{{ sort.text }}
@@ -32,19 +32,18 @@
diff --git a/viewer/src/components/LdGallery.vue b/viewer/src/components/LdGallery.vue
index 0c0a43c..edd479c 100644
--- a/viewer/src/components/LdGallery.vue
+++ b/viewer/src/components/LdGallery.vue
@@ -36,7 +36,7 @@ export default class LdPicture extends Vue {
@Prop(String) readonly noresult?: string;
get sortedItems() {
- return this.items.sort(this.$uiStore.sortFn);
+ return this.items.sort(this.$uiStore.sort.fn);
}
get hasNoResults(): boolean {
--
cgit v1.2.3