diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2023-03-24 09:41:40 +0100 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2023-04-06 14:49:31 +0200 |
commit | 3c3050c76f86c7a8cc2f217f9305cb1051e0eca0 (patch) | |
tree | d9656a549b1db4c7f3d37549713a6c96da616464 /apps/files_trashbin/src | |
parent | 0b4da6117fff4d999cb492503a8b6fc04eb75f9d (diff) | |
download | nextcloud-server-3c3050c76f86c7a8cc2f217f9305cb1051e0eca0.tar.gz nextcloud-server-3c3050c76f86c7a8cc2f217f9305cb1051e0eca0.zip |
feat(files): implement sorting per view
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_trashbin/src')
-rw-r--r-- | apps/files_trashbin/src/main.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files_trashbin/src/main.ts b/apps/files_trashbin/src/main.ts index 7cd6cf850f8..13b37836774 100644 --- a/apps/files_trashbin/src/main.ts +++ b/apps/files_trashbin/src/main.ts @@ -20,6 +20,7 @@ * */ import type NavigationService from '../../files/src/services/Navigation' +import type { Navigation } from '../../files/src/services/Navigation' import { translate as t, translate } from '@nextcloud/l10n' import DeleteSvg from '@mdi/svg/svg/delete.svg?raw' @@ -39,6 +40,8 @@ Navigation.register({ order: 50, sticky: true, + defaultSortKey: 'deleted', + columns: [ { id: 'deleted', @@ -57,10 +60,10 @@ Navigation.register({ sort(nodeA, nodeB) { const deletionTimeA = nodeA.attributes?.['trashbin-deletion-time'] || nodeA?.mtime || 0 const deletionTimeB = nodeB.attributes?.['trashbin-deletion-time'] || nodeB?.mtime || 0 - return deletionTimeA - deletionTimeB + return deletionTimeB - deletionTimeA }, }, ], getContents, -}) +} as Navigation) |