diff options
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/i18next-parser.config.mjs | 2 | ||||
| -rw-r--r-- | frontend/src/components/modals/filepicker/FilePickerError.tsx | 7 | ||||
| -rw-r--r-- | frontend/src/components/modals/filepicker/index.tsx | 3 |
3 files changed, 10 insertions, 2 deletions
diff --git a/frontend/i18next-parser.config.mjs b/frontend/i18next-parser.config.mjs index 9d4b114d..8de58cfc 100644 --- a/frontend/i18next-parser.config.mjs +++ b/frontend/i18next-parser.config.mjs @@ -36,7 +36,7 @@ export default { lineEnding: 'auto', // Control the line ending. See options at https://github.com/ryanve/eol - locales: ['en-US', 'it-IT'], + locales: ['en-US'], // An array of the locales in your applications namespaceSeparator: false, diff --git a/frontend/src/components/modals/filepicker/FilePickerError.tsx b/frontend/src/components/modals/filepicker/FilePickerError.tsx index bf75afae..f2330b9a 100644 --- a/frontend/src/components/modals/filepicker/FilePickerError.tsx +++ b/frontend/src/components/modals/filepicker/FilePickerError.tsx @@ -1,10 +1,11 @@ import { FC, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { IconContext } from 'react-icons'; -import { FaExclamationTriangle, FaQuestionCircle } from 'react-icons/fa'; +import { FaExclamationTriangle, FaQuestionCircle, FaUserSlash } from 'react-icons/fa'; export enum FileErrorTypes { FileNotFound, + PermissionDenied, Unknown, None, } @@ -25,6 +26,10 @@ const FilePickerError: FC<FilePickerErrorProps> = ({ error, rawError = null }) = setText(t('FilePickerError.errors.file_not_found')); setIcon(<FaExclamationTriangle />); break; + case FileErrorTypes.PermissionDenied: + setText(t('FilePickerError.errors.perm_denied')); + setIcon(<FaUserSlash />); + break; case FileErrorTypes.Unknown: setText(t('FilePickerError.errors.unknown', { raw_error: rawError })); setIcon(<FaQuestionCircle />); diff --git a/frontend/src/components/modals/filepicker/index.tsx b/frontend/src/components/modals/filepicker/index.tsx index 50931358..ae745c9c 100644 --- a/frontend/src/components/modals/filepicker/index.tsx +++ b/frontend/src/components/modals/filepicker/index.tsx @@ -210,6 +210,9 @@ const FilePicker: FunctionComponent<FilePickerProps> = ({ case theError.match(/\[WinError\s3.*/i)?.input: setError(FileErrorTypes.FileNotFound); break; + case theError.match(/\[Errno\s13.*/i)?.input: + setError(FileErrorTypes.PermissionDenied); + break; default: setRawError(theError); setError(FileErrorTypes.Unknown); |
