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
fix: should show sync tab for cloud workspace (#1072)
Peng Xiaoc69637fe9896
diff --git a/apps/web/src/pages/workspace/[workspaceId]/setting.tsx b/apps/web/src/pages/workspace/[workspaceId]/setting.tsxindex 93374c5a26..4dc3afc022 100644--- a/apps/web/src/pages/workspace/[workspaceId]/setting.tsx+++ b/apps/web/src/pages/workspace/[workspaceId]/setting.tsx@@ -17,6 +17,7 @@ import {MembersPage,PublishPage,ExportPage,+ SyncPage,} from '@/components/workspace-setting';import { SettingsIcon } from '@blocksuite/icons';import WorkspaceLayout from '@/components/workspace-layout';@@ -41,10 +42,11 @@ const useTabMap = () => {panelRender: workspace => <GeneralPage workspace={workspace} />,},// TODO: add it back for desktop version- // {- // name: t('Sync'),- // panelRender: workspace => <SyncPage workspace={workspace} />,- // },+ {+ id: 'Sync',+ name: t('Sync'),+ panelRender: workspace => <SyncPage workspace={workspace} />,+ },{id: 'Collaboration',name: t('Collaboration'),@@ -100,6 +102,7 @@ const WorkspaceSetting = () => {const currentWorkspace = useGlobalState(useCallback(store => store.currentDataCenterWorkspace, []));+ const user = useGlobalState(store => store.user);const { activeTabPanelRender, tabMap, handleTabChange, activeTab } =useTabMap();@@ -110,6 +113,10 @@ const WorkspaceSetting = () => {width: 0,});+ const shouldHideSyncTab =+ currentWorkspace?.owner?.id !== user?.id ||+ currentWorkspace?.provider === 'local';+useEffect(() => {const tabButton = document.querySelector(`[data-setting-tab-button="${activeTab}"]`@@ -134,6 +141,9 @@ const WorkspaceSetting = () => {<StyledSettingContainer><StyledTabButtonWrapper>{tabMap.map(({ id, name }) => {+ if (shouldHideSyncTab && id === 'Sync') {+ return null;+ }return (<WorkspaceSettingTagItemkey={id}