mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 18:26:05 +08:00
feat(core): add default group and order (#12526)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added default sorting and grouping by "Last Updated" for document views. - Introduced clearer group headers for documents grouped by creation or update date, displaying relative dates or appropriate fallback text. - **Improvements** - Enhanced date grouping headers with capitalized, user-friendly text and improved handling of missing dates. - Added a new localization for "Never updated" to improve clarity in document groupings. - Initialized document update timestamps at creation to improve date accuracy. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -55,6 +55,8 @@ export const RulesMode = ({
|
||||
showDragHandle: false,
|
||||
showMoreOperation: false,
|
||||
quickFavorite: true,
|
||||
groupBy: undefined,
|
||||
orderBy: undefined,
|
||||
})
|
||||
);
|
||||
|
||||
@@ -76,6 +78,11 @@ export const RulesMode = ({
|
||||
value: 'false',
|
||||
},
|
||||
],
|
||||
orderBy: {
|
||||
type: 'system',
|
||||
key: 'updatedAt',
|
||||
desc: true,
|
||||
},
|
||||
})
|
||||
.subscribe(rules => {
|
||||
setRulesPageIds(rules.groups.flatMap(group => group.items));
|
||||
|
||||
@@ -60,6 +60,8 @@ export const TrashPage = () => {
|
||||
quickFavorite: false,
|
||||
quickDeletePermanently: true,
|
||||
quickRestore: true,
|
||||
groupBy: undefined,
|
||||
orderBy: undefined,
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user