mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 08:53:27 +03:00
chore(core): temporarily remove set-syncing-mode (#4489)
This commit is contained in:
parent
29fa237dfb
commit
1b6cd70247
@ -269,7 +269,8 @@ export const CreateWorkspaceModal = ({
|
|||||||
const result: LoadDBFileResult = await window.apis.dialog.loadDBFile();
|
const result: LoadDBFileResult = await window.apis.dialog.loadDBFile();
|
||||||
if (result.workspaceId && !canceled) {
|
if (result.workspaceId && !canceled) {
|
||||||
setAddedId(result.workspaceId);
|
setAddedId(result.workspaceId);
|
||||||
setStep('set-syncing-mode');
|
const newWorkspaceId = await addLocalWorkspace(result.workspaceId);
|
||||||
|
onCreate(newWorkspaceId);
|
||||||
} else if (result.error || result.canceled) {
|
} else if (result.error || result.canceled) {
|
||||||
if (result.error) {
|
if (result.error) {
|
||||||
toast(t[result.error]());
|
toast(t[result.error]());
|
||||||
@ -287,7 +288,7 @@ export const CreateWorkspaceModal = ({
|
|||||||
return () => {
|
return () => {
|
||||||
canceled = true;
|
canceled = true;
|
||||||
};
|
};
|
||||||
}, [mode, onClose, t]);
|
}, [addLocalWorkspace, mode, onClose, onCreate, t]);
|
||||||
|
|
||||||
const onConfirmEnableCloudSyncing = useCallback(
|
const onConfirmEnableCloudSyncing = useCallback(
|
||||||
(enableCloudSyncing: boolean) => {
|
(enableCloudSyncing: boolean) => {
|
||||||
@ -332,19 +333,11 @@ export const CreateWorkspaceModal = ({
|
|||||||
const onConfirmName = useCallback(
|
const onConfirmName = useCallback(
|
||||||
(name: string) => {
|
(name: string) => {
|
||||||
setWorkspaceName(name);
|
setWorkspaceName(name);
|
||||||
if (environment.isDesktop && runtimeConfig.enableSQLiteProvider) {
|
|
||||||
setStep('set-syncing-mode');
|
|
||||||
} else {
|
|
||||||
// this will be the last step for web for now
|
// this will be the last step for web for now
|
||||||
// fix me later
|
// fix me later
|
||||||
createLocalWorkspace(name)
|
createLocalWorkspace(name).then(id => {
|
||||||
.then(id => {
|
|
||||||
onCreate(id);
|
onCreate(id);
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
logger.error(err);
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
},
|
},
|
||||||
[createLocalWorkspace, onCreate]
|
[createLocalWorkspace, onCreate]
|
||||||
);
|
);
|
||||||
|
@ -161,9 +161,9 @@ test('delete workspace', async ({ page }) => {
|
|||||||
await page.getByTestId('create-workspace-create-button').click({
|
await page.getByTestId('create-workspace-create-button').click({
|
||||||
delay: 100,
|
delay: 100,
|
||||||
});
|
});
|
||||||
await page.getByTestId('create-workspace-continue-button').click({
|
// await page.getByTestId('create-workspace-continue-button').click({
|
||||||
delay: 100,
|
// delay: 100,
|
||||||
});
|
// });
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(1000);
|
||||||
await clickSideBarSettingButton(page);
|
await clickSideBarSettingButton(page);
|
||||||
await page.getByTestId('current-workspace-label').click();
|
await page.getByTestId('current-workspace-label').click();
|
||||||
|
@ -98,8 +98,8 @@ test.fixme('export then add', async ({ page, appInfo, workspace }) => {
|
|||||||
await page.getByTestId('add-workspace').click();
|
await page.getByTestId('add-workspace').click();
|
||||||
|
|
||||||
// should show "Added Successfully" dialog
|
// should show "Added Successfully" dialog
|
||||||
await page.waitForSelector('text="Added Successfully"');
|
// await page.waitForSelector('text="Added Successfully"');
|
||||||
await page.getByTestId('create-workspace-continue-button').click();
|
// await page.getByTestId('create-workspace-continue-button').click();
|
||||||
|
|
||||||
// sleep for a while to wait for the workspace to be added :D
|
// sleep for a while to wait for the workspace to be added :D
|
||||||
await page.waitForTimeout(2000);
|
await page.waitForTimeout(2000);
|
||||||
|
@ -19,9 +19,9 @@ export async function createLocalWorkspace(
|
|||||||
// open create workspace modal
|
// open create workspace modal
|
||||||
await page.getByTestId('new-workspace').click();
|
await page.getByTestId('new-workspace').click();
|
||||||
|
|
||||||
const isDesktop: boolean = await page.evaluate(() => {
|
// const isDesktop: boolean = await page.evaluate(() => {
|
||||||
return !!window.appInfo?.electron;
|
// return !!window.appInfo?.electron;
|
||||||
}, []);
|
// }, []);
|
||||||
|
|
||||||
// input workspace name
|
// input workspace name
|
||||||
await page.getByPlaceholder('Set a Workspace name').click();
|
await page.getByPlaceholder('Set a Workspace name').click();
|
||||||
@ -32,7 +32,7 @@ export async function createLocalWorkspace(
|
|||||||
delay: 500,
|
delay: 500,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isDesktop) {
|
// if (isDesktop) {
|
||||||
await page.getByTestId('create-workspace-continue-button').click();
|
// await page.getByTestId('create-workspace-continue-button').click();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user