From c7b5f3fe5f7e909998c10c07a620d6f90492ea89 Mon Sep 17 00:00:00 2001
From: "Kilu.He" <108015703+qinluhe@users.noreply.github.com>
Date: Fri, 10 Jan 2025 15:41:43 +0800
Subject: [PATCH] feat: reopen the publish portal (#13)
---
src/components/app/share/ShareTabs.tsx | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/components/app/share/ShareTabs.tsx b/src/components/app/share/ShareTabs.tsx
index 9e0a9951..93a9c5c6 100644
--- a/src/components/app/share/ShareTabs.tsx
+++ b/src/components/app/share/ShareTabs.tsx
@@ -1,5 +1,5 @@
import { useAppView } from '@/components/app/app.hooks';
-// import PublishPanel from '@/components/app/share/PublishPanel';
+import PublishPanel from '@/components/app/share/PublishPanel';
import TemplatePanel from '@/components/app/share/TemplatePanel';
import SharePanel from '@/components/app/share/SharePanel';
import { useCurrentUser } from '@/components/main/app.hooks';
@@ -8,7 +8,7 @@ import { useTranslation } from 'react-i18next';
import { ViewTabs, ViewTab, TabPanel } from 'src/components/_shared/tabs/ViewTabs';
import { ReactComponent as Templates } from '@/assets/template.svg';
-// import { ReactComponent as PublishedWithChanges } from '@/assets/published_with_changes.svg';
+import { ReactComponent as PublishedWithChanges } from '@/assets/published_with_changes.svg';
enum TabKey {
SHARE = 'share',
@@ -28,12 +28,13 @@ function ShareTabs ({ opened, viewId, onClose }: { opened: boolean, viewId: stri
label: t('shareAction.shareTab'),
Panel: SharePanel,
},
- // {
- // value: TabKey.PUBLISH,
- // label: t('shareAction.publish'),
- // icon: view?.is_published ? : undefined,
- // Panel: PublishPanel,
- // },
+ {
+ value: TabKey.PUBLISH,
+ label: t('shareAction.publish'),
+ icon: view?.is_published ?
+ : undefined,
+ Panel: PublishPanel,
+ },
currentUser?.email?.endsWith('appflowy.io') && view?.is_published && {
value: TabKey.TEMPLATE,
label: t('template.asTemplate'),