refactor: update drive value from 'local' to 'folder' across the application

- Changed the drive value from 'local' to 'folder' in driveList constant.
- Updated condition checks in SyncSetting component to reflect the new drive value.
- Modified the handleAutoCloudSync function to use 'folder' instead of 'local' for default sync option.
This commit is contained in:
troyeguo committed 2026-07-13 15:16:56 +08:00
1 parent 2405b0b25e
commit fd6187fa21
4 files changed
+5 -5

No files matched your search

File diff suppressed because one or more lines are too long.
+1 -1
View File
@@ -59,7 +59,7 @@ export const driveList = [
},
{
label: "Local folder",
value: "local",
value: "folder",
icon: "icon-local",
isPro: true,
support: ["desktop"],
@@ -128,7 +128,7 @@ class SyncSetting extends React.Component<SettingInfoProps, SettingInfoState> {
}
this.props.handleSettingDrive(targetDrive);
let settingDrive = targetDrive;
if (settingDrive === "icloud" || settingDrive === "local") {
if (settingDrive === "icloud" || settingDrive === "folder") {
let drivePath = "";
if (settingDrive === "icloud") {
drivePath = getICloudDrivePath();
@@ -144,7 +144,7 @@ class SyncSetting extends React.Component<SettingInfoProps, SettingInfoState> {
this.props.handleSettingDrive("");
return;
}
} else if (settingDrive === "local") {
} else if (settingDrive === "folder") {
const { ipcRenderer } = window.require("electron");
drivePath = await ipcRenderer.invoke("select-path");
if (!drivePath) {
+1 -1
View File
@@ -1352,7 +1352,7 @@ export const handleAutoCloudSync = async () => {
syncRes.code === 200 &&
syncRes.data.default_sync_option &&
syncRes.data.default_sync_option !== "icloud" &&
syncRes.data.default_sync_option !== "local" &&
syncRes.data.default_sync_option !== "folder" &&
syncRes.data.default_sync_token
) {
let supportedSources = driveList