mirror of https://github.com/fantasticit/think.git
feat: move documents share management to wiki/[wikiId]/documents
This commit is contained in:
parent
94f3fd7981
commit
ed78cfe8ad
|
@ -13,7 +13,7 @@ interface IProps {
|
||||||
wikiId: string;
|
wikiId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Documents: React.FC<IProps> = ({ wikiId }) => {
|
export const WikiDocumentsShare: React.FC<IProps> = ({ wikiId }) => {
|
||||||
const { data: wiki, loading: wikiLoading, toggleStatus: toggleWorkspaceStatus } = useWikiDetail(wikiId);
|
const { data: wiki, loading: wikiLoading, toggleStatus: toggleWorkspaceStatus } = useWikiDetail(wikiId);
|
||||||
const { data: tocs, loading } = useWikiTocs(wikiId);
|
const { data: tocs, loading } = useWikiTocs(wikiId);
|
||||||
const documents = useMemo(
|
const documents = useMemo(
|
|
@ -4,7 +4,6 @@ import { Seo } from 'components/seo';
|
||||||
import { useWikiDetail } from 'data/wiki';
|
import { useWikiDetail } from 'data/wiki';
|
||||||
import { Base } from './base';
|
import { Base } from './base';
|
||||||
import { Users } from './users';
|
import { Users } from './users';
|
||||||
import { Documents } from './documents';
|
|
||||||
import { More } from './more';
|
import { More } from './more';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
|
@ -16,7 +15,6 @@ interface IProps {
|
||||||
const TitleMap = {
|
const TitleMap = {
|
||||||
base: '基础信息',
|
base: '基础信息',
|
||||||
users: '成员管理',
|
users: '成员管理',
|
||||||
docs: '隐私管理',
|
|
||||||
more: '更多',
|
more: '更多',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -33,9 +31,6 @@ export const WikiSetting: React.FC<IProps> = ({ wikiId, tab, onNavigate }) => {
|
||||||
<TabPane tab={TitleMap['users']} itemKey="users">
|
<TabPane tab={TitleMap['users']} itemKey="users">
|
||||||
<Users wikiId={wikiId} />
|
<Users wikiId={wikiId} />
|
||||||
</TabPane>
|
</TabPane>
|
||||||
<TabPane tab={TitleMap['docs']} itemKey="docs">
|
|
||||||
<Documents wikiId={wikiId} />
|
|
||||||
</TabPane>
|
|
||||||
<TabPane tab={TitleMap['more']} itemKey="more">
|
<TabPane tab={TitleMap['more']} itemKey="more">
|
||||||
<More wikiId={wikiId} />
|
<More wikiId={wikiId} />
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
|
|
@ -11,6 +11,7 @@ import { WikiTocsManager } from 'components/wiki/tocs/manager';
|
||||||
import { DocumentCardPlaceholder, DocumentCard } from 'components/document/card';
|
import { DocumentCardPlaceholder, DocumentCard } from 'components/document/card';
|
||||||
import { Empty } from 'components/empty';
|
import { Empty } from 'components/empty';
|
||||||
import { DocumentCreator } from 'components/document-creator';
|
import { DocumentCreator } from 'components/document-creator';
|
||||||
|
import { WikiDocumentsShare } from 'components/wiki/documents-share';
|
||||||
import { useWikiDocs } from 'data/wiki';
|
import { useWikiDocs } from 'data/wiki';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
|
@ -62,6 +63,12 @@ const AllDocs = ({ wikiId }) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const TitleMap = {
|
||||||
|
tocs: '目录管理',
|
||||||
|
share: '隐私管理',
|
||||||
|
documents: '全部文档',
|
||||||
|
};
|
||||||
|
|
||||||
const Page: NextPage<IProps> = ({ wikiId }) => {
|
const Page: NextPage<IProps> = ({ wikiId }) => {
|
||||||
const { query = {} } = useRouter();
|
const { query = {} } = useRouter();
|
||||||
const { tab = 'tocs' } = query as {
|
const { tab = 'tocs' } = query as {
|
||||||
|
@ -83,15 +90,15 @@ const Page: NextPage<IProps> = ({ wikiId }) => {
|
||||||
leftNode={<WikiTocs wikiId={wikiId} />}
|
leftNode={<WikiTocs wikiId={wikiId} />}
|
||||||
rightNode={
|
rightNode={
|
||||||
<div style={{ padding: '16px 24px' }}>
|
<div style={{ padding: '16px 24px' }}>
|
||||||
<Seo title={tab === 'documents' ? '全部文档' : '目录管理'} />
|
<Seo title={TitleMap[tab]} />
|
||||||
<Title heading={3} style={{ marginBottom: 24 }}>
|
<Tabs type="line" activeKey={tab} onChange={(tab) => navigate(tab)}>
|
||||||
文档管理
|
<TabPane tab={TitleMap['tocs']} itemKey="tocs">
|
||||||
</Title>
|
|
||||||
<Tabs type="button" activeKey={tab} onChange={(tab) => navigate(tab)}>
|
|
||||||
<TabPane tab="目录管理" itemKey="tocs">
|
|
||||||
<WikiTocsManager wikiId={wikiId} />
|
<WikiTocsManager wikiId={wikiId} />
|
||||||
</TabPane>
|
</TabPane>
|
||||||
<TabPane tab="全部文档" itemKey="documents">
|
<TabPane tab={TitleMap['share']} itemKey="share">
|
||||||
|
<WikiDocumentsShare wikiId={wikiId} />
|
||||||
|
</TabPane>
|
||||||
|
<TabPane tab={TitleMap['documents']} itemKey="documents">
|
||||||
<AllDocs wikiId={wikiId} />
|
<AllDocs wikiId={wikiId} />
|
||||||
</TabPane>
|
</TabPane>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
Loading…
Reference in New Issue