There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
feat(comming-soon): add comming-soon
zhangchi48a5f52fb424
diff --git a/.eslintrc.json b/.eslintrc.jsonindex a277c50dc9..89fe5429c2 100644--- a/.eslintrc.json+++ b/.eslintrc.json@@ -61,7 +61,8 @@"onlyDependOnLibsWithTags": ["library:utils","components:icons",- "components:ui"+ "components:ui",+ "library:feature-flags"]},{diff --git a/libs/components/common/src/lib/comming-soon/CommingSoon.tsx b/libs/components/common/src/lib/comming-soon/CommingSoon.tsxnew file mode 100644index 0000000000..cf088a5677--- /dev/null+++ b/libs/components/common/src/lib/comming-soon/CommingSoon.tsx@@ -0,0 +1,13 @@+import { Tooltip } from '@toeverything/components/ui';+import { useFlag } from '@toeverything/datasource/feature-flags';+function CommingSoon(props: { children: JSX.Element }) {+ const BooleanCommingSoon = useFlag('BooleanCommingSoon', false);+ if (!BooleanCommingSoon) return <></>;+ return (+ <Tooltip content={'Comming Soon'} placement="top">+ {props.children}+ </Tooltip>+ );+}++export { CommingSoon };diff --git a/libs/components/common/src/lib/index.ts b/libs/components/common/src/lib/index.tsindex 928992e1cc..9a1eea5191 100644--- a/libs/components/common/src/lib/index.ts+++ b/libs/components/common/src/lib/index.ts@@ -49,3 +49,5 @@ export {FullScreenIcon,UnGroupIcon,} from './icon';++export * from './comming-soon/CommingSoon';diff --git a/libs/components/editor-blocks/src/blocks/group/GroupMenu.tsx b/libs/components/editor-blocks/src/blocks/group/GroupMenu.tsxindex 7ee5c22927..967b9b3afc 100644--- a/libs/components/editor-blocks/src/blocks/group/GroupMenu.tsx+++ b/libs/components/editor-blocks/src/blocks/group/GroupMenu.tsx@@ -29,6 +29,7 @@ import type { ActivePanel } from './types';import { useFlag } from '@toeverything/datasource/feature-flags';import { GroupBy } from './components/group-by/GroupBy';+import { CommingSoon } from '@toeverything/components/common';const GroupMenuWrapper = ({block,editor,@@ -107,7 +108,7 @@ const GroupMenuWrapper = ({// Table View// </IconButton>// )- <Tooltip content={'Comming Soon'} placement="top">+ <CommingSoon><IconButtonactive={scene === SCENE_CONFIG.TABLE}style={{ cursor: 'not-allowed' }}@@ -115,9 +116,9 @@ const GroupMenuWrapper = ({<TableIcon fontSize="small" />Table</IconButton>- </Tooltip>+ </CommingSoon>}- <Tooltip content={'Comming Soon'} placement="top">+ <CommingSoon><IconButtonactive={scene === SCENE_CONFIG.TABLE}style={{ cursor: 'not-allowed' }}@@ -125,8 +126,8 @@ const GroupMenuWrapper = ({<KanBanIcon fontSize="small" />Calendar</IconButton>- </Tooltip>- <Tooltip content={'Comming Soon'} placement="top">+ </CommingSoon>+ <CommingSoon><IconButtonactive={scene === SCENE_CONFIG.TABLE}style={{ cursor: 'not-allowed' }}@@ -134,8 +135,8 @@ const GroupMenuWrapper = ({<TableIcon fontSize="small" />Timeline</IconButton>- </Tooltip>- <Tooltip content={'Comming Soon'} placement="top">+ </CommingSoon>+ <CommingSoon><IconButtonactive={scene === SCENE_CONFIG.TABLE}style={{ cursor: 'not-allowed' }}@@ -143,7 +144,7 @@ const GroupMenuWrapper = ({<KanBanIcon fontSize="small" />BI</IconButton>- </Tooltip>+ </CommingSoon>{// Closed beta period temporarily