Merge pull request #350 from toeverything/feature/sample-affine

feat(view-list): hide table view
This commit is contained in:
Chi Zhang 2022-08-31 21:44:00 +08:00 committed by GitHub
commit 02c3469ec7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 18 deletions

View File

@ -66,10 +66,10 @@ export const AddViewMenu = () => {
key={name} key={name}
active={viewType === scene} active={viewType === scene}
onClick={() => { onClick={() => {
if (scene === RecastScene.Table) { // if (scene === RecastScene.Table) {
// The table view is under progress // // The table view is under progress
return; // return;
} // }
setViewType(scene); setViewType(scene);
}} }}
style={{ textTransform: 'uppercase' }} style={{ textTransform: 'uppercase' }}

View File

@ -99,10 +99,10 @@ export const ViewsMenu = () => {
key={name} key={name}
active={viewType === scene} active={viewType === scene}
onClick={() => { onClick={() => {
if (scene === RecastScene.Table) { // if (scene === RecastScene.Table) {
// The table view is under progress // // The table view is under progress
return; // return;
} // }
setViewType(scene); setViewType(scene);
}} }}
style={{ textTransform: 'uppercase' }} style={{ textTransform: 'uppercase' }}

View File

@ -1,9 +1,5 @@
import { RecastScene } from '@toeverything/components/editor-core'; import { RecastScene } from '@toeverything/components/editor-core';
import { import { KanBanIcon, TodoListIcon } from '@toeverything/components/icons';
KanBanIcon,
TableIcon,
TodoListIcon,
} from '@toeverything/components/icons';
export const VIEW_LIST = [ export const VIEW_LIST = [
{ {
@ -16,9 +12,9 @@ export const VIEW_LIST = [
scene: RecastScene.Kanban, scene: RecastScene.Kanban,
icon: <KanBanIcon fontSize="small" />, icon: <KanBanIcon fontSize="small" />,
}, },
{ // {
name: 'Table', // name: 'Table',
scene: RecastScene.Table, // scene: RecastScene.Table,
icon: <TableIcon fontSize="small" />, // icon: <TableIcon fontSize="small" />,
}, // },
] as const; ] as const;