parent
1a97bd55c7
commit
b25a0545f5
@ -268,7 +268,7 @@ function CheckButton() {
|
|||||||
const syncStore = useSyncStore();
|
const syncStore = useSyncStore();
|
||||||
|
|
||||||
const couldCheck = useMemo(() => {
|
const couldCheck = useMemo(() => {
|
||||||
return syncStore.coundSync();
|
return syncStore.cloudSync();
|
||||||
}, [syncStore]);
|
}, [syncStore]);
|
||||||
|
|
||||||
const [checkState, setCheckState] = useState<
|
const [checkState, setCheckState] = useState<
|
||||||
@ -472,7 +472,7 @@ function SyncItems() {
|
|||||||
const promptStore = usePromptStore();
|
const promptStore = usePromptStore();
|
||||||
const maskStore = useMaskStore();
|
const maskStore = useMaskStore();
|
||||||
const couldSync = useMemo(() => {
|
const couldSync = useMemo(() => {
|
||||||
return syncStore.coundSync();
|
return syncStore.cloudSync();
|
||||||
}, [syncStore]);
|
}, [syncStore]);
|
||||||
|
|
||||||
const [showSyncConfigModal, setShowSyncConfigModal] = useState(false);
|
const [showSyncConfigModal, setShowSyncConfigModal] = useState(false);
|
||||||
|
@ -48,7 +48,7 @@ const DEFAULT_SYNC_STATE = {
|
|||||||
export const useSyncStore = createPersistStore(
|
export const useSyncStore = createPersistStore(
|
||||||
DEFAULT_SYNC_STATE,
|
DEFAULT_SYNC_STATE,
|
||||||
(set, get) => ({
|
(set, get) => ({
|
||||||
coundSync() {
|
cloudSync() {
|
||||||
const config = get()[get().provider];
|
const config = get()[get().provider];
|
||||||
return Object.values(config).every((c) => c.toString().length > 0);
|
return Object.values(config).every((c) => c.toString().length > 0);
|
||||||
},
|
},
|
||||||
@ -60,7 +60,9 @@ export const useSyncStore = createPersistStore(
|
|||||||
export() {
|
export() {
|
||||||
const state = getLocalAppState();
|
const state = getLocalAppState();
|
||||||
const datePart = isApp
|
const datePart = isApp
|
||||||
? `${new Date().toLocaleDateString().replace(/\//g, '_')} ${new Date().toLocaleTimeString().replace(/:/g, '_')}`
|
? `${new Date().toLocaleDateString().replace(/\//g, "_")} ${new Date()
|
||||||
|
.toLocaleTimeString()
|
||||||
|
.replace(/:/g, "_")}`
|
||||||
: new Date().toLocaleString();
|
: new Date().toLocaleString();
|
||||||
|
|
||||||
const fileName = `Backup-${datePart}.json`;
|
const fileName = `Backup-${datePart}.json`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user