mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-14 07:44:04 +00:00
* Handle RPC errors when adding Locations - Add custom error codes for NeedRelink and AddLibraryToMetadata errors in backend - Handle errors in AddLocationDialog form - Show custom error message for above errors and ask user to confirm action - Handle user action confirmation with appropriate RPC method (`locations.relink`/`locations.addLibrary`) * Abstract openDirectoryPickerDialog logic to a function - Add 'Unkown Error' when code doesn't match a know one * Fix bugs in logic to handle `locations.create` errors - Fix minor issue: AddLocationButton opened the dialog in desktop even when the user cancelled the file picker - Replace ternary with object for custom form error messages to allow for easier expansion - Break onSubmit logic up into functions - Remove incorrect `locations.indexer_rules.delete` call - Fix Checkbox element state not updating on external form state changes * Adjust AddLocationDialog style to match other Dialogs in the app - Reset exception code at the end of `confirmAfterError` * Rework how backend errors are handled when adding Locations - Change NeedRelink and AddLibraryToMetadata errors to use 409 (Conflict) status code and a static message. - Only enable custom submit logic in AddLocationDialog for 409 (Conflict) errors that have a known custom error form message. - Differentiate previous errors based on their messages instead of status code in AddLocationDialog onSubmit. - Add @hookform/error-message dependency for improved form validation error rendering. * Invalidate library.list to ensure it is shown on sidebar * Improvements to AddLocationDialog - Remove uncessary scope block and make useEffect depend directly on `form` - Move `form.handleSubmit` from `onSubmit` call to `handleSubmit` definition - Change basic Checkbox to RadixCheckbox and adapt onChange logic to onCheckedChange - Some simple styling improvements to the error message |
||
---|---|---|
.. | ||
prisma | ||
src | ||
build.rs | ||
Cargo.toml |