chore: clean all page list (#2245)
This commit is contained in:
@@ -101,7 +101,6 @@ export const BlockSuitePageList: React.FC<BlockSuitePageListProps> = ({
|
|||||||
record[pageMeta.id] === 'edgeless' ? <EdgelessIcon /> : <PageIcon />,
|
record[pageMeta.id] === 'edgeless' ? <EdgelessIcon /> : <PageIcon />,
|
||||||
pageId: pageMeta.id,
|
pageId: pageMeta.id,
|
||||||
title: pageMeta.title,
|
title: pageMeta.title,
|
||||||
favorite: !!pageMeta.favorite,
|
|
||||||
createDate: formatDate(pageMeta.createDate),
|
createDate: formatDate(pageMeta.createDate),
|
||||||
updatedDate: formatDate(pageMeta.updatedDate),
|
updatedDate: formatDate(pageMeta.updatedDate),
|
||||||
onClickPage: () => onOpenPage(pageMeta.id),
|
onClickPage: () => onOpenPage(pageMeta.id),
|
||||||
|
|||||||
@@ -233,7 +233,6 @@ export type TrashListData = {
|
|||||||
pageId: string;
|
pageId: string;
|
||||||
icon: JSX.Element;
|
icon: JSX.Element;
|
||||||
title: string;
|
title: string;
|
||||||
favorite: boolean;
|
|
||||||
createDate: string;
|
createDate: string;
|
||||||
updatedDate?: string;
|
updatedDate?: string;
|
||||||
trashDate?: string;
|
trashDate?: string;
|
||||||
|
|||||||
@@ -50,10 +50,23 @@ AffineAllPageList.args = {
|
|||||||
favorite: false,
|
favorite: false,
|
||||||
icon: <PageIcon />,
|
icon: <PageIcon />,
|
||||||
isPublicPage: true,
|
isPublicPage: true,
|
||||||
title: 'Example Page',
|
title: 'Example Public Page with long title that will be truncated',
|
||||||
updatedDate: '2021-01-01',
|
|
||||||
createDate: '2021-01-01',
|
createDate: '2021-01-01',
|
||||||
trashDate: '2021-01-01',
|
updatedDate: '2021-01-01',
|
||||||
|
bookmarkPage: () => toast('Bookmark page'),
|
||||||
|
onClickPage: () => toast('Click page'),
|
||||||
|
onDisablePublicSharing: () => toast('Disable public sharing'),
|
||||||
|
onOpenPageInNewTab: () => toast('Open page in new tab'),
|
||||||
|
removeToTrash: () => toast('Remove to trash'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
pageId: '2',
|
||||||
|
favorite: true,
|
||||||
|
isPublicPage: false,
|
||||||
|
icon: <PageIcon />,
|
||||||
|
title: 'Favorited Page',
|
||||||
|
createDate: '2021-01-01',
|
||||||
|
updatedDate: '2021-01-01',
|
||||||
bookmarkPage: () => toast('Bookmark page'),
|
bookmarkPage: () => toast('Bookmark page'),
|
||||||
onClickPage: () => toast('Click page'),
|
onClickPage: () => toast('Click page'),
|
||||||
onDisablePublicSharing: () => toast('Disable public sharing'),
|
onDisablePublicSharing: () => toast('Disable public sharing'),
|
||||||
@@ -75,7 +88,6 @@ AffineTrashPageList.args = {
|
|||||||
list: [
|
list: [
|
||||||
{
|
{
|
||||||
pageId: '1',
|
pageId: '1',
|
||||||
favorite: false,
|
|
||||||
icon: <PageIcon />,
|
icon: <PageIcon />,
|
||||||
title: 'Example Page',
|
title: 'Example Page',
|
||||||
updatedDate: '2021-01-01',
|
updatedDate: '2021-01-01',
|
||||||
@@ -85,5 +97,16 @@ AffineTrashPageList.args = {
|
|||||||
onPermanentlyDeletePage: () => toast('Permanently delete page'),
|
onPermanentlyDeletePage: () => toast('Permanently delete page'),
|
||||||
onRestorePage: () => toast('Restore page'),
|
onRestorePage: () => toast('Restore page'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
pageId: '2',
|
||||||
|
icon: <PageIcon />,
|
||||||
|
title: 'Example Page with long title that will be truncated',
|
||||||
|
updatedDate: '2021-01-01',
|
||||||
|
createDate: '2021-01-01',
|
||||||
|
trashDate: '2021-01-01',
|
||||||
|
onClickPage: () => toast('Click page'),
|
||||||
|
onPermanentlyDeletePage: () => toast('Permanently delete page'),
|
||||||
|
onRestorePage: () => toast('Restore page'),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user