mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-20 15:57:06 +08:00
fix: add missing trashDate field whenever a page is moved to the trash. (#1389)
Co-authored-by: himself65 <himself65@outlook.com>
This commit is contained in:
@@ -19,7 +19,9 @@ export const DateCell = ({
|
||||
const value = pageMeta[dateKey] ?? pageMeta[backupKey];
|
||||
return (
|
||||
<TableCell ellipsis={true} {...props}>
|
||||
{value ? dayjs(value as string).format('YYYY-MM-DD HH:mm') : '--'}
|
||||
{typeof value === 'number'
|
||||
? dayjs(value).format('YYYY-MM-DD HH:mm')
|
||||
: '--'}
|
||||
</TableCell>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -212,6 +212,7 @@ export const PageList: React.FC<PageListProps> = ({
|
||||
onToggleTrashPage={() => {
|
||||
helper.setPageMeta(pageMeta.id, {
|
||||
trash: !pageMeta.trash,
|
||||
trashDate: +new Date(),
|
||||
});
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user