Skip to content

Commit

Permalink
修改方法名cloudSync为couldSync;新的Mac应用图标。
Browse files Browse the repository at this point in the history
  • Loading branch information
htmambo committed Feb 29, 2024
1 parent f091636 commit 236956a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/components/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ function DangerItems() {
function CheckButton() {
const syncStore = useSyncStore();

const couldCheck = useMemo(() => {
return syncStore.cloudSync();
const couldSync = useMemo(() => {
return syncStore.couldSync();
}, [syncStore]);

const [checkState, setCheckState] = useState<
Expand All @@ -286,7 +286,7 @@ function CheckButton() {
setCheckState(valid ? "success" : "failed");
}

if (!couldCheck) return null;
if (!couldSync) return null;

return (
<IconButton
Expand Down Expand Up @@ -773,7 +773,7 @@ function SyncItems() {
const promptStore = usePromptStore();
const maskStore = useMaskStore();
const couldSync = useMemo(() => {
return syncStore.cloudSync();
return syncStore.couldSync();
}, [syncStore]);

const [showSyncConfigModal, setShowSyncConfigModal] = useState(false);
Expand Down
2 changes: 1 addition & 1 deletion app/store/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const DEFAULT_SYNC_STATE = {
export const useSyncStore = createPersistStore(
DEFAULT_SYNC_STATE,
(set, get) => ({
cloudSync() {
couldSync() {
const config = get()[get().provider];
return Object.values(config).every((c) => c.toString().length > 0);
},
Expand Down
Binary file modified src-tauri/icons/icon.icns
Binary file not shown.

0 comments on commit 236956a

Please sign in to comment.