diff --git a/src/hooks/app/useApp.tsx b/src/hooks/app/useApp.tsx index b6a96715..8364014f 100644 --- a/src/hooks/app/useApp.tsx +++ b/src/hooks/app/useApp.tsx @@ -4,6 +4,8 @@ import { IProviderInfo, ICertificate, } from "@peculiar/fortify-client-core"; +import { useTranslation } from "react-i18next"; +import { useToast } from "@peculiar/react-components"; import { AppFetchingStatus, AppFetchingType } from "./types"; @@ -29,6 +31,9 @@ export function useApp() { * */ + const { addToast } = useToast(); + const { t } = useTranslation(); + const setFetchingValue = ( name: keyof AppFetchingType, value: AppFetchingStatus @@ -233,6 +238,14 @@ export function useApp() { if (!isLoggedIn) { setIsCurrentProviderLogedin(false); handleCertificatesDataReload(currentProvider.id); + } else { + addToast({ + message: t("topbar.provider-doesnt-support-signing-in"), + variant: "attention", + disableIcon: true, + isClosable: true, + id: "provider-doesnt-support-signing-in", + }); } } else { await localProvider.login(); diff --git a/src/i18n/locales/en/main.json b/src/i18n/locales/en/main.json index 0cca1e92..2bc47f55 100644 --- a/src/i18n/locales/en/main.json +++ b/src/i18n/locales/en/main.json @@ -206,7 +206,8 @@ "reload-certificates": "Refresh list", "provider-information": "Provider information", "provider-login": "Sign in", - "provider-logout": "Sign out" + "provider-logout": "Sign out", + "provider-doesnt-support-signing-in": "This provider doesn’t support signing in." }, "certificate-viewer-dialog": { "title": "“{{name}}” details"