fix(settings): correct invoke payload keys and error handler routing
- folder_ids: use snake_case in both set_tagging_queue_folder_ids invoke calls (toggleTaggingQueueFolder and setTaggingQueueFolderIds) to match the Rust SetTaggingQueueFolderIdsParams serde field name - threshold save error: route setTaggerThreshold() catch to setTaggerThresholdError instead of setTaggerQueueStatus so the error surfaces next to the threshold input, not the queue targets card
This commit is contained in:
@@ -394,7 +394,7 @@ export function SettingsModal() {
|
|||||||
setTaggerThresholdError(null);
|
setTaggerThresholdError(null);
|
||||||
setTaggerThresholdSaving(true);
|
setTaggerThresholdSaving(true);
|
||||||
void setTaggerThreshold(value)
|
void setTaggerThreshold(value)
|
||||||
.catch((error: unknown) => setTaggerQueueStatus(String(error)))
|
.catch((error: unknown) => setTaggerThresholdError(String(error)))
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
setTaggerThresholdDraft(null);
|
setTaggerThresholdDraft(null);
|
||||||
setTaggerThresholdSaving(false);
|
setTaggerThresholdSaving(false);
|
||||||
|
|||||||
+2
-2
@@ -1336,14 +1336,14 @@ export const useGalleryStore = create<GalleryState>((set, get) => ({
|
|||||||
const next = state.taggingQueueFolderIds.includes(folderId)
|
const next = state.taggingQueueFolderIds.includes(folderId)
|
||||||
? state.taggingQueueFolderIds.filter((id) => id !== folderId)
|
? state.taggingQueueFolderIds.filter((id) => id !== folderId)
|
||||||
: [...state.taggingQueueFolderIds, folderId].sort((a, b) => a - b);
|
: [...state.taggingQueueFolderIds, folderId].sort((a, b) => a - b);
|
||||||
void invoke("set_tagging_queue_folder_ids", { folderIds: next }).catch(() => {});
|
void invoke("set_tagging_queue_folder_ids", { folder_ids: next }).catch(() => {});
|
||||||
return { taggingQueueFolderIds: next };
|
return { taggingQueueFolderIds: next };
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
setTaggingQueueFolderIds: (taggingQueueFolderIds) => {
|
setTaggingQueueFolderIds: (taggingQueueFolderIds) => {
|
||||||
set({ taggingQueueFolderIds });
|
set({ taggingQueueFolderIds });
|
||||||
void invoke("set_tagging_queue_folder_ids", { folderIds: taggingQueueFolderIds }).catch(() => {});
|
void invoke("set_tagging_queue_folder_ids", { folder_ids: taggingQueueFolderIds }).catch(() => {});
|
||||||
},
|
},
|
||||||
|
|
||||||
openAppDataFolder: async () => {
|
openAppDataFolder: async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user