fix: prohibit create first page besides local workspace (#1751)
This commit is contained in:
@@ -35,6 +35,10 @@ const AllPage: NextPageWithLayout = () => {
|
|||||||
if (!currentWorkspace) {
|
if (!currentWorkspace) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (currentWorkspace.flavour !== WorkspaceFlavour.LOCAL) {
|
||||||
|
// only create a new page for local workspace
|
||||||
|
return;
|
||||||
|
}
|
||||||
const localProvider = currentWorkspace.providers.find(
|
const localProvider = currentWorkspace.providers.find(
|
||||||
provider => provider.flavour === 'local-indexeddb'
|
provider => provider.flavour === 'local-indexeddb'
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ test.describe('affine built in workspace', () => {
|
|||||||
await page.getByText('Cloud Workspace').click();
|
await page.getByText('Cloud Workspace').click();
|
||||||
const page2 = await context.newPage();
|
const page2 = await context.newPage();
|
||||||
await openHomePage(page2);
|
await openHomePage(page2);
|
||||||
await waitMarkdownImported(page2);
|
|
||||||
await loginUser(page2, b);
|
await loginUser(page2, b);
|
||||||
await page2.reload();
|
await page2.reload();
|
||||||
await clickSideBarCurrentWorkspaceBanner(page2);
|
await clickSideBarCurrentWorkspaceBanner(page2);
|
||||||
|
|||||||
Reference in New Issue
Block a user