- One or more external services are unavailable or unreachable. This may be caused
- by a network issue or a temporary service outage. Please try again later.
-
-
-
- );
-};
diff --git a/new-ui/src/shared/components/LocationCard/LocationCard.tsx b/new-ui/src/shared/components/LocationCard/LocationCard.tsx
index 5c204e120..35a08166e 100644
--- a/new-ui/src/shared/components/LocationCard/LocationCard.tsx
+++ b/new-ui/src/shared/components/LocationCard/LocationCard.tsx
@@ -12,6 +12,7 @@ import { LocationCardProvider, useLocationCardContext } from './context/context'
import { LocationCardViews, type LocationCardViewsValue } from './context/types';
import { ConnectedView } from './views/ConnectedView/ConnectedView';
import { DefaultView } from './views/DefaultView/DefaultView';
+import { LocationCardConnectionErrorView } from './views/LocationCardConnectionErrorView/LocationCardConnectionErrorView';
import { LocationCardMfaEmailView } from './views/LocationCardMfaEmailView/LocationCardMfaEmailView';
import { LocationCardMfaMobileView } from './views/LocationCardMfaMobileView/LocationCardMfaMobileView';
import { LocationCardMfaOidcView } from './views/LocationCardMfaOidcView/LocationCardMfaOidcView';
@@ -37,6 +38,7 @@ const views: Record = {
[LocationCardViews.Connecting]: null,
[LocationCardViews.Connected]: ,
[LocationCardViews.PostureCheckFail]: ,
+ [LocationCardViews.ConnectionError]: ,
};
interface InnerProps {
diff --git a/new-ui/src/shared/components/LocationCard/context/types.ts b/new-ui/src/shared/components/LocationCard/context/types.ts
index a17e666e3..007abfe48 100644
--- a/new-ui/src/shared/components/LocationCard/context/types.ts
+++ b/new-ui/src/shared/components/LocationCard/context/types.ts
@@ -8,6 +8,7 @@ export const LocationCardViews = {
Connecting: 'connecting',
Connected: 'connected',
PostureCheckFail: 'posture-check-fail',
+ ConnectionError: 'connection-error',
} as const;
export type LocationCardViewsValue =
diff --git a/new-ui/src/shared/components/LocationCard/hooks/useMfaOidcConnect.ts b/new-ui/src/shared/components/LocationCard/hooks/useMfaOidcConnect.ts
index 2cc7611cc..0abb7e1d2 100644
--- a/new-ui/src/shared/components/LocationCard/hooks/useMfaOidcConnect.ts
+++ b/new-ui/src/shared/components/LocationCard/hooks/useMfaOidcConnect.ts
@@ -4,7 +4,6 @@ import { error } from '@tauri-apps/plugin-log';
import { useCallback, useEffect, useRef, useState } from 'react';
import { api } from '../../../rust-api/api';
import { getInstancesQueryOptions } from '../../../rust-api/query';
-import { useTrayConnectionError } from '../../../store/useAppStore';
import {
CLIENT_MFA_ENDPOINT,
isEdgeUnavailable,
@@ -147,7 +146,7 @@ export const useMfaOidcConnect = () => {
return;
}
if (isEdgeUnavailable(e)) {
- useTrayConnectionError.setState({ visible: true });
+ setView(LocationCardViews.ConnectionError);
return;
}
setStartError(
diff --git a/new-ui/src/shared/components/LocationCard/views/LocationCardConnectionErrorView/LocationCardConnectionErrorView.tsx b/new-ui/src/shared/components/LocationCard/views/LocationCardConnectionErrorView/LocationCardConnectionErrorView.tsx
new file mode 100644
index 000000000..a19ddd1c6
--- /dev/null
+++ b/new-ui/src/shared/components/LocationCard/views/LocationCardConnectionErrorView/LocationCardConnectionErrorView.tsx
@@ -0,0 +1,33 @@
+import './style.scss';
+import { ThemeSpacing } from '../../../../types';
+import { Button } from '../../../Button/Button';
+import { ButtonVariant } from '../../../Button/types';
+import { Divider } from '../../../Divider/Divider';
+import { Icon, IconKind } from '../../../Icon';
+import { SizedBox } from '../../../SizedBox/SizedBox';
+import { useLocationCardContext } from '../../context/context';
+import { LocationCardViews } from '../../context/types';
+
+export const LocationCardConnectionErrorView = () => {
+ const { setView } = useLocationCardContext();
+
+ return (
+
+
+
+
+
+
+ One or more external services are unavailable or unreachable. This may be caused
+ by a network issue or a temporary service outage. Please try again later.
+