From 3e64e53cd724773c4616b178fd695091f9a7c71a Mon Sep 17 00:00:00 2001
From: Marco Rodolfi <marco.rodolfi@tuta.io>
Date: Mon, 26 Jun 2023 08:53:41 +0200
Subject: feat: Added detailed message for permission error and clean up
 english language from unused strings.

---
 frontend/src/components/modals/filepicker/FilePickerError.tsx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'frontend/src/components/modals/filepicker/FilePickerError.tsx')

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 />);
-- 
cgit v1.2.3

