mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-02-20 15:43:58 -05: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
80 lines
2.1 KiB
JSON
80 lines
2.1 KiB
JSON
{
|
|
"name": "@sd/interface",
|
|
"version": "1.0.0",
|
|
"license": "GPL-3.0-only",
|
|
"private": true,
|
|
"main": "index.tsx",
|
|
"types": "index.tsx",
|
|
"exports": {
|
|
".": "./index.tsx",
|
|
"./assets/*": "./assets/*",
|
|
"./components/*": "./components/*"
|
|
},
|
|
"scripts": {
|
|
"lint": "eslint .",
|
|
"typecheck": "tsc -b",
|
|
"build": "tsc"
|
|
},
|
|
"dependencies": {
|
|
"@fontsource/inter": "^4.5.13",
|
|
"@headlessui/react": "^1.7.3",
|
|
"@hookform/error-message": "^2.0.1",
|
|
"@hookform/resolvers": "^2.9.10",
|
|
"@radix-ui/react-progress": "^1.0.1",
|
|
"@radix-ui/react-slider": "^1.1.0",
|
|
"@radix-ui/react-toast": "^1.1.2",
|
|
"@radix-ui/react-tooltip": "^1.0.2",
|
|
"@remix-run/router": "^1.4.0",
|
|
"@sd/assets": "workspace:*",
|
|
"@sd/client": "workspace:*",
|
|
"@sd/ui": "workspace:*",
|
|
"@sentry/browser": "^7.16.0",
|
|
"@splinetool/react-spline": "^2.2.3",
|
|
"@splinetool/runtime": "^0.9.128",
|
|
"@tailwindcss/forms": "^0.5.3",
|
|
"@tanstack/react-query": "^4.12.0",
|
|
"@tanstack/react-query-devtools": "^4.22.0",
|
|
"@tanstack/react-virtual": "3.0.0-beta.18",
|
|
"@vitejs/plugin-react": "^2.1.0",
|
|
"autoprefixer": "^10.4.12",
|
|
"byte-size": "^8.1.0",
|
|
"class-variance-authority": "^0.4.0",
|
|
"clsx": "^1.2.1",
|
|
"crypto-random-string": "^5.0.0",
|
|
"dayjs": "^1.11.5",
|
|
"phosphor-react": "^1.4.1",
|
|
"react": "^18.2.0",
|
|
"react-colorful": "^5.6.1",
|
|
"react-dom": "^18.2.0",
|
|
"react-error-boundary": "^3.1.4",
|
|
"react-hook-form": "^7.43.5",
|
|
"react-json-view": "^1.21.3",
|
|
"react-loading-skeleton": "^3.1.0",
|
|
"react-qr-code": "^2.0.11",
|
|
"react-responsive": "^9.0.2",
|
|
"react-router": "6.9.0",
|
|
"react-router-dom": "6.9.0",
|
|
"rooks": "^5.14.0",
|
|
"tailwindcss": "^3.1.8",
|
|
"use-count-up": "^3.0.1",
|
|
"use-debounce": "^8.0.4",
|
|
"valtio": "^1.7.4",
|
|
"zod": "^3.20.2"
|
|
},
|
|
"devDependencies": {
|
|
"@sd/config": "workspace:*",
|
|
"@types/babel-core": "^6.25.7",
|
|
"@types/byte-size": "^8.1.0",
|
|
"@types/loadable__component": "^5.13.4",
|
|
"@types/node": "^18.11.9",
|
|
"@types/react": "^18.0.21",
|
|
"@types/react-dom": "^18.0.6",
|
|
"@types/react-router-dom": "^5.3.3",
|
|
"@vitejs/plugin-react": "^1.3.1",
|
|
"prettier": "^2.7.1",
|
|
"typescript": "^4.8.4",
|
|
"vite": "^4.0.4",
|
|
"vite-plugin-svgr": "^2.2.1"
|
|
}
|
|
}
|