mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
chore: bump version (#1404)
This commit is contained in:
@@ -61,7 +61,7 @@ const ListPageInner: React.FC<{
|
||||
<NavContainer>
|
||||
<Breadcrumbs>
|
||||
<StyledBreadcrumbs
|
||||
href={`/public-workspace/${blockSuiteWorkspace.room}`}
|
||||
href={`/public-workspace/${blockSuiteWorkspace.id}`}
|
||||
>
|
||||
<WorkspaceAvatar size={24} name={name} avatar={avatar} />
|
||||
<span>{name}</span>
|
||||
|
||||
@@ -90,15 +90,13 @@ const PublicWorkspaceDetailPageInner: React.FC<{
|
||||
<NavContainer>
|
||||
<Breadcrumbs>
|
||||
<StyledBreadcrumbs
|
||||
href={`/public-workspace/${blockSuiteWorkspace.room}`}
|
||||
href={`/public-workspace/${blockSuiteWorkspace.id}`}
|
||||
>
|
||||
<WorkspaceAvatar size={24} name={name} avatar={avatar} />
|
||||
<span>{name}</span>
|
||||
</StyledBreadcrumbs>
|
||||
<StyledBreadcrumbs
|
||||
href={`/public-workspace/${
|
||||
blockSuiteWorkspace.room as string
|
||||
}/${pageId}`}
|
||||
href={`/public-workspace/${blockSuiteWorkspace.id}/${pageId}`}
|
||||
>
|
||||
<PaperIcon fontSize={24} />
|
||||
<span>{pageTitle ? pageTitle : t('Untitled')}</span>
|
||||
|
||||
@@ -25,29 +25,23 @@ const AllPage: NextPageWithLayout = () => {
|
||||
if (!router.isReady) {
|
||||
return;
|
||||
}
|
||||
if (currentWorkspace) {
|
||||
const doc = currentWorkspace.blockSuiteWorkspace.doc;
|
||||
if (doc.store.clients.size === 1) {
|
||||
const items = [...doc.store.clients.values()][0];
|
||||
if (items.length <= 1) {
|
||||
// this is a new workspace, so we should redirect to the new page
|
||||
const pageId = nanoid();
|
||||
currentWorkspace.blockSuiteWorkspace.slots.pageAdded.once(id => {
|
||||
currentWorkspace.blockSuiteWorkspace.setPageMeta(id, {
|
||||
init: true,
|
||||
});
|
||||
assertExists(pageId, id);
|
||||
router.push({
|
||||
pathname: '/workspace/[workspaceId]/[pageId]',
|
||||
query: {
|
||||
workspaceId: currentWorkspace.id,
|
||||
pageId,
|
||||
},
|
||||
});
|
||||
});
|
||||
currentWorkspace.blockSuiteWorkspace.createPage(pageId);
|
||||
}
|
||||
}
|
||||
if (currentWorkspace?.blockSuiteWorkspace.isEmpty) {
|
||||
// this is a new workspace, so we should redirect to the new page
|
||||
const pageId = nanoid();
|
||||
currentWorkspace.blockSuiteWorkspace.slots.pageAdded.once(id => {
|
||||
currentWorkspace.blockSuiteWorkspace.setPageMeta(id, {
|
||||
init: true,
|
||||
});
|
||||
assertExists(pageId, id);
|
||||
router.push({
|
||||
pathname: '/workspace/[workspaceId]/[pageId]',
|
||||
query: {
|
||||
workspaceId: currentWorkspace.id,
|
||||
pageId,
|
||||
},
|
||||
});
|
||||
});
|
||||
currentWorkspace.blockSuiteWorkspace.createPage(pageId);
|
||||
}
|
||||
}, [currentWorkspace, router]);
|
||||
const onClickPage = useCallback(
|
||||
|
||||
Reference in New Issue
Block a user