@anchrd/intel-ui 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anchrd/intel-ui",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
package/src/i18n/en.json CHANGED
@@ -147,6 +147,9 @@
147
147
  "tools.emptyHelp": "The portal answered, and it offers your account no tools. An administrator decides in the portal which servers exist and who may reach them.",
148
148
  "tools.unreachable": "Portal not reachable",
149
149
  "tools.unreachableHelp": "The company MCP portal did not answer, so Intel cannot tell which tools you have. Nothing is stored here; try again once the portal responds.",
150
+ "tools.connectExpired": "The portal sign-in took too long",
151
+ "tools.connectExpiredHelp": "The connection to the company MCP portal has to be completed within a few minutes, and this one ran out while the authorization screen was open. Nothing went wrong and nothing was refused — start it again and confirm the servers when the screen appears.",
152
+ "tools.connectRetry": "Start again",
150
153
  "tools.connectFailed": "Portal sign-in failed",
151
154
  "tools.connectFailedHelp": "The sign-in to the company MCP portal broke before it could be answered. This is a technical fault, not a decision about your access — reload to try again, and tell an administrator if it stays.",
152
155
  "tools.origin": "Origin",
@@ -1,7 +1,7 @@
1
1
  import type { ToolCapability } from "@anchrd/intel-contract";
2
2
  import { useQuery } from "@tanstack/react-query";
3
3
  import { useRouterState } from "@tanstack/react-router";
4
- import { AlertTriangle, ChevronRight, PlugZap, ShieldOff, Wrench } from "lucide-react";
4
+ import { AlertTriangle, ChevronRight, PlugZap, ShieldOff, Timer, Wrench } from "lucide-react";
5
5
  import * as React from "react";
6
6
  import { Button } from "@/components/ui/button";
7
7
  import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";
@@ -96,6 +96,19 @@ export function Tools() {
96
96
  ) : !catalog.data.portalConnected ? (
97
97
  signingIn ? (
98
98
  <p className="text-sm text-muted-foreground">{i18n.t("tools.signingIn")}</p>
99
+ ) : connectError === "portal_sign_in_expired" ? (
100
+ // Ran out of time on the consent screen. Nothing is broken and nobody was refused, so
101
+ // neither of the other two sentences fits — and this one is the only case the reader
102
+ // can fix alone, by starting over (#95).
103
+ <Notice
104
+ icon={<Timer aria-hidden="true" className="mx-auto size-8 text-muted-foreground" />}
105
+ title={i18n.t("tools.connectExpired")}
106
+ help={i18n.t("tools.connectExpiredHelp")}
107
+ >
108
+ <Button variant="outline" onClick={() => data.startPortalSignIn("/tools")}>
109
+ {i18n.t("tools.connectRetry")}
110
+ </Button>
111
+ </Notice>
99
112
  ) : accessDenied || !refused ? (
100
113
  // The end of the silent walk for somebody no Access policy carries. It is a sentence
101
114
  // about access, not an invitation to connect: there is nothing they could click that