diff --git a/packages/frontend/core/src/desktop/dialogs/setting/workspace-setting/storage/export.tsx b/packages/frontend/core/src/desktop/dialogs/setting/workspace-setting/storage/export.tsx
index fea3962fc6..01be6627d5 100644
--- a/packages/frontend/core/src/desktop/dialogs/setting/workspace-setting/storage/export.tsx
+++ b/packages/frontend/core/src/desktop/dialogs/setting/workspace-setting/storage/export.tsx
@@ -2,12 +2,12 @@ import { notify } from '@affine/component';
import { SettingRow } from '@affine/component/setting-components';
import { Button } from '@affine/component/ui/button';
import { useAsyncCallback } from '@affine/core/components/hooks/affine-async-hooks';
-import { useSystemOnline } from '@affine/core/components/hooks/use-system-online';
import { DesktopApiService } from '@affine/core/modules/desktop-api';
import type { Workspace } from '@affine/core/modules/workspace';
import { useI18n } from '@affine/i18n';
import { universalId } from '@affine/nbstore';
import track from '@affine/track';
+import { ExportIcon } from '@blocksuite/icons/rc';
import { useService } from '@toeverything/infra';
import { useState } from 'react';
@@ -18,14 +18,11 @@ interface ExportPanelProps {
export const DesktopExportPanel = ({ workspace }: ExportPanelProps) => {
const t = useI18n();
const [saving, setSaving] = useState(false);
- const isOnline = useSystemOnline();
const desktopApi = useService(DesktopApiService);
const isLocalWorkspace = workspace.flavour === 'local';
const [fullSyncing, setFullSyncing] = useState(false);
- const [fullSynced, setFullSynced] = useState(false);
-
- const shouldWaitForFullSync = !isLocalWorkspace && isOnline && !fullSynced;
+ const [fullSynced, setFullSynced] = useState(isLocalWorkspace);
const fullSync = useAsyncCallback(async () => {
setFullSyncing(true);
@@ -65,36 +62,55 @@ export const DesktopExportPanel = ({ workspace }: ExportPanelProps) => {
}
}, [desktopApi, saving, t, workspace]);
- if (shouldWaitForFullSync) {
+ if (fullSynced) {
return (
-
+
);
}
- const button =
- isLocalWorkspace || isOnline ? t['Export']() : t['Export(Offline)']();
- const desc =
- isLocalWorkspace || isOnline
- ? t['Export Description']()
- : t['Export Description(Offline)']();
-
return (
-
-
-
+ }
+ >
+ {t['Full Backup']()}
+
+
+
+
+
+ >
);
};
diff --git a/packages/frontend/i18n/src/i18n.gen.ts b/packages/frontend/i18n/src/i18n.gen.ts
index 8379b4b5ee..bb8c9e9b57 100644
--- a/packages/frontend/i18n/src/i18n.gen.ts
+++ b/packages/frontend/i18n/src/i18n.gen.ts
@@ -192,29 +192,25 @@ export function useAFFiNEI18N(): {
*/
["Enable cloud hint"](): string;
/**
- * `Export`
+ * `Full Backup`
*/
- Export(): string;
+ ["Full Backup"](): string;
/**
- * `Export (Offline)`
+ * `Export a complete workspace backup`
*/
- ["Export(Offline)"](): string;
+ ["Full Backup Description"](): string;
/**
- * `Full Sync`
+ * `Sync all cloud data and export a complete workspace backup`
*/
- ["Full Sync"](): string;
+ ["Full Backup Hint"](): string;
/**
- * `You can export the entire Workspace data for backup, and the exported data can be re-imported.`
+ * `Quick Export`
*/
- ["Export Description"](): string;
+ ["Quick Export"](): string;
/**
- * `You can export the entire Workspace data for backup, and the exported data can be re-imported. But you are offline now which will cause the exported data not up to date.`
+ * `Skip cloud synchronization and quickly export current data(some attachments or docs may be missing)`
*/
- ["Export Description(Offline)"](): string;
- /**
- * `You can export the entire Workspace data for backup, and the exported data can be re-imported. But you must sync all cloud data first to keep your exported data up to date.`
- */
- ["Full Sync Description"](): string;
+ ["Quick Export Description"](): string;
/**
* `Export failed`
*/
diff --git a/packages/frontend/i18n/src/resources/en.json b/packages/frontend/i18n/src/resources/en.json
index 617033bc4e..1f5584382e 100644
--- a/packages/frontend/i18n/src/resources/en.json
+++ b/packages/frontend/i18n/src/resources/en.json
@@ -38,12 +38,11 @@
"Enable AFFiNE Cloud": "Enable AFFiNE Cloud",
"Enable AFFiNE Cloud Description": "If enabled, the data in this workspace will be backed up and synchronised via AFFiNE Cloud.",
"Enable cloud hint": "The following functions rely on AFFiNE Cloud. All data is stored on the current device. You can enable AFFiNE Cloud for this workspace to keep data in sync with the cloud.",
- "Export": "Export",
- "Export(Offline)": "Export (Offline)",
- "Full Sync": "Full Sync",
- "Export Description": "You can export the entire Workspace data for backup, and the exported data can be re-imported.",
- "Export Description(Offline)": "You can export the entire Workspace data for backup, and the exported data can be re-imported. But you are offline now which will cause the exported data not up to date.",
- "Full Sync Description": "You can export the entire Workspace data for backup, and the exported data can be re-imported. But you must sync all cloud data first to keep your exported data up to date.",
+ "Full Backup": "Full Backup",
+ "Full Backup Description": "Export a complete workspace backup",
+ "Full Backup Hint": "Sync all cloud data and export a complete workspace backup",
+ "Quick Export": "Quick Export",
+ "Quick Export Description": "Skip cloud synchronization and quickly export current data(some attachments or docs may be missing)",
"Export failed": "Export failed",
"Export success": "Export success",
"Export to HTML": "Export to HTML",