chore: remove favorite page (#2372)

This commit is contained in:
JimmFly
2023-05-15 23:41:38 +08:00
committed by LongYinan
parent 9c6e687113
commit 5c6655ab0e
6 changed files with 1 additions and 94 deletions

View File

@@ -19,7 +19,7 @@ import { pageListEmptyStyle } from './index.css';
export type BlockSuitePageListProps = {
blockSuiteWorkspace: BlockSuiteWorkspace;
listType: 'all' | 'trash' | 'favorite' | 'shared' | 'public';
listType: 'all' | 'trash' | 'shared' | 'public';
isPublic?: true;
onOpenPage: (pageId: string, newTab?: boolean) => void;
};
@@ -31,7 +31,6 @@ const filter = {
const parentMeta = allMetas.find(m => m.subpageIds?.includes(pageMeta.id));
return !parentMeta?.trash && pageMeta.trash;
},
favorite: (pageMeta: PageMeta) => pageMeta.favorite && !pageMeta.trash,
shared: (pageMeta: PageMeta) => pageMeta.isPublic && !pageMeta.trash,
};
@@ -52,9 +51,6 @@ const PageListEmpty = (props: {
if (listType === 'all') {
return t['emptyAllPages']();
}
if (listType === 'favorite') {
return t['emptyFavorite']();
}
if (listType === 'trash') {
return t['emptyTrash']();
}

View File

@@ -1,7 +1,6 @@
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import {
DeleteTemporarilyIcon,
FavoriteIcon,
FolderIcon,
SettingsIcon,
} from '@blocksuite/icons';
@@ -24,11 +23,6 @@ export const useSwitchToConfig = (
href: pathGenerator.all(workspaceId),
icon: FolderIcon,
},
{
title: t['Favorites'](),
href: pathGenerator.favorite(workspaceId),
icon: FavoriteIcon,
},
{
title: t['Workspace Settings'](),
href: pathGenerator.setting(workspaceId),

View File

@@ -40,7 +40,6 @@ export type RootAppSidebarProps = {
currentPath: string;
paths: {
all: (workspaceId: string) => string;
favorite: (workspaceId: string) => string;
trash: (workspaceId: string) => string;
setting: (workspaceId: string) => string;
shared: (workspaceId: string) => string;