fix: sorting by a date column shows the oldest entries first (#35279)

Switching the sort to a date column put the oldest entries first in the admin user list, a group's member list, feedbacks, the archived, shared and per-user chat lists, the file manager and the file browser, so the entries people usually look for ended up at the end. Date columns now sort newest first when picked, like the workspace lists already do. Clicking again still flips the order.

Fixes #35278
This commit is contained in:
Classic298 authored and GitHub committed 2026-11-30 18:42:34 +04:00
1 parent 9f7c08ff7f
commit 8713ff860b
7 files changed
+7 -7

No files matched your search

@@ -53,7 +53,7 @@
direction = direction === 'asc' ? 'desc' : 'asc';
} else {
orderBy = key;
direction = 'asc';
direction = key === 'updated_at' ? 'desc' : 'asc';
}
page = 1;
};
@@ -109,7 +109,7 @@
direction = direction === 'asc' ? 'desc' : 'asc';
} else {
orderBy = key;
direction = 'asc';
direction = key === 'last_active_at' ? 'desc' : 'asc';
}
page = 1;
};
@@ -84,7 +84,7 @@
direction = direction === 'asc' ? 'desc' : 'asc';
} else {
orderBy = key;
direction = 'asc';
direction = key === 'created_at' || key === 'last_active_at' ? 'desc' : 'asc';
}
page = 1;
};
+1 -1
View File
@@ -569,7 +569,7 @@
sortAsc = !sortAsc;
} else {
sortBy = mode;
sortAsc = true;
sortAsc = mode !== 'date' && mode !== 'created';
}
void refreshBrowser();
};
@@ -121,7 +121,7 @@
direction = direction === 'asc' ? 'desc' : 'asc';
} else {
orderBy = key;
direction = 'asc';
direction = key === 'updated_at' ? 'desc' : 'asc';
}
await loadChats();
+1 -1
View File
@@ -70,7 +70,7 @@
direction = direction === 'asc' ? 'desc' : 'asc';
} else {
orderBy = key;
direction = 'asc';
direction = key === 'updated_at' ? 'desc' : 'asc';
}
};
+1 -1
View File
@@ -438,7 +438,7 @@
disabled={busy}
class="hidden items-center justify-end gap-1 hover:text-base-700 dark:hover:text-base-200 sm:flex"
on:click={() => {
direction = orderBy === 'created_at' && direction === 'asc' ? 'desc' : 'asc';
direction = orderBy === 'created_at' && direction === 'desc' ? 'asc' : 'desc';
orderBy = 'created_at';
}}
>