aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/services
diff options
context:
space:
mode:
Diffstat (limited to 'viewer/src/services')
-rw-r--r--viewer/src/services/itemComparators.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/viewer/src/services/itemComparators.ts b/viewer/src/services/itemComparators.ts
index 64ce288..e131b8b 100644
--- a/viewer/src/services/itemComparators.ts
+++ b/viewer/src/services/itemComparators.ts
@@ -23,10 +23,10 @@ export type ItemComparator = (left: Gallery.Item, right: Gallery.Item) => number
23export type ItemSort = { name: Gallery.ItemSortStr; text: TranslateResult; fn: ItemComparator }; 23export type ItemSort = { name: Gallery.ItemSortStr; text: TranslateResult; fn: ItemComparator };
24 24
25export default class ItemComparators { 25export default class ItemComparators {
26 static readonly DEFAULT = ItemComparators.sortByNameAsc; 26 static readonly DEFAULT = ItemComparators.sortByTitleAsc;
27 27
28 static readonly ITEM_SORTS: ItemSort[] = [ 28 static readonly ITEM_SORTS: ItemSort[] = [
29 { name: "name_asc", text: i18n.t("command.sort.byNameAsc"), fn: ItemComparators.sortByNameAsc }, 29 { name: "title_asc", text: i18n.t("command.sort.byTitleAsc"), fn: ItemComparators.sortByTitleAsc },
30 { name: "date_asc", text: i18n.t("command.sort.byDateAsc"), fn: ItemComparators.sortByDateAsc }, 30 { name: "date_asc", text: i18n.t("command.sort.byDateAsc"), fn: ItemComparators.sortByDateAsc },
31 { 31 {
32 name: "date_desc", 32 name: "date_desc",
@@ -35,7 +35,7 @@ export default class ItemComparators {
35 }, 35 },
36 ]; 36 ];
37 37
38 static sortByNameAsc(left: Gallery.Item, right: Gallery.Item): number { 38 static sortByTitleAsc(left: Gallery.Item, right: Gallery.Item): number {
39 return left.title.localeCompare(right.title, undefined, { 39 return left.title.localeCompare(right.title, undefined, {
40 sensitivity: "base", 40 sensitivity: "base",
41 ignorePunctuation: true, 41 ignorePunctuation: true,