From 5f517ef0ddc70d120266375d8b7196e53f2fee93 Mon Sep 17 00:00:00 2001 From: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com> Date: Thu, 19 Nov 2026 18:49:08 -0800 Subject: [PATCH 01/10] feat(web): the environments page is a map of your machines Co-Authored-By: Claude Fable 5.2 --- .../cloud/CloudEnvironmentConnectList.tsx | 17 +- .../settings/AddEnvironmentDialog.tsx | 7 +- .../settings/ConnectionsSettings.tsx | 123 +- .../components/settings/EnvironmentsMap.tsx | 1505 +++++++++++++++++ .../settings/EnvironmentsMapDetails.tsx | 693 ++++++++ .../settings/LinkedEnvironmentsSettings.tsx | 150 +- .../settings/SavedEnvironmentRows.tsx | 18 +- .../settings/environmentsMap.logic.test.ts | 681 ++++++++ .../settings/environmentsMap.logic.ts | 1141 +++++++++++++ apps/web/src/i18n/translations/de.json | 94 +- apps/web/src/i18n/translations/en.json | 94 +- apps/web/src/i18n/translations/es.json | 94 +- apps/web/src/i18n/translations/fr.json | 94 +- apps/web/src/i18n/translations/ja.json | 94 +- apps/web/src/i18n/translations/ko.json | 94 +- apps/web/src/i18n/translations/pt-BR.json | 94 +- apps/web/src/i18n/translations/ru.json | 94 +- apps/web/src/i18n/translations/sv.json | 94 +- apps/web/src/i18n/translations/zh.json | 94 +- apps/web/src/state/environments.ts | 13 + apps/web/src/state/peerLinks.ts | 6 + apps/web/src/state/session.ts | 6 + docs/user/remote-access.md | 10 + packages/client-runtime/src/linkRequest.ts | 3 +- 24 files changed, 5123 insertions(+), 190 deletions(-) create mode 100644 apps/web/src/components/settings/EnvironmentsMap.tsx create mode 100644 apps/web/src/components/settings/EnvironmentsMapDetails.tsx create mode 100644 apps/web/src/components/settings/environmentsMap.logic.test.ts create mode 100644 apps/web/src/components/settings/environmentsMap.logic.ts diff --git a/apps/web/src/components/cloud/CloudEnvironmentConnectList.tsx b/apps/web/src/components/cloud/CloudEnvironmentConnectList.tsx index a723fdabe2de4..de4e4bb93ea01 100644 --- a/apps/web/src/components/cloud/CloudEnvironmentConnectList.tsx +++ b/apps/web/src/components/cloud/CloudEnvironmentConnectList.tsx @@ -34,7 +34,7 @@ import { environmentCatalog } from "~/connection/catalog"; import { isDesktopLocalConnectionTarget } from "~/connection/desktopLocal"; import { cn } from "~/lib/utils"; import { relayEnvironmentDiscovery } from "~/state/relay"; -import { useRelayEnvironmentDiscovery } from "~/state/environments"; +import { useRelayEnvironmentDiscovery, useRetainedRelayEnvironments } from "~/state/environments"; import { useAtomCommand } from "~/state/use-atom-command"; import { ConnectionStatusDot } from "../ConnectionStatusDot"; import { EnvironmentMachineIcon } from "../EnvironmentMachineIcon"; @@ -85,7 +85,10 @@ export function CloudEnvironmentConnectRows({ empty = null, selection, onDiscoveryReady, + only, }: { + /** Show this machine's row alone, for a view that picks one machine at a time. */ + readonly only?: EnvironmentId; readonly primaryEnvironmentId: EnvironmentId | null; readonly savedEnvironments: ReadonlyArray; readonly showSavedEnvironments?: boolean; @@ -101,6 +104,9 @@ export function CloudEnvironmentConnectRows({ const gt = useGT(); const m = useMessages(); const environmentsState = useRelayEnvironmentDiscovery(); + const retainedEnvironments = useRetainedRelayEnvironments(); + // A single row is a machine the user picked: it stays through a refresh, as it does on the map. + const discovered = only === undefined ? environmentsState.environments : retainedEnvironments; const registerEnvironment = useAtomCommand(environmentCatalog.register, { reportFailure: false, }); @@ -142,6 +148,8 @@ export function CloudEnvironmentConnectRows({ // oxlint-disable-next-line t3code/no-unreasoned-state-sync -- fetches relay discovery when its inputs change, unless hidden polling covers it, and reports readiness useEffect(() => { let active = true; + // A single row belongs to a view that already listed the machines; listing again empties it. + if (only !== undefined) return; if (onDiscoveryReady || !refreshWhileEmpty || document.visibilityState === "visible") { void refreshRelayEnvironments().then(() => { if (active) onDiscoveryReady?.(); @@ -150,7 +158,7 @@ export function CloudEnvironmentConnectRows({ return () => { active = false; }; - }, [refreshRelayEnvironments, refreshWhileEmpty, onDiscoveryReady]); + }, [refreshRelayEnvironments, refreshWhileEmpty, onDiscoveryReady, only]); const connectEnvironment = async (environment: RelayClientEnvironmentRecord) => { if ( @@ -208,12 +216,13 @@ export function CloudEnvironmentConnectRows({ // Omit machines saved over other routes; onboarding selection must not add a T3 Connect route. const isVisibleEnvironment = (environmentId: EnvironmentId) => + (only === undefined || environmentId === only) && environmentId !== primaryEnvironmentId && !desktopLocalIds.has(environmentId) && (showSavedEnvironments || !savedById.has(environmentId)) && !(selection && savedWithoutRelay.has(environmentId)); - const visibleEnvironments = [...environmentsState.environments.values()].filter( - ({ environment }) => isVisibleEnvironment(environment.environmentId), + const visibleEnvironments = [...discovered.values()].filter(({ environment }) => + isVisibleEnvironment(environment.environmentId), ); const selectNewComputers = useEffectEvent( (environments: typeof environmentsState.environments) => { diff --git a/apps/web/src/components/settings/AddEnvironmentDialog.tsx b/apps/web/src/components/settings/AddEnvironmentDialog.tsx index 1ff226b1bc03d..1359cf70786c2 100644 --- a/apps/web/src/components/settings/AddEnvironmentDialog.tsx +++ b/apps/web/src/components/settings/AddEnvironmentDialog.tsx @@ -80,11 +80,14 @@ export function AddEnvironmentDialog({ routeTarget, error, savedEnvironments, + initialHost = "", onOpenChange, onErrorChange, }: { readonly open: boolean; readonly routeTarget: EnvironmentPresentation | null; + /** An address already known for the machine being added, such as one a link uses. */ + readonly initialHost?: string; readonly error: string | null; readonly savedEnvironments: ReadonlyArray; readonly onOpenChange: (open: boolean) => void; @@ -119,7 +122,7 @@ export function AddEnvironmentDialog({ return keys; })(); const [savedBackendMode, setSavedBackendMode] = useState<"remote" | "ssh">("remote"); - const [savedBackendHost, setSavedBackendHost] = useState(""); + const [savedBackendHost, setSavedBackendHost] = useState(initialHost); const [savedBackendPairingCode, setSavedBackendPairingCode] = useState(""); const [savedBackendSshHost, setSavedBackendSshHost] = useState(""); const [savedBackendSshUsername, setSavedBackendSshUsername] = useState(""); @@ -161,7 +164,7 @@ export function AddEnvironmentDialog({ if (!nextOpen) { savedBackendSessionRef.current += 1; setSavedBackendMode("remote"); - setSavedBackendHost(""); + setSavedBackendHost(initialHost); setSavedBackendPairingCode(""); setSavedBackendSshHost(""); setSavedBackendSshUsername(""); diff --git a/apps/web/src/components/settings/ConnectionsSettings.tsx b/apps/web/src/components/settings/ConnectionsSettings.tsx index 8f4d8778bcf80..618564402ba71 100644 --- a/apps/web/src/components/settings/ConnectionsSettings.tsx +++ b/apps/web/src/components/settings/ConnectionsSettings.tsx @@ -49,7 +49,10 @@ import { useSearchableSetting } from "./settingsSearch"; import { ConnectDeviceApprovalSettings } from "./ConnectDeviceApprovalSettings"; import { EnvironmentIconMenu } from "./EnvironmentIconPicker"; import { FoldedSettingsSection } from "./FoldedSettingsSection"; +import { EnvironmentsMap } from "./EnvironmentsMap"; import { LinkedEnvironmentsSettings } from "./LinkedEnvironmentsSettings"; +import { Toggle, ToggleGroup } from "../ui/toggle-group"; +import { useMediaQuery } from "~/hooks/useMediaQuery"; import { usePeerLinkHosts } from "~/state/peerLinks"; import { LoadBalancingSettings } from "./LoadBalancingSettings"; import { PullRequestRoutingSettings } from "./PullRequestRoutingSettings"; @@ -355,15 +358,34 @@ function ConnectionsSettingsContent({ const [isRevokingOtherDesktopClients, setIsRevokingOtherDesktopClients] = useState(false); const [addBackendDialogOpen, setAddBackendDialogOpen] = useState(false); const [routeTarget, setRouteTarget] = useState(null); + // An address the map already knows for the machine being added; remounts the dialog with it. + const [addBackendHost, setAddBackendHost] = useState(""); const [savedBackendError, setSavedBackendError] = useState(null); const handleAddBackendDialogOpenChange = (open: boolean) => { setAddBackendDialogOpen(open); if (open) { setRouteTarget(null); + setAddBackendHost(""); } else { setSavedBackendError(null); } }; + const openAddRoute = (target: EnvironmentPresentation) => { + setRouteTarget(target); + setAddBackendHost(""); + setSavedBackendError(null); + setAddBackendDialogOpen(true); + }; + const openAddEnvironment = (host = "") => { + setRouteTarget(null); + setAddBackendHost(host); + setSavedBackendError(null); + setAddBackendDialogOpen(true); + }; + // The map is the page's main view where there is room; the list is its equivalent everywhere. + const roomForMap = useMediaQuery("md"); + const [pickedEnvironmentsView, setPickedEnvironmentsView] = useState<"map" | "list" | null>(null); + const environmentsView = roomForMap ? (pickedEnvironmentsView ?? "map") : "list"; const [removingSavedEnvironmentId, setRemovingSavedEnvironmentId] = useState(null); const [isUpdatingDesktopServerExposure, setIsUpdatingDesktopServerExposure] = useState(false); @@ -1808,14 +1830,36 @@ function ConnectionsSettingsContent({ { + const value = next[0]; + if (value === "map" || value === "list") setPickedEnvironmentsView(value); + }} + > + + {gt("Map", { $context: "view switch: show machines as a diagram" })} + + + {gt("List", { $context: "view switch: show items as a list" })} + + + ) : null + } headerAction={
{savedServerUpdateTargets.length > 0 ? ( ) : null} + {/* Actions on several machines at once, such as linking several, go here. */} } > - {listedEnvironments.map((environment) => ( - { - setRouteTarget(target); - setSavedBackendError(null); - setAddBackendDialogOpen(true); - }} + {environmentsView === "map" ? ( + + listedEnvironments.some( + (listed) => listed.environmentId === environment.environmentId, + ) ? ( + + ) : null + } + renderConnectMachine={(environmentId) => ( + + )} /> - ))} - + ) : ( + <> + {listedEnvironments.map((environment) => ( + + ))} + + + )} {hasCloudPublicConfig() ? ( ) : null} - {peerLinkHosts.map((environment, index) => ( - 1 ? environment.label : null} - isSearchTarget={index === 0} - /> - ))} + {environmentsView === "list" + ? peerLinkHosts.map((environment, index) => ( + 1 ? environment.label : null} + isSearchTarget={index === 0} + /> + )) + : null} diff --git a/apps/web/src/components/settings/EnvironmentsMap.tsx b/apps/web/src/components/settings/EnvironmentsMap.tsx new file mode 100644 index 0000000000000..51ccaaf26c2f1 --- /dev/null +++ b/apps/web/src/components/settings/EnvironmentsMap.tsx @@ -0,0 +1,1505 @@ +import { RegistryContext, useAtomValue } from "@effect/atom-react"; +import { + type ConnectionRouteKind, + connectionRouteId, + connectionRouteKind, + connectionRoutes, +} from "@t3tools/client-runtime/connection"; +import { + ANOTHER_ADDRESS, + linkableMachines, + offersLinkedEnvironments, +} from "@t3tools/client-runtime/link-request"; +import { thrownErrorMessage } from "@t3tools/client-runtime/errors"; +import type { PeerLinkHealth } from "@t3tools/client-runtime/state/peerLinks"; +import { AuthAccessWriteScope, type EnvironmentId } from "@t3tools/contracts"; +import * as DateTime from "effect/DateTime"; +import * as Option from "effect/Option"; +import { useGT, useMessages } from "gt-react"; +import { + AppWindowIcon, + CloudIcon, + GlobeIcon, + MaximizeIcon, + MinusIcon, + PlusIcon, + UnfoldVerticalIcon, + FoldVerticalIcon, +} from "lucide-react"; +import { + memo, + type FocusEvent, + type KeyboardEvent, + type PointerEvent, + type ReactNode, + useContext, + useEffect, + useEffectEvent, + useRef, + useState, +} from "react"; + +import { hasCloudPublicConfig } from "~/cloud/publicConfig"; +import { isElectron } from "~/env"; +import { useLiveRefresh } from "~/hooks/useLiveRefresh"; +import { useNowMinute } from "~/hooks/useNowMinute"; +import { observeResize } from "~/lib/observeResize"; +import { cn } from "~/lib/utils"; +import { + type EnvironmentPresentation, + useEnvironments, + useRelayEnvironmentDiscovery, + useRetainedRelayEnvironments, +} from "~/state/environments"; +import { environmentIdsKey } from "~/state/environmentAtomList"; +import { peerLinkEnvironment, peerLinkListsAtom, usePeerLinkHosts } from "~/state/peerLinks"; +import { formatEnvironmentQueryError } from "~/state/query"; +import { relayEnvironmentDiscovery } from "~/state/relay"; +import { preparedConnectionsAtom, useEnvironmentsWithScope } from "~/state/session"; +import { useAtomCommand } from "~/state/use-atom-command"; +import { accessConfig } from "../auth/ConnectAgentSurface"; +import { connectionPhaseDotClassName } from "../ConnectionStatusDot"; +import { EnvironmentMachineIcon } from "../EnvironmentMachineIcon"; +import { Button } from "../ui/button"; +import { + buildFleetGraph, + fitFleetLayout, + fleetCanvasHeight, + FLEET_CLIENT_NODE_ID, + fleetEnvironmentNodeId, + fleetFocusRects, + fleetLinkOffer, + fleetNeighborhood, + fleetShapeKey, + fleetStacks, + type FleetColumn, + type FleetDirection, + type FleetEnvironmentInput, + type FleetEnvironmentNode, + type FleetFocus, + type FleetGraph, + type FleetLayout, + type FleetLinkEdge, + type FleetLinkOffer, + type FleetNode, + type FleetRect, + type FleetRouteState, + type FleetStack, + type FleetViewTransform, + isLinkEdge, + isRouteEdge, + layoutFleetGraph, + zoomFleetView, + nextFleetNode, +} from "./environmentsMap.logic"; +import { + AccessMeter, + accessLevel, + FleetDetails, + type FleetDetailsProps, + HealthGlyph, + healthLabel, + healthTone, +} from "./EnvironmentsMapDetails"; +import { LinkEnvironmentDialog, type LinkEnvironmentPrefill } from "./LinkedEnvironmentsSettings"; +import { savedBackendStatus } from "./SavedEnvironmentRows"; +import { SettingsSearchTarget } from "./settingsLayout"; + +type GT = ReturnType; +type Messages = ReturnType; + +/** One ordinal scale for access, read only to full access: a link's line gets heavier and darker. */ +const ACCESS_STROKE_WIDTHS = [1.25, 1.75, 2.25, 2.75, 3.5]; +const ACCESS_STROKE_OPACITIES = [0.4, 0.5, 0.62, 0.76, 0.9]; +const CANVAS_HEIGHT = { min: 260, max: 620 }; +const ARROW_ROVE: Record = { + ArrowUp: "up", + ArrowDown: "down", + ArrowLeft: "left", + ArrowRight: "right", +}; +const NO_STACKS: ReadonlySet = new Set(); + +/** Dashes repeat a link's health without colour, one pattern per kind of trouble. */ +function healthDash(health: PeerLinkHealth): string | undefined { + if (health.kind === "expired") return "1 5"; + if (health.kind === "failing") return "8 3 1 3"; + return health.kind === "unreachable" ? "5 4" : undefined; +} + +const troubleRank = (health: PeerLinkHealth) => + health.kind === "expired" + ? 0 + : health.kind === "failing" + ? 1 + : health.kind === "unreachable" + ? 2 + : health.expiresInDays === null + ? 4 + : 3; +/** Worst first: a machine several hosts link to wears the health of its most troubled link. */ +const byTrouble = (left: FleetLinkEdge, right: FleetLinkEdge) => + troubleRank(left.health) - troubleRank(right.health); + +/** A machine's outline carries its link's health too. */ +function healthBorder(health: PeerLinkHealth): string { + if (health.kind === "expired") return "border-dotted border-destructive/70"; + if (health.kind === "failing") return "border-destructive/70"; + if (health.kind === "unreachable") return "border-dashed border-foreground/35"; + return health.expiresInDays === null ? "border-border" : "border-warning/70"; +} + +/** How each route state is drawn: the one in use stands out, the rest stay quiet. */ +const ROUTE_STYLES: Record< + FleetRouteState, + { readonly wire: string; readonly width: number; readonly dash?: string; readonly pill: string } +> = { + "in-use": { + wire: "text-success", + width: 1.75, + pill: "border-success/70 font-medium text-foreground", + }, + standby: { wire: "text-muted-foreground/60", width: 1, pill: "border-border" }, + trying: { wire: "text-warning", width: 1, dash: "1 4", pill: "border-warning/60" }, + down: { wire: "text-muted-foreground/60", width: 1, dash: "4 4", pill: "border-dashed" }, + idle: { wire: "text-muted-foreground/40", width: 1, dash: "4 4", pill: "border-dashed" }, + refused: { + wire: "text-destructive/80", + width: 1, + dash: "4 4", + pill: "border-dashed border-destructive/60 text-destructive", + }, + offered: { wire: "text-muted-foreground/50", width: 1, dash: "1 4", pill: "border-dotted" }, +}; + +function routeKindLabel(kind: ConnectionRouteKind, gt: GT): string { + switch (kind) { + case "relay": + return "T3 Connect"; + case "loopback": + return gt("This device"); + case "lan": + return "LAN"; + case "tailnet": + return "Tailscale"; + case "vpn": + return "VPN"; + case "ssh": + return "SSH"; + case "public": + return gt("Public", { $context: "kind of network route: a public internet address" }); + } +} + +function routeStateLabel(state: FleetRouteState, gt: GT): string { + switch (state) { + case "in-use": + return gt("In use"); + case "standby": + return gt("Standby", { $context: "a network route that is saved but not carrying traffic" }); + case "trying": + return gt("Connecting"); + case "down": + return gt("Not connected"); + case "idle": + return gt("Not in use"); + case "refused": + return gt("Sign-in refused"); + case "offered": + return gt("Not added"); + } +} + +/** Asks T3 Connect for the account's machines once, as the list's own rows do on mount. */ +function useConnectMachines() { + const gt = useGT(); + const m = useMessages(); + const discovery = useRelayEnvironmentDiscovery(); + const refresh = useAtomCommand(relayEnvironmentDiscovery.refresh, { reportFailure: false }); + const discoverIfUnasked = useEffectEvent(() => { + if (hasCloudPublicConfig() && !discovery.listed && !discovery.refreshing) void refresh(); + }); + // oxlint-disable-next-line t3code/no-unreasoned-state-sync -- one T3 Connect listing when the map mounts, the request the list makes on mount + useEffect(() => { + discoverIfUnasked(); + }, []); + const machines = useRetainedRelayEnvironments(); + // A failed listing is not an account with no machines: say so, with a way to ask again. + const message = discovery.refreshing + ? null + : discovery.offline && !discovery.listed + ? gt("You appear to be offline.") + : thrownErrorMessage(Option.getOrNull(discovery.error), m); + return { + machines, + problem: message === null ? null : { message, retry: () => void refresh() }, + }; +} + +function useFleetGraph() { + const gt = useGT(); + const m = useMessages(); + const { environments } = useEnvironments(); + const hosts = usePeerLinkHosts(); + const nowMinute = useNowMinute(); + const hostsKey = environmentIdsKey(hosts.map((host) => host.environmentId)); + const lists = useAtomValue(peerLinkListsAtom(hostsKey)); + const registry = useContext(RegistryContext); + // Links made from another client or the CLI bump nothing these lists read, so coming back to + // the window asks again, as the list view does, and so does a change in which machines can be + // asked. Listing probes every linked machine: too costly for a timer. + useLiveRefresh( + () => { + for (const host of hosts) { + const list = peerLinkEnvironment.list({ environmentId: host.environmentId, input: {} }); + if (!registry.get(list).waiting) registry.refresh(list); + } + }, + { key: `environments-map:${hostsKey}`, intervalMs: null, refreshOnShow: true }, + ); + const prepared = useAtomValue( + preparedConnectionsAtom( + environmentIdsKey(environments.map((environment) => environment.environmentId)), + ), + ); + const writable = useEnvironmentsWithScope(environments, AuthAccessWriteScope); + const { machines: connect, problem: connectProblem } = useConnectMachines(); + const machines = linkableMachines({ + environments, + threadEnvironmentId: null, + links: [], + connect, + }); + const machineById = new Map(machines.map((machine) => [machine.environmentId, machine])); + const listByHost = new Map(hosts.map((host, index) => [host.environmentId, lists[index]])); + const inputs = environments.map((environment, index): FleetEnvironmentInput => { + const list = listByHost.get(environment.environmentId); + const connected = environment.connection.phase === "connected"; + const active = connected ? Option.getOrNull(prepared[index] ?? Option.none()) : null; + const offersLinks = offersLinkedEnvironments(environment.serverConfig); + return { + environmentId: environment.environmentId, + label: environment.label, + machine: machineById.get(environment.environmentId)?.machine ?? null, + phase: environment.connection.phase, + enabled: environment.entry.enabled, + routes: connectionRoutes(environment.entry).map((route) => ({ + id: connectionRouteId(route.target), + kind: connectionRouteKind(route), + })), + activeRouteId: active === null ? null : connectionRouteId(active.target), + refusedRouteIds: environment.refusedRouteIds, + offersLinks, + canWriteAccess: writable.has(environment.environmentId), + hasLinkAddress: (machineById.get(environment.environmentId)?.urls.length ?? 0) > 0, + outgoing: + list === undefined + ? { state: connected && !offersLinks ? "off" : "unknown" } + : list._tag === "Success" + ? { state: "loaded", links: list.value.links } + : list._tag === "Failure" + ? { state: "error", message: formatEnvironmentQueryError(list.cause, m) } + : { state: "loading" }, + }; + }); + const graph = buildFleetGraph({ + clientLabel: isElectron ? gt("This device") : gt("This browser"), + environments: inputs, + connectMachines: machines + .filter((machine) => machine.connectOnly) + .map((machine) => ({ + environmentId: machine.environmentId, + label: machine.label, + machine: machine.machine, + availability: connect.get(machine.environmentId)?.availability ?? "checking", + })), + now: DateTime.makeUnsafe(nowMinute), + }); + return { graph, environments, connectProblem }; +} + +/** The layout for the graph's current shape; a health or status change reuses the last one. */ +function useFleetLayout(graph: FleetGraph, stacks: ReadonlyArray) { + const key = fleetShapeKey(graph, stacks); + const [laid, setLaid] = useState(() => ({ key, layout: layoutFleetGraph(graph, stacks) })); + if (laid.key === key) return laid; + const next = { key, layout: layoutFleetGraph(graph, stacks) }; + setLaid(next); + return next; +} + +interface LinkRequest { + readonly serial: number; + readonly environmentId: EnvironmentId; + readonly prefill: LinkEnvironmentPrefill; + readonly open: boolean; +} + +/** + * Every machine this app knows about, how it reaches each one, and which of them are linked. + * Selecting a machine shows the controls the list has for it. + */ +export function EnvironmentsMap( + props: Pick< + FleetDetailsProps, + "renderSavedEnvironment" | "renderConnectMachine" | "onAddEnvironment" + > & { readonly footerId?: string }, +) { + const { graph, environments, connectProblem } = useFleetGraph(); + const [expanded, setExpanded] = useState(NO_STACKS); + const stacks = fleetStacks(graph, expanded); + const { key, layout } = useFleetLayout(graph, stacks); + const [picked, setPicked] = useState(null); + const [linkRequest, setLinkRequest] = useState(null); + const selection = + picked === null + ? null + : (picked.kind === "stack" + ? stacks + : picked.kind === "node" + ? graph.nodes + : graph.edges + ).some((item) => item.id === picked.id) + ? picked + : null; + const toggleStack = (stackId: string) => + setExpanded((current) => { + const next = new Set(current); + if (!next.delete(stackId)) next.add(stackId); + return next; + }); + // One dialog for every way in: a drop names the target, the handle and the details do not. + const requestLink = (sourceId: string, targetId: string | null) => { + const source = graph.nodes.find((node) => node.id === sourceId); + if (source?.kind !== "environment" || source.linking !== "ready") return; + const offer = targetId === null ? null : fleetLinkOffer(graph, sourceId, targetId); + if (offer !== null && offer.kind !== "link") return; + setLinkRequest((current) => ({ + serial: (current?.serial ?? 0) + 1, + environmentId: source.environmentId, + open: true, + prefill: + offer === null + ? { choice: null } + : offer.target.kind === "machine" + ? { choice: offer.target.environmentId } + : { choice: ANOTHER_ADDRESS, address: offer.target.address ?? "" }, + })); + }; + return ( + <> + + + requestLink(sourceId, null)} + onToggleStack={toggleStack} + /> + + {linkRequest ? ( + + setLinkRequest((current) => (current === null ? null : { ...current, open })) + } + /> + ) : null} + + ); +} + +interface FleetSceneProps { + readonly graph: FleetGraph; + readonly stacks: ReadonlyArray; + readonly layout: FleetLayout; + readonly environments: ReadonlyArray; + readonly selection: FleetFocus | null; + readonly onSelect: (focus: FleetFocus | null) => void; + readonly onLink: (sourceId: string, targetId: string | null) => void; + readonly onToggleStack: (stackId: string) => void; +} + +function FleetCanvas({ shapeKey, ...scene }: FleetSceneProps & { readonly shapeKey: string }) { + const gt = useGT(); + const { layout, onSelect } = scene; + const [canvas, setCanvas] = useState(null); + const [width, setWidth] = useState(null); + // A view the user set by hand holds until the map's shape changes; otherwise it fits itself. + const [manual, setManual] = useState<{ + readonly key: string; + readonly view: FleetViewTransform; + /** Set by the buttons and keys, whose jump is eased; a drag or pinch tracks the hand. */ + readonly glide: boolean; + } | null>(null); + const [dragging, setDragging] = useState(false); + const drag = useRef<{ + readonly pointerId: number; + readonly key: string; + readonly x: number; + readonly y: number; + readonly origin: FleetViewTransform; + moved: boolean; + } | null>(null); + // The canvas is as tall as the fitted map wants, so the height never feeds back into the fit. + const size = + width === null ? null : { width, height: fleetCanvasHeight(layout, width, CANVAS_HEIGHT) }; + // A new shape drops the held view for good: returning to an old shape must fit, not restore + // a pan made before the map changed. + if (manual !== null && manual.key !== "" && manual.key !== shapeKey) { + setManual({ ...manual, key: "" }); + } + const held = manual?.key === shapeKey ? manual : null; + const view = held?.view ?? (size === null ? null : fitFleetLayout(layout, size)); + const glide = manual !== null && (held === null || held.glide); + const setView = (next: FleetViewTransform, eased: boolean) => + setManual({ key: shapeKey, view: next, glide: eased }); + const zoom = ( + factor: number, + anchor?: { readonly x: number; readonly y: number }, + eased = true, + ) => { + if (view === null || size === null) return; + setView( + zoomFleetView( + view, + factor, + anchor ?? { x: size.width / 2, y: size.height / 2 }, + fitFleetLayout(layout, size).scale, + ), + eased, + ); + }; + // Keeps the entry so the scene eases back to the fit; its stale key marks it as not held. + const fit = () => setManual((current) => (current === null ? null : { ...current, key: "" })); + const onWheel = useEffectEvent((event: WheelEvent) => { + // Plain scrolling stays the page's; a pinch or Ctrl/Cmd + wheel zooms the map. + if (!event.ctrlKey && !event.metaKey) return; + event.preventDefault(); + const bounds = (event.currentTarget as HTMLElement).getBoundingClientRect(); + zoom( + Math.exp(-event.deltaY * 0.01), + { x: event.clientX - bounds.left, y: event.clientY - bounds.top }, + false, + ); + }); + // oxlint-disable-next-line t3code/no-unreasoned-state-sync -- measures the canvas with ResizeObserver, and React's wheel listener is passive so it cannot stop the page zooming + useEffect(() => { + if (canvas === null) return; + const stopObserving = observeResize(canvas, ([entry]) => { + if (entry) setWidth(entry.contentRect.width); + }); + canvas.addEventListener("wheel", onWheel, { passive: false }); + return () => { + stopObserving(); + canvas.removeEventListener("wheel", onWheel); + }; + }, [canvas]); + + // Reads the view inside the updater so the scene's props stay the same while panning. + const reveal = (rect: FleetRect) => { + if (size === null) return; + setManual((current) => { + const shown = current?.key === shapeKey ? current.view : fitFleetLayout(layout, size); + const left = rect.x * shown.scale + shown.x; + const top = rect.y * shown.scale + shown.y; + const inside = + left >= 0 && + top >= 0 && + left + rect.width * shown.scale <= size.width && + top + rect.height * shown.scale <= size.height; + if (inside) return current; + return { + key: shapeKey, + glide: true, + view: { + scale: shown.scale, + x: size.width / 2 - (rect.x + rect.width / 2) * shown.scale, + y: size.height / 2 - (rect.y + rect.height / 2) * shown.scale, + }, + }; + }); + }; + + const onPointerDown = (event: PointerEvent) => { + // One pointer owns a drag: a second finger neither restarts it nor ends it. + if (event.button !== 0 || view === null || drag.current !== null) return; + if ((event.target as Element).closest("[data-fleet-item]")) return; + drag.current = { + pointerId: event.pointerId, + key: shapeKey, + x: event.clientX, + y: event.clientY, + origin: view, + moved: false, + }; + event.currentTarget.setPointerCapture(event.pointerId); + }; + const onPointerMove = (event: PointerEvent) => { + const current = drag.current; + if (current === null || current.pointerId !== event.pointerId) return; + // The map was laid out again mid-drag, so the origin belongs to a view that is gone. + if (current.key !== shapeKey) { + drag.current = null; + setDragging(false); + return; + } + const dx = event.clientX - current.x; + const dy = event.clientY - current.y; + if (!current.moved && Math.hypot(dx, dy) < 4) return; + if (!current.moved) setDragging(true); + current.moved = true; + setView({ ...current.origin, x: current.origin.x + dx, y: current.origin.y + dy }, false); + }; + const endDrag = (event: PointerEvent, cancelled: boolean) => { + const current = drag.current; + if (current === null || current.pointerId !== event.pointerId) return; + drag.current = null; + setDragging(false); + if (!current.moved && !cancelled) onSelect(null); + }; + const onKeyDown = (event: KeyboardEvent) => { + if (event.ctrlKey || event.metaKey || event.altKey) return; + if (event.key === "+" || event.key === "=") zoom(1.25); + else if (event.key === "-") zoom(0.8); + else if (event.key === "0") fit(); + else if (event.key === "Escape") onSelect(null); + else return; + event.preventDefault(); + }; + + return ( + <> +
endDrag(event, false)} + onPointerCancel={(event) => endDrag(event, true)} + onLostPointerCapture={(event) => endDrag(event, true)} + onKeyDown={onKeyDown} + > + {view === null ? null : ( +
+ +
+ )} +
+ {/* Below the canvas, not over it: nothing on the map can end up under the controls. */} +
+ +
+ + + +
+
+ + ); +} + +/** How the two families of line are read: routes by state, links by weight. */ +function FleetLegend() { + const gt = useGT(); + const sample = (state: FleetRouteState) => ( + + + + ); + return ( +
    +
  • + {sample("in-use")} + {gt("Route in use")} +
  • +
  • + {sample("standby")} + {routeStateLabel("standby", gt)} +
  • +
  • + {sample("down")} + {routeStateLabel("down", gt)} +
  • +
  • + + + + {gt("Link, heavier with more access")} +
  • +
+ ); +} + +/** A state short enough for a card. The reason behind it is in the details and the name. */ +function connectionStateText( + node: FleetEnvironmentNode, + environment: EnvironmentPresentation | undefined, + refused: boolean, + gt: GT, +): string { + if (!node.enabled && node.phase !== "unsupported") { + return gt("Off", { $context: "environment switched off" }); + } + if (refused) return gt("Sign-in refused"); + switch (node.phase) { + case "connected": + return gt("Connected"); + case "connecting": + return gt("Connecting…"); + case "reconnecting": + return environment?.connection.awaitingApproval + ? gt("Waiting for approval") + : gt("Reconnecting…"); + case "unsupported": + return gt("Client not supported"); + case "error": + return gt("Connection failed"); + case "offline": + return gt("Offline"); + case "available": + return gt("Not connected"); + } +} + +function environmentStatusText( + node: FleetEnvironmentNode, + environment: EnvironmentPresentation | undefined, + refused: boolean, + linkCount: number, + gt: GT, +): string { + if (node.phase !== "connected") return connectionStateText(node, environment, refused, gt); + switch (node.outgoing) { + case "loading": + return gt("Loading links…"); + case "error": + return gt("Links could not be loaded"); + case "off": + return gt("Linked environments is off"); + case "unknown": + return gt("Links not readable from here"); + case "loaded": + return gt("{count, plural, =0 {No links out} one {# link out} other {# links out}}", { + count: linkCount, + }); + } +} + +function connectAvailabilityText( + availability: Extract["availability"], + gt: GT, +): string { + switch (availability) { + case "online": + return gt("Relay online"); + case "offline": + return gt("Relay offline"); + case "checking": + return gt("Checking relay status…"); + case "error": + return gt("Relay status unavailable"); + } +} + +function linkSummary(edge: FleetLinkEdge, gt: GT, m: Messages): string { + return `${m(accessConfig[edge.link.access].label)}, ${healthLabel(edge.health, gt)}`; +} + +function offerText(offer: FleetLinkOffer, target: string, gt: GT): string { + if (offer.kind !== "link") return gt("Cannot link to this"); + if (offer.path === "code-less") { + return offer.renews + ? gt("Renew the link to {target}. No pairing code needed", { target }) + : gt("Link to {target}. No pairing code needed", { target }); + } + return offer.renews + ? gt("Renew the link to {target}. Needs a pairing code from it", { target }) + : gt("Link to {target}. Needs a pairing code from it", { target }); +} + +const COLUMN_TITLES = (gt: GT): Record => ({ + client: gt("This app"), + environments: gt("Your environments"), + targets: gt("Reached through a link"), +}); + +interface LinkDrag { + readonly sourceId: string; + readonly x: number; + readonly y: number; + readonly overId: string | null; +} + +const FleetScene = memo(function FleetScene({ + graph, + stacks, + layout, + environments, + selection, + onSelect, + onLink, + onToggleStack, + onReveal, +}: FleetSceneProps & { readonly onReveal: (rect: FleetRect) => void }) { + const gt = useGT(); + const m = useMessages(); + const [hover, setHover] = useState(null); + const [roving, setRoving] = useState(FLEET_CLIENT_NODE_ID); + const [linkDrag, setLinkDrag] = useState(null); + const handleDrag = useRef<{ + readonly pointerId: number; + readonly x: number; + readonly y: number; + moved: boolean; + } | null>(null); + // A drag ends with a click on the handle it started from; that click must not open the dialog. + const swallowClick = useRef(false); + const focus = linkDrag === null ? (hover ?? selection) : null; + const lit = focus === null ? null : fleetNeighborhood(graph, stacks, focus); + const nodeById = new Map(graph.nodes.map((node) => [node.id, node])); + const environmentById = new Map( + environments.map((environment) => [ + fleetEnvironmentNodeId(environment.environmentId), + environment, + ]), + ); + const links = graph.edges.filter(isLinkEdge); + const routeEdges = graph.edges.filter(isRouteEdge); + const focusRects = fleetFocusRects(layout); + const tabStop = focusRects.has(roving) ? roving : FLEET_CLIENT_NODE_ID; + const titles = COLUMN_TITLES(gt); + const isSelected = (kind: FleetFocus["kind"], id: string) => + selection?.kind === kind && selection.id === id; + const fade = (dimmed: boolean) => + cn( + "transition-opacity duration-150 motion-reduce:transition-none", + dimmed && "opacity-40 forced-colors:opacity-60", + ); + // Lines run the length of the map and cross each other, so one out of focus fades further + // than a machine does. + const fadeLine = (dimmed: boolean) => + cn( + "transition-opacity duration-150 motion-reduce:transition-none", + dimmed && "opacity-15 forced-colors:opacity-40", + ); + const linkLit = (edge: FleetLinkEdge) => + isSelected("edge", edge.id) || (lit?.edges.has(edge.id) ?? false); + // Painted last, so the links in focus lie over the ones that are not. + const paintOrder = lit === null ? links : links.toSorted((a, b) => +linkLit(a) - +linkLit(b)); + const dragOffer = (targetId: string) => + linkDrag === null ? null : fleetLinkOffer(graph, linkDrag.sourceId, targetId); + const nodeDimmed = (id: string) => + linkDrag !== null + ? id !== linkDrag.sourceId && dragOffer(id)?.kind !== "link" + : lit !== null && !lit.nodes.has(id); + // By the links it stands for: a host and a member can both be lit through other links. + const stackLit = (stack: FleetStack) => + lit === null || stack.edgeIds.some((id) => lit.edges.has(id)); + const hoverProps = (target: FleetFocus) => ({ + onPointerEnter: () => setHover(target), + onPointerLeave: () => setHover(null), + }); + + const onKeyDown = (event: KeyboardEvent) => { + const direction = ARROW_ROVE[event.key]; + const from = (event.target as HTMLElement).closest("[data-fleet-node]"); + if (direction === undefined || from === null) return; + event.preventDefault(); + const next = nextFleetNode(focusRects, from.dataset.fleetNode ?? "", direction); + const rect = next === null ? undefined : focusRects.get(next); + if (next === null || rect === undefined) return; + event.currentTarget + .querySelector(`[data-fleet-node="${CSS.escape(next)}"]`) + ?.focus({ preventScroll: true }); + onReveal(rect); + }; + + const focusProps = (target: FleetFocus, rect: FleetRect, label: string) => ({ + type: "button" as const, + "data-fleet-item": "", + "data-fleet-node": target.id, + "aria-label": label, + "aria-pressed": isSelected(target.kind, target.id), + tabIndex: target.id === tabStop ? 0 : -1, + style: { left: rect.x, top: rect.y, width: rect.width, height: rect.height }, + onClick: () => onSelect(isSelected(target.kind, target.id) ? null : target), + onFocus: (event: FocusEvent) => { + setRoving(target.id); + setHover(target); + // Tabbing back in can land on a machine panned out of view; a click cannot. + if (event.currentTarget.matches(":focus-visible")) onReveal(rect); + }, + onBlur: () => setHover(null), + ...hoverProps(target), + }); + const nodeClass = (id: string) => + cn( + "absolute flex cursor-pointer items-center text-left outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset aria-pressed:ring-2 aria-pressed:ring-primary aria-pressed:ring-inset forced-colors:focus-visible:outline-2 forced-colors:aria-pressed:outline-2", + fade(nodeDimmed(id)), + linkDrag?.overId === id && "ring-2 ring-primary ring-inset", + ); + + const toScene = (event: PointerEvent) => { + const bounds = event.currentTarget.closest("[data-fleet-scene]")?.getBoundingClientRect(); + if (!bounds || bounds.width === 0) return null; + const scale = bounds.width / layout.width; + return { x: (event.clientX - bounds.left) / scale, y: (event.clientY - bounds.top) / scale }; + }; + const dropTargetAt = (sourceId: string, event: PointerEvent) => { + const over = document + .elementFromPoint(event.clientX, event.clientY) + ?.closest("[data-fleet-node]")?.dataset.fleetNode; + return over !== undefined && fleetLinkOffer(graph, sourceId, over).kind === "link" + ? over + : null; + }; + const handleProps = (sourceId: string) => ({ + onPointerDown: (event: PointerEvent) => { + if (event.button !== 0 || handleDrag.current !== null) return; + swallowClick.current = false; + handleDrag.current = { + pointerId: event.pointerId, + x: event.clientX, + y: event.clientY, + moved: false, + }; + event.currentTarget.setPointerCapture(event.pointerId); + }, + onPointerMove: (event: PointerEvent) => { + const current = handleDrag.current; + if (current === null || current.pointerId !== event.pointerId) return; + if (!current.moved && Math.hypot(event.clientX - current.x, event.clientY - current.y) < 4) { + return; + } + current.moved = true; + const point = toScene(event); + if (point === null) return; + setLinkDrag({ sourceId, ...point, overId: dropTargetAt(sourceId, event) }); + }, + onPointerUp: (event: PointerEvent) => { + const current = handleDrag.current; + if (current === null || current.pointerId !== event.pointerId) return; + handleDrag.current = null; + if (!current.moved) return; + swallowClick.current = true; + // Asked again at release: the map can move under a pointer that has stopped. + const overId = dropTargetAt(sourceId, event); + setLinkDrag(null); + if (overId !== null) onLink(sourceId, overId); + }, + onLostPointerCapture: () => { + if (handleDrag.current === null) return; + handleDrag.current = null; + setLinkDrag(null); + }, + onClick: () => { + if (swallowClick.current) { + swallowClick.current = false; + return; + } + onLink(sourceId, null); + }, + }); + + const dragSource = linkDrag === null ? undefined : layout.handles.get(linkDrag.sourceId); + const dragTarget = linkDrag?.overId ? nodeById.get(linkDrag.overId) : undefined; + + return ( +
+ {layout.columns.map((column) => ( +

+ {titles[column.id]} +

+ ))} + + {routeEdges.map((edge) => { + const geometry = layout.routes.get(edge.id); + if (geometry === undefined) return null; + const style = ROUTE_STYLES[edge.state]; + return ( + + ); + })} + {stacks.map((stack) => { + const geometry = layout.stacks.get(stack.id); + if (geometry === undefined) return null; + const level = accessLevel(stack.access); + const onPath = stackLit(stack); + return ( + + + + + ); + })} + {paintOrder.map((edge) => { + const geometry = layout.links.get(edge.id); + if (geometry === undefined) return null; + const { arrow } = geometry; + const selected = isSelected("edge", edge.id); + const level = accessLevel(edge.link.access); + const healthy = edge.health.kind === "reachable" && edge.health.expiresInDays === null; + return ( + + + + + ); + })} + {/* Pointer shortcut only: each link is also a row in its machines' details. Kept in a + fixed order apart from the painted lines, so focus never moves one under the pointer. */} + {links.map((edge) => { + const geometry = layout.links.get(edge.id); + if (geometry === undefined) return null; + const selected = isSelected("edge", edge.id); + return ( + onSelect(selected ? null : { kind: "edge", id: edge.id })} + {...hoverProps({ kind: "edge", id: edge.id })} + > + + {gt("Link from {source} to {target}: {summary}", { + source: nodeById.get(edge.from)?.label ?? "", + target: nodeById.get(edge.to)?.label ?? "", + summary: linkSummary(edge, gt, m), + })} + + + ); + })} + {linkDrag !== null && dragSource !== undefined ? ( + + ) : null} + + {routeEdges.map((edge) => { + const geometry = layout.routes.get(edge.id); + if (geometry === undefined) return null; + const { pill } = geometry; + return ( + + {routeKindLabel(edge.routeKind, gt)} + + ); + })} + {links.map((edge) => { + const badge = layout.links.get(edge.id)?.badge; + if (!badge) return null; + const target = { kind: "edge", id: edge.id } as const; + return ( + + ); + })} + {stacks.map((stack) => { + const geometry = layout.stacks.get(stack.id); + if (geometry === undefined) return null; + const { face, rect } = geometry; + const access = m(accessConfig[stack.access].label); + const count = stack.memberIds.length; + const summary = gt("{access}. {reachable} of {count} reachable", { + access, + reachable: stack.reachable, + count, + }); + const troubled = stack.reachable < count; + const ToggleIcon = stack.expanded ? FoldVerticalIcon : UnfoldVerticalIcon; + return ( +
+ {stack.expanded ? ( +
+ ) : ( + [8, 4].map((lift) => ( +
+ )) + )} + + +
+ ); + })} + {graph.nodes.map((node) => { + const rect = layout.nodes.get(node.id); + if (rect === undefined) return null; + const target = { kind: "node", id: node.id } as const; + if (node.kind === "client") { + const ClientIcon = isElectron ? AppWindowIcon : GlobeIcon; + return ( + + ); + } + const incoming = links.filter((edge) => edge.to === node.id); + if (node.kind === "target") { + // One link in names its access here. Several are told apart by the one in focus: + // hovering or selecting a host shows what that host may do on this machine. + const focused = incoming.filter((edge) => lit?.edges.has(edge.id)); + const shown = + incoming.length === 1 ? incoming[0] : focused.length === 1 ? focused[0] : undefined; + const first = shown ?? incoming.toSorted(byTrouble)[0]; + const compact = rect.height < 32; + return ( + + ); + } + if (node.kind === "connect") { + const status = `${gt("Not added")} · ${connectAvailabilityText(node.availability, gt)}`; + return ( + + ); + } + const environment = environmentById.get(node.id); + const routes = routeEdges.filter((edge) => edge.to === node.id); + const status = environmentStatusText( + node, + environment, + routes.length > 0 && routes.every((edge) => edge.state === "refused"), + links.filter((edge) => edge.from === node.id).length, + gt, + ); + // The card's state is short; the name carries the reason and what it leaves unknown. + const spoken = + node.phase === "connected" + ? status + : gt("{status}. Links unknown", { + status: environment ? savedBackendStatus(environment, m).text : status, + }); + const dimmed = !node.enabled || node.phase === "unsupported"; + const handle = layout.handles.get(node.id); + const over = linkDrag?.overId === node.id; + return ( +
+ + {handle !== undefined && node.linking === "ready" ? ( + + ) : null} +
+ ); + })} + {linkDrag !== null ? ( + + {dragTarget + ? offerText(dragOffer(dragTarget.id)!, dragTarget.label, gt) + : gt("Drop on a machine to link {source} to it", { + source: nodeById.get(linkDrag.sourceId)?.label ?? "", + })} + + ) : null} +
+ ); +}); + +function DragHint({ x, y, children }: { x: number; y: number; children: ReactNode }) { + return ( +

+ {children} +

+ ); +} diff --git a/apps/web/src/components/settings/EnvironmentsMapDetails.tsx b/apps/web/src/components/settings/EnvironmentsMapDetails.tsx new file mode 100644 index 0000000000000..81e8d38a8d590 --- /dev/null +++ b/apps/web/src/components/settings/EnvironmentsMapDetails.tsx @@ -0,0 +1,693 @@ +import { useAtomValue } from "@effect/atom-react"; +import { connectionStatusTitle } from "@t3tools/client-runtime/connection"; +import type { PeerLinkHealth } from "@t3tools/client-runtime/state/peerLinks"; +import { + AuthMcpClientAccess, + type EnvironmentId, + resolveEnvironmentMachineKind, +} from "@t3tools/contracts"; +import * as DateTime from "effect/DateTime"; +import { T, useGT, useMessages } from "gt-react"; +import { ArrowRightIcon, ClockAlertIcon, PlusIcon, TriangleAlertIcon, XIcon } from "lucide-react"; +import { type ReactNode, useRef } from "react"; + +import { environmentCatalog } from "~/connection/catalog"; +import { cn } from "~/lib/utils"; +import type { EnvironmentPresentation } from "~/state/environments"; +import { peerLinkEnvironment } from "~/state/peerLinks"; +import { useAtomCommand } from "~/state/use-atom-command"; +import { accessConfig } from "../auth/ConnectAgentSurface"; +import { Button } from "../ui/button"; +import { formatAccessTimestamp } from "./ConnectionsSettings.logic"; +import { EnvironmentRow, EnvironmentTransportLabel } from "./EnvironmentRow"; +import { + type FleetEnvironmentNode, + type FleetFocus, + type FleetGraph, + type FleetLinkEdge, + type FleetNode, + type FleetStack, + fleetSummary, + isLinkEdge, + linkNeedsAttention, +} from "./environmentsMap.logic"; +import { peerLinkStatusText, useForgetPeerLink } from "./LinkedEnvironmentsSettings"; +import { savedBackendStatus } from "./SavedEnvironmentRows"; + +type GT = ReturnType; + +const ACCESS_LEVELS = AuthMcpClientAccess.literals; +export const accessLevel = (access: AuthMcpClientAccess) => ACCESS_LEVELS.indexOf(access); + +/** Colour says how a link is doing; a healthy one stays neutral so trouble stands out. */ +export function healthTone(health: PeerLinkHealth): string { + if (health.kind === "expired" || health.kind === "failing") return "text-destructive"; + if (health.kind === "unreachable") return "text-muted-foreground"; + return health.expiresInDays === null ? "text-foreground/70" : "text-warning"; +} + +export function healthLabel(health: PeerLinkHealth, gt: GT): string { + switch (health.kind) { + case "expired": + return gt("Expired", { $context: "status of a link between two machines" }); + case "unreachable": + return gt("Not answering"); + case "failing": + return gt("Failing", { $context: "status of a link between two machines" }); + case "reachable": + return health.expiresInDays === null + ? gt("Reachable") + : gt("{days, plural, one {Expires in {days} day} other {Expires in {days} days}}", { + days: health.expiresInDays, + }); + } +} + +/** Five rising bars, filled up to the access a link grants: read only is one, full access five. */ +export function AccessMeter({ + access, + className, +}: { + access: AuthMcpClientAccess; + className?: string; +}) { + const level = accessLevel(access); + return ( + + {ACCESS_LEVELS.map((step, index) => ( + + ))} + + ); +} + +export function HealthGlyph({ health }: { health: PeerLinkHealth }) { + const tone = healthTone(health); + if (health.kind === "expired") return ; + if (health.kind === "failing") { + return ; + } + if (health.kind === "unreachable") { + return ; + } + return health.expiresInDays === null ? ( + + ) : ( + + ); +} + +export interface FleetDetailsProps { + readonly graph: FleetGraph; + readonly stacks: ReadonlyArray; + readonly environments: ReadonlyArray; + /** Why the account's T3 Connect machines are missing from the map, and how to ask again. */ + readonly connectProblem: { readonly message: string; readonly retry: () => void } | null; + readonly selection: FleetFocus | null; + readonly onSelect: (focus: FleetFocus | null) => void; + /** Opens the link flow from an environment, with no target picked yet. */ + readonly onLinkFrom: (sourceId: string) => void; + readonly onToggleStack: (stackId: string) => void; + /** The list's own row for a saved environment, or null where the list has none. */ + readonly renderSavedEnvironment: (environment: EnvironmentPresentation) => ReactNode; + readonly renderConnectMachine: (environmentId: EnvironmentId) => ReactNode; + readonly onAddEnvironment: (host?: string) => void; +} + +const SECTION = "px-3 py-3 sm:px-4"; + +/** What is selected on the map, with the controls the list keeps on each row. */ +export function FleetDetails(props: FleetDetailsProps) { + const { graph, stacks, selection, onSelect, connectProblem } = props; + const gt = useGT(); + const panel = useRef(null); + const links = graph.edges.filter(isLinkEdge); + const node = + selection?.kind === "node" ? graph.nodes.find((entry) => entry.id === selection.id) : undefined; + const edge = + selection?.kind === "edge" ? links.find((entry) => entry.id === selection.id) : undefined; + const stack = + selection?.kind === "stack" ? stacks.find((entry) => entry.id === selection.id) : undefined; + const labelOf = (id: string) => graph.nodes.find((entry) => entry.id === id)?.label ?? ""; + // Choosing inside the panel replaces the control that was pressed, so focus stays on the panel. + const selectWithin = (focus: FleetFocus) => { + onSelect(focus); + panel.current?.focus(); + }; + return ( +
+ {connectProblem ? ( +
+

+ + Could not load T3 Connect environments + {" "} + {connectProblem.message} +

+ +
+ ) : null} + {edge ? ( +
+ +
+ ) : stack ? ( + props.onToggleStack(stack.id)} + /> + ) : node ? ( + + ) : ( + + )} +
+ ); +} + +function Heading({ children, detail }: { children: ReactNode; detail?: ReactNode }) { + return ( +
+

{children}

+ {detail ? {detail} : null} +
+ ); +} + +function FleetSummary({ + graph, + links, +}: { + readonly graph: FleetGraph; + readonly links: ReadonlyArray; +}) { + const gt = useGT(); + const summary = fleetSummary(graph); + const attention = links.filter((edge) => linkNeedsAttention(edge.health)).length; + const { machines } = summary; + const canLink = graph.nodes.some( + (entry) => entry.kind === "environment" && entry.linking === "ready", + ); + return ( +
+ 0 + ? gt( + "{count, plural, one {# link needs attention.} other {# links need attention.}}", + { count: attention }, + ) + : null + } + > + {summary.links !== null + ? gt( + "{machines, plural, one {# machine} other {# machines}}, {links, plural, =0 {no links} one {# link} other {# links}}", + { machines, links: summary.links }, + ) + : gt("{machines, plural, one {# machine} other {# machines}}", { machines })} + +

+ {canLink + ? gt( + "Select a machine to manage it. To link two machines, drag the plus on an environment onto another machine, or press it to pick one.", + ) + : gt("Select a machine to manage it.")}{" "} + {gt( + "A link reaches one machine and stops there. It does not pass on to the machines that one links to.", + )} +

+
+ ); +} + +/** One link as a row: what it reaches, the access in words, where, and how it is doing. */ +function LinkButton({ + edge, + label, + onSelect, +}: { + readonly edge: FleetLinkEdge; + readonly label: string; + readonly onSelect: (focus: FleetFocus) => void; +}) { + const gt = useGT(); + const m = useMessages(); + const attention = linkNeedsAttention(edge.health); + return ( +
  • + +
  • + ); +} + +function StackDetails({ + stack, + links, + labelOf, + onSelect, + onToggle, +}: { + readonly stack: FleetStack; + readonly links: ReadonlyArray; + readonly labelOf: (id: string) => string; + readonly onSelect: (focus: FleetFocus) => void; + readonly onToggle: () => void; +}) { + const gt = useGT(); + const m = useMessages(); + const members = stack.edgeIds.flatMap((id) => links.find((edge) => edge.id === id) ?? []); + return ( +
    +
    + + {stack.firstLabel} … {stack.lastLabel} + + +
    +
      + {members.map((edge) => ( + + ))} +
    +
    + ); +} + +function LinkAnother({ + node, + onLinkFrom, +}: { + readonly node: FleetEnvironmentNode; + readonly onLinkFrom: (sourceId: string) => void; +}) { + const gt = useGT(); + // The command's own permission, which follows the session as the node's snapshot cannot. + const canLink = useAtomValue(peerLinkEnvironment.link.permissionAtom(node.environmentId)); + if (!canLink || node.linking !== "ready") return null; + return ( + + ); +} + +function Reconnect({ environment }: { readonly environment: EnvironmentPresentation }) { + const gt = useGT(); + const m = useMessages(); + const retryNow = useAtomCommand(environmentCatalog.retryNow); + const { phase } = environment.connection; + if (!environment.entry.enabled || phase === "connected" || phase === "unsupported") return null; + return ( +
    + {savedBackendStatus(environment, m).text} + +
    + ); +} + +function linksNote(node: FleetEnvironmentNode, gt: GT): string | null { + if (node.phase !== "connected") { + return gt( + "This app is not connected to {label} right now, so any links it holds to other machines are not shown.", + { label: node.label }, + ); + } + switch (node.outgoing) { + case "off": + return gt( + "Linked environments is off on {label}. Turn it on in its Settings, under Labs, to link from it.", + { label: node.label }, + ); + case "unknown": + return gt("This app may not read the links {label} holds.", { label: node.label }); + case "error": + return gt("Could not load the links {label} holds: {error}", { + label: node.label, + error: node.outgoingError ?? "", + }); + case "loading": + return gt("Loading linked environments…"); + case "loaded": + return null; + } +} + +function LinkList({ + title, + action, + edges, + labelOf, + onSelect, +}: { + readonly title: string | null; + readonly action?: ReactNode; + readonly edges: ReadonlyArray; + readonly labelOf: (edge: FleetLinkEdge) => string; + readonly onSelect: (focus: FleetFocus) => void; +}) { + return ( +
    +
    + {title === null ? null :

    {title}

    } + {action} +
    + {edges.length > 0 ? ( +
      + {edges.map((edge) => ( + + ))} +
    + ) : null} +
    + ); +} + +function NodeDetails({ + node, + graph, + links, + environments, + onSelect, + onLinkFrom, + renderSavedEnvironment, + renderConnectMachine, + onAddEnvironment, +}: Omit & { + readonly node: FleetNode; + readonly links: ReadonlyArray; + readonly onSelect: (focus: FleetFocus) => void; +}) { + const gt = useGT(); + const m = useMessages(); + const labelOf = (id: string) => graph.nodes.find((entry) => entry.id === id)?.label ?? ""; + if (node.kind === "client") { + const hosts = graph.nodes.filter((entry) => entry.kind === "environment"); + return ( +
    + entry.phase === "connected").length, + total: hosts.length, + })} + > + {node.label} + +

    + {gt( + "Each line from here is a saved route to an environment. The map shows the links of the environments this app is connected to; one it cannot reach may hold links that are not drawn.", + )} +

    +
    + ); + } + const out = links.filter((edge) => edge.from === node.id); + const incoming = links.filter((edge) => edge.to === node.id); + const linkedFrom = ( + labelOf(edge.from)} + onSelect={onSelect} + /> + ); + if (node.kind === "connect") { + return ( + <> + {renderConnectMachine(node.environmentId)} +
    +

    + {gt( + "{label} is on your T3 Connect account but not added to this app. Add it to connect, and to see the links it holds.", + { label: node.label }, + )} +

    + {incoming.length > 0 ? linkedFrom : null} +
    + + ); + } + if (node.kind === "target") { + return ( +
    +
    + {node.label} + +
    + {/* A machine known only through its links is its links, so each one is shown in full. */} +
    + {incoming.map((edge) => ( + + ))} +
    +

    + {gt( + "This app is not connected to {label}, so any links it holds to other machines are not shown.", + { label: node.label }, + )} +

    +
    + ); + } + const environment = environments.find((entry) => entry.environmentId === node.environmentId); + const saved = environment ? renderSavedEnvironment(environment) : null; + const note = linksNote(node, gt); + const loaded = node.outgoing === "loaded"; + return ( + <> + {saved ?? + (environment ? ( + + + {" · "} + {connectionStatusTitle(environment.connection, m)} + {environment.serverConfig + ? ` · ${environment.serverConfig.environment.serverVersion}` + : ""} + + } + /> + ) : null)} +
    + {environment && saved !== null ? : null} + {note ?

    {note}

    : null} + } + edges={out} + labelOf={(edge) => labelOf(edge.to)} + onSelect={onSelect} + /> + {linkedFrom} +
    + + ); +} + +function LinkDetails({ + edge, + sourceLabel, + targetLabel, + onSelect, +}: { + readonly edge: FleetLinkEdge; + readonly sourceLabel: string; + readonly targetLabel: string; + readonly onSelect: (focus: FleetFocus) => void; +}) { + const gt = useGT(); + const m = useMessages(); + const { link, health } = edge; + const canUnlink = useAtomValue( + peerLinkEnvironment.unlink.permissionAtom(edge.sourceEnvironmentId), + ); + const { busy, forget } = useForgetPeerLink(edge.sourceEnvironmentId, link); + const access = accessConfig[link.access]; + const when = (value: DateTime.Utc) => formatAccessTimestamp(DateTime.formatIso(value)); + const term = "text-muted-foreground"; + const endpoint = + "cursor-pointer rounded-sm font-medium text-foreground underline-offset-2 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset"; + return ( +
    +
    +

    + + + +

    + {canUnlink ? ( + + ) : null} +
    +
    +
    {gt("Access", { $context: "access level" })}
    +
    + + + {m(access.label)} + + {m(access.description)} +
    +
    + {gt("Status", { $context: "state of a link between two machines" })} +
    +
    + + {peerLinkStatusText(health, gt)} +
    +
    + {gt("Expires", { $context: "label before the date a link expires" })} +
    +
    {when(link.expiresAt)}
    +
    {gt("Addresses")}
    +
    + {link.urls.map((url) => ( + + {url} + + ))} +
    +
    + {gt("Linked", { $context: "label before the date a link was made" })} +
    +
    {when(link.linkedAt)}
    + {link.lastReachedAt ? ( + <> +
    {gt("Last reached")}
    +
    {when(link.lastReachedAt)}
    + + ) : null} +
    +
    + ); +} diff --git a/apps/web/src/components/settings/LinkedEnvironmentsSettings.tsx b/apps/web/src/components/settings/LinkedEnvironmentsSettings.tsx index 271f7cc118a4c..1499872b4b031 100644 --- a/apps/web/src/components/settings/LinkedEnvironmentsSettings.tsx +++ b/apps/web/src/components/settings/LinkedEnvironmentsSettings.tsx @@ -10,15 +10,16 @@ import { isAtomCommandInterrupted, squashAtomCommandFailure, } from "@t3tools/client-runtime/state/runtime"; -import { peerLinkHealth } from "@t3tools/client-runtime/state/peerLinks"; +import { peerLinkHealth, type PeerLinkHealth } from "@t3tools/client-runtime/state/peerLinks"; import * as DateTime from "effect/DateTime"; import * as Option from "effect/Option"; import * as Result from "effect/Result"; import { PlusIcon } from "lucide-react"; import { T, useGT, useMessages, Var } from "gt-react"; -import { useId, useRef, useState } from "react"; +import { type ReactNode, useId, useRef, useState } from "react"; import { requestConfirmDialog } from "~/confirmDialog"; +import { useEnvironment } from "~/state/environments"; import { mintPairingCodeOn } from "~/state/peerPairingCode"; import { peerLinkEnvironment, useLinkableMachines } from "~/state/peerLinks"; import { useEnvironments } from "~/state/environments"; @@ -140,38 +141,9 @@ function LinkedEnvironmentRow({ const m = useMessages(); const nowMinute = useNowMinute(); const health = peerLinkHealth(link, DateTime.makeUnsafe(nowMinute)); - const unlink = useAtomCommand(peerLinkEnvironment.unlink, { label: UNLINK_COMMAND_LABEL }); const canUnlink = useAtomValue(peerLinkEnvironment.unlink.permissionAtom(environmentId)); - const [busy, setBusy] = useState(false); - const forget = async () => { - const confirmed = await (requestConfirmDialog( - gt( - "Forget {label}? Agents here stop working there. Revoke \"T3 Code · …\" in {label}''s Sharing & access to end the session there too.", - { label: link.label }, - ), - { variant: "destructive" }, - ) ?? Promise.resolve(false)); - if (!confirmed) return; - setBusy(true); - const result = await unlink({ environmentId, input: { environmentId: link.environmentId } }); - setBusy(false); - if (result._tag === "Failure" && !isAtomCommandInterrupted(result)) { - failureToast(gt("Could not forget the link"), String(squashAtomCommandFailure(result))); - } - }; - const status = - health.kind === "expired" - ? gt("Expired. Link it again with a new pairing code.") - : health.kind === "unreachable" - ? (health.detail ?? gt("Not answering right now.")) - : health.kind === "failing" - ? health.detail - : health.expiresInDays !== null - ? gt( - "{days, plural, one {Expires in {days} day. Link it again to renew.} other {Expires in {days} days. Link it again to renew.}}", - { days: health.expiresInDays }, - ) - : gt("Reachable"); + const { busy, forget } = useForgetPeerLink(environmentId, link); + const status = peerLinkStatusText(health, gt); return (
    @@ -217,10 +189,57 @@ function LinkedEnvironmentRow({ function LinkEnvironmentAction({ environmentId }: { readonly environmentId: EnvironmentId }) { const gt = useGT(); const [open, setOpen] = useState(false); + return ( + + + {gt("Link", { $context: "verb, links an environment" })} + + } + /> + } + /> + ); +} + +/** What the link dialog opens with when something other than its own button opened it. */ +export interface LinkEnvironmentPrefill { + /** The machine to link to, by environment id, or `ANOTHER_ADDRESS` with `address`. */ + readonly choice: string | null; + readonly address?: string; +} + +/** + * The one link flow. When this client is connected to the picked machine and may create pairing + * links there, it mints the code itself; otherwise it asks for one. + */ +export function LinkEnvironmentDialog({ + environmentId, + open, + onOpenChange, + trigger = null, + prefill, +}: { + readonly environmentId: EnvironmentId; + readonly open: boolean; + readonly onOpenChange: (open: boolean) => void; + readonly trigger?: ReactNode; + readonly prefill?: LinkEnvironmentPrefill; +}) { + const gt = useGT(); + const setOpen = onOpenChange; + // Named in the title: from the map, nothing else on screen says which machine is linking. + const source = useEnvironment(environmentId); const machines = useLinkableMachines(environmentId, open); // Null until the user picks; with no other machines known, only an address is left. - const [choice, setChoice] = useState(null); - const [address, setAddress] = useState(""); + const [choice, setChoice] = useState(prefill?.choice ?? null); + const [address, setAddress] = useState(prefill?.address ?? ""); const [pairingCode, setPairingCode] = useState(""); const [access, setAccess] = useState("approval-required"); const [busy, setBusy] = useState(false); @@ -253,8 +272,8 @@ function LinkEnvironmentAction({ environmentId }: { readonly environmentId: Envi const handleOpenChange = (next: boolean) => { setOpen(next); if (!next) { - setChoice(null); - setAddress(""); + setChoice(prefill?.choice ?? null); + setAddress(prefill?.address ?? ""); setPairingCode(""); setAccess("approval-required"); setMintFailed(new Set()); @@ -316,18 +335,17 @@ function LinkEnvironmentAction({ environmentId }: { readonly environmentId: Envi handleOpenChange(next); }} > - - - {gt("Link", { $context: "verb, links an environment" })} - - } - /> + {trigger} - Link an environment + {source === null ? ( + Link an environment + ) : machine === null ? ( + gt("Link {label} to another machine", { label: source.label }) + ) : ( + gt("Link {source} to {target}", { source: source.label, target: machine.label }) + )} @@ -431,3 +449,43 @@ function LinkEnvironmentAction({ environmentId }: { readonly environmentId: Envi ); } + +/** What a link's health means for the user, in a sentence. */ +export function peerLinkStatusText(health: PeerLinkHealth, gt: ReturnType): string { + return health.kind === "expired" + ? gt("Expired. Link it again with a new pairing code.") + : health.kind === "unreachable" + ? (health.detail ?? gt("Not answering right now.")) + : health.kind === "failing" + ? health.detail + : health.expiresInDays !== null + ? gt( + "{days, plural, one {Expires in {days} day. Link it again to renew.} other {Expires in {days} days. Link it again to renew.}}", + { days: health.expiresInDays }, + ) + : gt("Reachable"); +} + +/** Forgets `link` from `environmentId` after the user confirms. */ +export function useForgetPeerLink(environmentId: EnvironmentId, link: PeerLinkSummary) { + const gt = useGT(); + const unlink = useAtomCommand(peerLinkEnvironment.unlink, { label: UNLINK_COMMAND_LABEL }); + const [busy, setBusy] = useState(false); + const forget = async () => { + const confirmed = await (requestConfirmDialog( + gt( + "Forget {label}? Agents here stop working there. Revoke \"T3 Code · …\" in {label}''s Sharing & access to end the session there too.", + { label: link.label }, + ), + { variant: "destructive" }, + ) ?? Promise.resolve(false)); + if (!confirmed) return; + setBusy(true); + const result = await unlink({ environmentId, input: { environmentId: link.environmentId } }); + setBusy(false); + if (result._tag === "Failure" && !isAtomCommandInterrupted(result)) { + failureToast(gt("Could not forget the link"), String(squashAtomCommandFailure(result))); + } + }; + return { busy, forget }; +} diff --git a/apps/web/src/components/settings/SavedEnvironmentRows.tsx b/apps/web/src/components/settings/SavedEnvironmentRows.tsx index fe9dd58719c7d..2b9ad1225ff0a 100644 --- a/apps/web/src/components/settings/SavedEnvironmentRows.tsx +++ b/apps/web/src/components/settings/SavedEnvironmentRows.tsx @@ -78,9 +78,11 @@ type SavedBackendListRowProps = { onSetEnabled: (environmentId: EnvironmentId, enabled: boolean) => void; onRemove: (environment: EnvironmentPresentation) => void; onAddRoute: (environment: EnvironmentPresentation) => void; + /** The map's details open on a machine's routes; the list keeps them folded. */ + initialRoutesOpen?: boolean; }; -function savedBackendStatus( +export function savedBackendStatus( environment: EnvironmentPresentation, resolve: MessageResolver = m, ): { @@ -128,10 +130,11 @@ export function SavedBackendListRow({ onSetEnabled, onRemove, onAddRoute, + initialRoutesOpen = false, }: SavedBackendListRowProps) { const messages = useMessages(); const gt = useGT(); - const [routesOpen, setRoutesOpen] = useState(false); + const [routesOpen, setRoutesOpen] = useState(initialRoutesOpen); const [permissionsOpen, setPermissionsOpen] = useState(false); const [diagnosisOpen, setDiagnosisOpen] = useState(false); const environmentId = environment.environmentId; @@ -913,10 +916,21 @@ function EmptyRemoteEnvironments({ cloudEnabled = true }: { readonly cloudEnable export function CloudRemoteEnvironmentRows({ primaryEnvironmentId, savedEnvironments, + only, }: { readonly primaryEnvironmentId: EnvironmentId | null; readonly savedEnvironments: ReadonlyArray; + readonly only?: EnvironmentId; }) { + if (only !== undefined) { + return ( + + ); + } return hasCloudPublicConfig() ? ( EnvironmentId.make(value); +const node = (value: string) => fleetEnvironmentNodeId(id(value)); + +const link = (target: string, overrides: Partial = {}): PeerLinkSummary => ({ + environmentId: id(target), + label: target, + urls: [`https://${target}.example.ts.net`], + access: "approval-required", + linkedAt: DateTime.makeUnsafe("2026-11-01T00:00:00.000Z"), + expiresAt: DateTime.makeUnsafe("2027-01-01T00:00:00.000Z"), + lastReachedAt: null, + lastError: null, + status: "reachable", + ...overrides, +}); + +const environment = ( + name: string, + links: ReadonlyArray | FleetEnvironmentInput["outgoing"]["state"] = [], + overrides: Partial = {}, +): FleetEnvironmentInput => ({ + environmentId: id(name), + label: name, + machine: "server", + phase: "connected", + enabled: true, + routes: [{ id: "tailnet", kind: "tailnet" }], + activeRouteId: "tailnet", + refusedRouteIds: [], + offersLinks: true, + canWriteAccess: true, + hasLinkAddress: true, + outgoing: + typeof links !== "string" + ? { state: "loaded", links } + : links === "error" + ? { state: "error", message: "boom" } + : links === "loaded" + ? { state: "loaded", links: [] } + : { state: links }, + ...overrides, +}); + +const connectMachine = (name: string): FleetConnectMachineInput => ({ + environmentId: id(name), + label: name, + machine: "server", + availability: "online", +}); + +const build = ( + environments: ReadonlyArray, + connectMachines: ReadonlyArray = [], +) => buildFleetGraph({ clientLabel: "This browser", environments, connectMachines, now }); + +const vms = (count: number, prefix = "vm", overrides: Partial = {}) => + Array.from({ length: count }, (_, index) => link(`${prefix}-${index + 1}`, overrides)); + +const routeStates = (graph: ReturnType, name: string) => + Object.fromEntries( + graph.edges + .filter(isRouteEdge) + .filter((edge) => edge.to === node(name)) + .map((edge) => [edge.routeId, edge.state]), + ); + +/** Six environments in every state, 45 link targets, 40 of them under one host. */ +const largeSetup = () => + build( + [ + environment( + "nucbox", + [...vms(40, "fs", { access: "full-access" }), link("ci"), link("cups", { access: "auto" })], + { + routes: [ + { id: "tailnet", kind: "tailnet" }, + { id: "lan", kind: "lan" }, + { id: "relay", kind: "relay" }, + ], + }, + ), + environment("cups", [link("nucbox"), link("staging", { access: "read-only" }), link("ci")]), + environment("mbp", "unknown", { phase: "offline" }), + environment("win", "unknown", { phase: "error" }), + environment("vps", [ + link("db-1"), + link("db-2"), + link("db-3"), + link("ci", { access: "read-only" }), + link("staging", { access: "auto" }), + link("cups", { access: "full-access" }), + ]), + environment("old", "unknown", { enabled: false, phase: "available" }), + ], + [connectMachine("gpu")], + ); + +/** The brief's setup: two hosts share three machines, one has three more and links to the other. */ +const sharedSetup = () => + build([ + environment("nucbox", [ + link("fs-1", { access: "full-access" }), + link("fs-2", { access: "auto" }), + link("fs-3", { access: "read-only" }), + ]), + environment("mbp", "unknown", { phase: "reconnecting" }), + environment("cups", [ + link("fs-1", { access: "full-access" }), + link("fs-2", { access: "full-access" }), + link("fs-3", { access: "auto" }), + link("fs-4", { access: "auto-accept-edits" }), + link("fs-5"), + link("fs-6", { access: "read-only" }), + link("nucbox", { access: "auto" }), + ]), + ]); + +/** Points along a path the layout wrote: absolute M, H, V, Q and C only. */ +function samplePath(d: string): Array<{ x: number; y: number }> { + const points: Array<{ x: number; y: number }> = []; + let x = 0; + let y = 0; + const curve = (controls: ReadonlyArray) => { + const xs = [x, ...controls.filter((_, index) => index % 2 === 0)]; + const ys = [y, ...controls.filter((_, index) => index % 2 === 1)]; + const at = (values: ReadonlyArray, t: number): number => + values.length === 1 + ? values[0]! + : at( + values.slice(1).map((value, index) => values[index]! * (1 - t) + value * t), + t, + ); + for (let step = 1; step <= 24; step += 1) { + points.push({ x: at(xs, step / 24), y: at(ys, step / 24) }); + } + x = xs.at(-1)!; + y = ys.at(-1)!; + }; + for (const [, command, rest] of d.matchAll(/([MHVQC])([^MHVQC]*)/g)) { + const values = rest!.trim().split(/[ ,]+/).map(Number); + if (command === "M") points.push({ x: (x = values[0]!), y: (y = values[1]!) }); + else if (command === "H") curve([values[0]!, y]); + else if (command === "V") curve([x, values[0]!]); + else curve(values); + } + return points; +} + +const overlaps = (a: FleetRect, b: FleetRect) => + a.x < b.x + b.width && b.x < a.x + a.width && a.y < b.y + b.height && b.y < a.y + a.height; + +/** Every box the layout draws that must not sit on another. */ +const solidRects = (layout: FleetLayout) => [ + ...[...layout.nodes].map(([key, rect]) => ({ key, rect, within: null as string | null })), + ...[...layout.routes].map(([key, geometry]) => ({ key, rect: geometry.pill, within: null })), + ...[...layout.stacks].map(([key, geometry]) => ({ key, rect: geometry.rect, within: key })), +]; + +function expectNoOverlap(layout: FleetLayout, members: ReadonlyMap) { + const rects = solidRects(layout); + for (const [index, left] of rects.entries()) { + for (const right of rects.slice(index + 1)) { + // An open stack's frame holds its own machines. + if (members.get(left.key) === right.within || members.get(right.key) === left.within) { + if (left.within !== null || right.within !== null) continue; + } + expect(overlaps(left.rect, right.rect), `${left.key} overlaps ${right.key}`).toBe(false); + } + expect(left.rect.x).toBeGreaterThanOrEqual(0); + expect(left.rect.y).toBeGreaterThanOrEqual(0); + expect(left.rect.x + left.rect.width).toBeLessThanOrEqual(layout.width); + expect(left.rect.y + left.rect.height).toBeLessThanOrEqual(layout.height); + } +} + +describe("buildFleetGraph", () => { + it("draws each saved route as its own edge and reads its state from what the client knows", () => { + const routes = [ + { id: "tailnet", kind: "tailnet" as const }, + { id: "lan", kind: "lan" as const }, + { id: "relay", kind: "relay" as const }, + ]; + const graph = build([ + environment("up", [], { routes, activeRouteId: "lan", refusedRouteIds: ["relay"] }), + environment("dialling", "unknown", { routes, phase: "connecting", activeRouteId: null }), + environment("gone", "unknown", { routes, phase: "error", activeRouteId: null }), + environment("off", "unknown", { routes, enabled: false, phase: "available" }), + environment("old", "unknown", { routes, phase: "unsupported" }), + ]); + expect(routeStates(graph, "up")).toEqual({ + tailnet: "standby", + lan: "in-use", + relay: "refused", + }); + expect(routeStates(graph, "dialling")).toEqual({ + tailnet: "trying", + lan: "trying", + relay: "trying", + }); + expect(routeStates(graph, "gone")).toEqual({ tailnet: "down", lan: "down", relay: "down" }); + expect(routeStates(graph, "off")).toEqual({ tailnet: "idle", lan: "idle", relay: "idle" }); + expect(routeStates(graph, "old")).toEqual({ tailnet: "idle", lan: "idle", relay: "idle" }); + }); + + it("adds T3 Connect machines the client has not saved, and only those", () => { + const graph = build([environment("cups")], [connectMachine("cups"), connectMachine("gpu")]); + expect(graph.nodes.map((entry) => `${entry.kind}:${entry.label}`)).toEqual([ + "client:This browser", + "environment:cups", + "connect:gpu", + ]); + expect(routeStates(graph, "gpu")).toEqual({ offer: "offered" }); + }); + + it("keeps one node per machine and one edge per link, whatever names it twice", () => { + const graph = build( + [ + environment("cups", [link("vps"), link("vps"), link("cups"), link("gpu"), link("nucbox")]), + environment("cups", [link("other")]), + environment("nucbox"), + ], + [connectMachine("gpu")], + ); + expect(graph.nodes.map((entry) => `${entry.kind}:${entry.label}`)).toEqual([ + "client:This browser", + "environment:cups", + "environment:nucbox", + "connect:gpu", + "target:vps", + ]); + expect(graph.edges.filter((edge) => edge.kind === "link").map((edge) => edge.id)).toEqual([ + `link:${node("cups")}>${node("vps")}`, + `link:${node("cups")}>${node("gpu")}`, + `link:${node("cups")}>${node("nucbox")}`, + ]); + }); + + it("keeps unknown, off, loading and failed link lists apart from an empty one", () => { + const graph = build([ + environment("a", "loaded"), + environment("b", "loading"), + environment("c", "error"), + environment("d", "off", { offersLinks: false }), + environment("e", "unknown", { phase: "offline" }), + environment("f", [], { canWriteAccess: false }), + ]); + const states = graph.nodes.flatMap((entry) => + entry.kind === "environment" + ? [[entry.label, entry.outgoing, entry.linking, entry.outgoingError]] + : [], + ); + expect(states).toEqual([ + ["a", "loaded", "ready", null], + ["b", "loading", "ready", null], + ["c", "error", "ready", "boom"], + ["d", "off", "off", null], + ["e", "unknown", "disconnected", null], + ["f", "loaded", "forbidden", null], + ]); + }); + + it("reads a link's health at the given time", () => { + const graph = build([ + environment("cups", [ + link("soon", { expiresAt: DateTime.makeUnsafe("2026-11-21T12:00:00.000Z") }), + link("gone", { status: "expired" }), + ]), + ]); + expect(graph.edges.flatMap((edge) => (edge.kind === "link" ? [edge.health] : []))).toEqual([ + { kind: "reachable", expiresInDays: 2 }, + { kind: "expired" }, + ]); + }); +}); + +describe("fleetSummary", () => { + it("counts links only when every connected environment's list was read", () => { + const summary = (...environments: FleetEnvironmentInput[]) => fleetSummary(build(environments)); + expect(summary(environment("a", [link("x")]), environment("b"))).toEqual({ + machines: 3, + links: 1, + loading: false, + }); + expect(summary(environment("a"), environment("b"))).toMatchObject({ links: 0 }); + // One failed list among several leaves the total unknown, not zero. + expect(summary(environment("a"), environment("b", "error"))).toMatchObject({ links: null }); + expect(summary(environment("a", "unknown"))).toMatchObject({ links: null }); + expect(summary(environment("a"), environment("b", "loading"))).toMatchObject({ + links: null, + loading: true, + }); + // A machine that is not connected says nothing either way. + expect( + summary(environment("a", [link("x")]), environment("b", "unknown", { phase: "offline" })), + ).toMatchObject({ links: 1 }); + }); +}); + +describe("fleetStacks", () => { + it("collapses many machines under one host and one access level, and nothing smaller", () => { + const graph = build([ + environment("nucbox", [ + ...vms(40, "fs", { access: "full-access" }), + ...vms(4, "few"), + link("fs-41", { access: "full-access", status: "unreachable" }), + ]), + ]); + const stacks = fleetStacks(graph, new Set()); + expect( + stacks.map((stack) => [ + stack.id, + stack.memberIds.length, + stack.reachable, + stack.firstLabel, + stack.lastLabel, + stack.expanded, + ]), + ).toEqual([[`stack:${node("nucbox")}:full-access`, 41, 40, "fs-1", "fs-41", false]]); + expect(fleetStacks(graph, new Set([stacks[0]!.id]))[0]!.expanded).toBe(true); + }); + + it("leaves out a machine a second host links to, and a machine the client knows", () => { + const graph = build([ + environment("nucbox", [...vms(6, "fs"), link("cups")]), + environment("cups", [link("fs-1")]), + ]); + const [stack] = fleetStacks(graph, new Set()); + expect(stack!.memberIds).toEqual(["fs-2", "fs-3", "fs-4", "fs-5", "fs-6"].map(node)); + }); +}); + +describe("fleetLinkOffer", () => { + const graph = build( + [ + environment("cups", [link("vm"), link("old", { status: "expired" }), link("nucbox")]), + environment("nucbox"), + environment("guest", [], { canWriteAccess: false }), + environment("nolabs", "off", { offersLinks: false }), + environment("ssh-only", [], { hasLinkAddress: false }), + environment("asleep", "unknown", { phase: "offline" }), + ], + [connectMachine("gpu")], + ); + const offer = (source: string, target: string) => + fleetLinkOffer(graph, node(source), target === "client" ? FLEET_CLIENT_NODE_ID : node(target)); + + it("links without a code only where the client can mint one on the target", () => { + expect(offer("nucbox", "cups")).toEqual({ + kind: "link", + sourceEnvironmentId: id("nucbox"), + path: "code-less", + renews: false, + target: { kind: "machine", environmentId: id("cups") }, + }); + expect(offer("cups", "nucbox")).toMatchObject({ path: "code-less", renews: true }); + for (const target of ["guest", "ssh-only", "asleep", "gpu"]) { + expect(offer("cups", target), target).toMatchObject({ + path: "pairing-code", + target: { kind: "machine", environmentId: id(target) }, + }); + } + }); + + it("links to a machine known only through a link by its address, with a code", () => { + expect(offer("nucbox", "vm")).toMatchObject({ + path: "pairing-code", + renews: false, + target: { kind: "address", address: "https://vm.example.ts.net" }, + }); + expect(offer("cups", "vm")).toMatchObject({ renews: true }); + expect(offer("cups", "old")).toMatchObject({ renews: false }); + }); + + it("offers nothing from a machine that cannot link, or to itself or the client", () => { + const reason = (source: string, target: string) => { + const result = offer(source, target); + return result.kind === "unavailable" ? result.reason : result.kind; + }; + expect(reason("cups", "cups")).toBe("same-machine"); + expect(reason("cups", "client")).toBe("not-an-environment"); + expect(reason("gpu", "cups")).toBe("not-an-environment"); + expect(reason("vm", "cups")).toBe("not-an-environment"); + expect(reason("asleep", "cups")).toBe("source-disconnected"); + expect(reason("nolabs", "cups")).toBe("source-off"); + expect(reason("guest", "cups")).toBe("source-forbidden"); + }); +}); + +describe("fleetNeighborhood", () => { + const graph = build([ + environment("a", [link("b"), ...vms(5)]), + environment("b", [link("c")]), + environment("c"), + ]); + const stacks = fleetStacks(graph, new Set()); + + it("lights one hop from a machine and its routes, and does not follow a link through", () => { + const lit = fleetNeighborhood(graph, stacks, { kind: "node", id: node("b") }); + expect([...lit.nodes].toSorted()).toEqual( + [FLEET_CLIENT_NODE_ID, node("a"), node("b"), node("c")].toSorted(), + ); + expect(lit.edges.has(`link:${node("a")}>${node("vm-1")}`)).toBe(false); + expect(lit.edges.has(`route:${node("b")}:tailnet`)).toBe(true); + expect(lit.edges.has(`route:${node("a")}:tailnet`)).toBe(true); + expect(lit.edges.has(`route:${node("c")}:tailnet`)).toBe(false); + }); + + it("lights a stack's machines, their host and the route to it", () => { + const lit = fleetNeighborhood(graph, stacks, { kind: "stack", id: stacks[0]!.id }); + expect(lit.nodes.has(node("vm-3"))).toBe(true); + expect(lit.nodes.has(node("b"))).toBe(false); + expect(lit.edges.has(`route:${node("a")}:tailnet`)).toBe(true); + }); +}); + +describe("layoutFleetGraph", () => { + const membersOf = (stacks: ReturnType) => + new Map(stacks.flatMap((stack) => stack.memberIds.map((member) => [member, stack.id]))); + + it("places one environment, and a large setup, with nothing overlapping or out of bounds", () => { + const one = build([environment("cups")]); + expectNoOverlap(layoutFleetGraph(one), new Map()); + const large = largeSetup(); + const closed = fleetStacks(large, new Set()); + const layout = layoutFleetGraph(large, closed); + expectNoOverlap(layout, membersOf(closed)); + // Forty machines cost one node: 6 environments, the client, the Connect machine, 5 targets. + expect(layout.nodes.size).toBe(13); + expect(layout.stacks.size).toBe(1); + expect(layout.routes.size).toBe(9); + expect(layout.columns.map((column) => column.id)).toEqual([ + "client", + "environments", + "targets", + ]); + }); + + it("opens a stack in place, each machine inside its frame", () => { + const large = largeSetup(); + const stackId = fleetStacks(large, new Set())[0]!.id; + const open = fleetStacks(large, new Set([stackId])); + const layout = layoutFleetGraph(large, open); + expectNoOverlap(layout, membersOf(open)); + expect(layout.nodes.size).toBe(53); + const frame = layout.stacks.get(stackId)!.rect; + for (const member of open[0]!.memberIds) { + const rect = layout.nodes.get(member)!; + expect(rect.x).toBeGreaterThanOrEqual(frame.x); + expect(rect.y).toBeGreaterThanOrEqual(frame.y); + expect(rect.x + rect.width).toBeLessThanOrEqual(frame.x + frame.width); + expect(rect.y + rect.height).toBeLessThanOrEqual(frame.y + frame.height); + } + }); + + it("draws the same map whatever order links arrive in", () => { + const forward = build([environment("a", [...vms(7), link("x"), link("y")])]); + const backward = build([environment("a", [link("y"), link("x"), ...vms(7).toReversed()])]); + const lay = (graph: ReturnType) => { + const layout = layoutFleetGraph(graph, fleetStacks(graph, new Set())); + return [...layout.nodes].toSorted(([left], [right]) => (left < right ? -1 : 1)); + }; + expect(lay(backward)).toEqual(lay(forward)); + }); + + it("names the access of links between environments on their own lane, clear of everything", () => { + const graph = build([ + environment("a", [link("b"), link("c"), link("x")]), + environment("b", [link("a"), link("x")]), + environment("c", [link("a")]), + ]); + const layout = layoutFleetGraph(graph); + const geometry = (from: string, to: string) => + layout.links.get(`link:${node(from)}>${node(to)}`)!; + expect(geometry("a", "x").badge).toBeNull(); + expect(geometry("b", "x").badge).toBeNull(); + const badges = [ + ["a", "b"], + ["a", "c"], + ["b", "a"], + ["c", "a"], + ].map(([from, to]) => { + const { badge, d } = geometry(from!, to!); + // On the link's own vertical run, between the two machines it joins. + const run = samplePath(d).filter( + (point) => point.y > badge!.y && point.y < badge!.y + badge!.height, + ); + expect(run.length).toBeGreaterThan(0); + for (const point of run) { + expect(point.x).toBeGreaterThan(badge!.x); + expect(point.x).toBeLessThan(badge!.x + badge!.width); + } + const ends = [layout.nodes.get(node(from!))!, layout.nodes.get(node(to!))!]; + expect(badge!.y).toBeGreaterThan(Math.min(...ends.map((rect) => rect.y))); + expect(badge!.y).toBeLessThan(Math.max(...ends.map((rect) => rect.y + rect.height))); + expect(badge!.x).toBeGreaterThanOrEqual(0); + expect(badge!.x + badge!.width).toBeLessThanOrEqual(layout.width); + return badge!; + }); + const boxes = [...badges, ...solidRects(layout).map((box) => box.rect)]; + for (const [index, badge] of badges.entries()) { + for (const other of boxes) { + if (other !== badge && boxes.indexOf(other) > index) { + expect(overlaps(badge, other)).toBe(false); + } + } + } + }); + + it("runs links between environments left of them and links to other machines right", () => { + const graph = largeSetup(); + const layout = layoutFleetGraph(graph, fleetStacks(graph, new Set())); + const card = layout.nodes.get(node("nucbox"))!; + for (const edge of graph.edges) { + const geometry = edge.kind === "link" ? layout.links.get(edge.id) : undefined; + if (geometry === undefined) continue; + const between = layout.nodes.get(edge.to)!.x === card.x; + for (const point of samplePath(geometry.d)) { + if (between) expect(point.x, edge.id).toBeLessThanOrEqual(card.x); + else expect(point.x, edge.id).toBeGreaterThanOrEqual(card.x + card.width); + } + } + }); + + it("keeps two hosts' links into one machine apart, and every link clear of other boxes", () => { + for (const graph of [sharedSetup(), largeSetup()]) { + for (const expanded of [false, true]) { + const closed = fleetStacks(graph, new Set()); + const stacks = expanded + ? fleetStacks(graph, new Set(closed.map((stack) => stack.id))) + : closed; + const layout = layoutFleetGraph(graph, stacks); + expectNoOverlap(layout, membersOf(stacks)); + const boxes = solidRects(layout); + const drawn = [ + ...[...layout.links].map(([key, geometry]) => ({ key, d: geometry.d })), + ...[...layout.stacks].map(([key, geometry]) => ({ key, d: geometry.d })), + ]; + for (const { key, d } of drawn) { + for (const point of samplePath(d)) { + const hit = boxes.find( + ({ rect }) => + point.x > rect.x + 0.5 && + point.x < rect.x + rect.width - 0.5 && + point.y > rect.y + 0.5 && + point.y < rect.y + rect.height - 0.5, + ); + expect(hit?.key, `${key} passes through ${hit?.key}`).toBeUndefined(); + } + } + // The last stretch into a machine is level, so two that differ in height never share it. + const arrivals = new Map(); + for (const edge of graph.edges) { + const geometry = edge.kind === "link" ? layout.links.get(edge.id) : undefined; + if (geometry === undefined) continue; + const [before, last] = samplePath(geometry.d).slice(-2); + expect(before!.y).toBeCloseTo(geometry.arrow.y, 0); + expect(last!.y).toBe(geometry.arrow.y); + arrivals.set(edge.to, [...(arrivals.get(edge.to) ?? []), geometry.arrow.y]); + } + for (const [target, heights] of arrivals) { + const sorted = heights.toSorted((left, right) => left - right); + for (const [index, height] of sorted.entries()) { + if (index > 0) { + expect(height - sorted[index - 1]!, `into ${target}`).toBeGreaterThanOrEqual(6); + } + } + } + } + } + }); + + it("puts a machine several hosts link to between them, and one host's machines beside it", () => { + const layout = layoutFleetGraph(sharedSetup()); + const center = (name: string) => { + const rect = layout.nodes.get(node(name))!; + return rect.y + rect.height / 2; + }; + for (const name of ["fs-1", "fs-2", "fs-3"]) { + expect(center(name)).toBeGreaterThan(center("nucbox")); + expect(center(name)).toBeLessThan(center("cups")); + } + expect(center("fs-5")).toBe(center("cups")); + // The upper host's link arrives above the lower host's. + const arrival = (from: string) => layout.links.get(`link:${node(from)}>${node("fs-2")}`)!.arrow; + expect(arrival("nucbox").y).toBeLessThan(arrival("cups").y); + }); + + it("keeps the shape key when only health, route state or status changes", () => { + const key = (graph: ReturnType) => + fleetShapeKey(graph, fleetStacks(graph, new Set())); + const before = build([environment("a", [...vms(6)])]); + const after = build([ + environment("a", [...vms(6, "vm", { status: "unreachable" })], { + activeRouteId: null, + phase: "connected", + }), + ]); + expect(key(after)).toBe(key(before)); + const moved = build([environment("a", [...vms(6, "vm", { access: "read-only" })])]); + expect(key(moved)).not.toBe(key(before)); + const stacks = fleetStacks(before, new Set()); + expect(fleetShapeKey(before, fleetStacks(before, new Set([stacks[0]!.id])))).not.toBe( + key(before), + ); + }); +}); + +describe("nextFleetNode", () => { + it("steps between columns and down a column, stacks included", () => { + const graph = build([ + environment("a", [...vms(5), link("x", { access: "read-only" })]), + environment("b"), + ]); + const stacks = fleetStacks(graph, new Set()); + const rects = fleetFocusRects(layoutFleetGraph(graph, stacks)); + expect(nextFleetNode(rects, FLEET_CLIENT_NODE_ID, "right")).toBe(node("a")); + expect(nextFleetNode(rects, node("a"), "down")).toBe(node("b")); + expect(nextFleetNode(rects, node("a"), "right")).toBe(stacks[0]!.id); + expect(nextFleetNode(rects, stacks[0]!.id, "down")).toBe(node("x")); + expect(nextFleetNode(rects, FLEET_CLIENT_NODE_ID, "left")).toBeNull(); + }); +}); + +describe("fitting the view", () => { + it("fills the canvas but caps the zoom for a small map", () => { + const view = fitFleetLayout({ width: 300, height: 60 }, { width: 900, height: 400 }); + expect(view.scale).toBe(1.15); + expect(view.x).toBeCloseTo((900 - 300 * 1.15) / 2); + }); + + it("fits a map taller than the manual minimum allows, and zooming out does not jump back", () => { + const view = fitFleetLayout({ width: 700, height: 1572 }, { width: 800, height: 360 }); + expect(view.scale).toBeLessThan(0.3); + expect(1572 * view.scale).toBeLessThanOrEqual(360); + expect(zoomFleetView(view, 0.8, { x: 0, y: 0 }).scale).toBe(view.scale); + const closer = zoomFleetView(view, 1.25, { x: 0, y: 0 }, view.scale); + expect(closer.scale).toBeGreaterThan(view.scale); + expect(zoomFleetView(closer, 0.8, { x: 0, y: 0 }, view.scale).scale).toBeCloseTo(view.scale); + }); + + it("sizes the canvas to the fitted map within its bounds", () => { + const bounds = { min: 240, max: 640 }; + expect(fleetCanvasHeight({ width: 400, height: 60 }, 900, bounds)).toBe(240); + expect(fleetCanvasHeight({ width: 800, height: 2000 }, 900, bounds)).toBe(640); + expect(fleetCanvasHeight({ width: 800, height: 300 }, 900, bounds)).toBe( + Math.ceil(300 * ((900 - 56) / 800) + 56), + ); + }); + + it("zooms around the anchor", () => { + const view = zoomFleetView({ x: 10, y: 20, scale: 1 }, 2, { x: 100, y: 100 }); + expect(view).toEqual({ scale: 2, x: -80, y: -60 }); + }); +}); diff --git a/apps/web/src/components/settings/environmentsMap.logic.ts b/apps/web/src/components/settings/environmentsMap.logic.ts new file mode 100644 index 0000000000000..cdc118ed66496 --- /dev/null +++ b/apps/web/src/components/settings/environmentsMap.logic.ts @@ -0,0 +1,1141 @@ +import type { + ConnectionRouteKind, + EnvironmentConnectionPhase, +} from "@t3tools/client-runtime/connection"; +import { peerLinkHealth, type PeerLinkHealth } from "@t3tools/client-runtime/state/peerLinks"; +import { + AuthMcpClientAccess, + type EnvironmentId, + type EnvironmentMachineKind, + type PeerLinkSummary, +} from "@t3tools/contracts"; +import type * as DateTime from "effect/DateTime"; + +export const FLEET_CLIENT_NODE_ID = "client"; + +/** What this client knows of the links an environment holds to others. */ +export type FleetOutgoingLinks = + | { readonly state: "loaded"; readonly links: ReadonlyArray } + | { readonly state: "loading" } + | { readonly state: "error"; readonly message: string } + /** Connected, but linked environments is off or unsupported there. */ + | { readonly state: "off" } + /** Not connected, or not allowed to read: it may hold links this client cannot see. */ + | { readonly state: "unknown" }; + +export interface FleetRouteInput { + readonly id: string; + readonly kind: ConnectionRouteKind; +} + +export interface FleetEnvironmentInput { + readonly environmentId: EnvironmentId; + readonly label: string; + readonly machine: EnvironmentMachineKind | null; + readonly phase: EnvironmentConnectionPhase; + /** Switched on in this client. A switched-off environment is saved but never dialled. */ + readonly enabled: boolean; + /** Saved routes, preferred first. */ + readonly routes: ReadonlyArray; + /** The route carrying the connection, when the client is connected and knows it. */ + readonly activeRouteId: string | null; + readonly refusedRouteIds: ReadonlyArray; + readonly outgoing: FleetOutgoingLinks; + /** Linked environments is supported and switched on there. */ + readonly offersLinks: boolean; + /** This client's session there may create links from it and pairing codes on it. */ + readonly canWriteAccess: boolean; + /** An address another machine can reach it at, so a link to it needs no typed address. */ + readonly hasLinkAddress: boolean; +} + +/** A machine on the user's T3 Connect account that this client has not saved. */ +export interface FleetConnectMachineInput { + readonly environmentId: EnvironmentId; + readonly label: string; + readonly machine: EnvironmentMachineKind | null; + readonly availability: "checking" | "online" | "offline" | "error"; +} + +/** + * How a route is doing, from what the client knows: which one carries the connection, which the + * host refused, and the environment's phase. It never probes a route to find out. + */ +export type FleetRouteState = + | "in-use" + | "standby" + | "trying" + /** The environment cannot be reached right now, over any route. */ + | "down" + /** Not dialled: the environment is switched off, or needs an update first. */ + | "idle" + | "refused" + /** A T3 Connect machine this client could add; no route is saved yet. */ + | "offered"; + +/** Why an environment can or cannot be the source of a new link. */ +export type FleetLinking = "ready" | "disconnected" | "off" | "forbidden"; + +export type FleetNode = + | { readonly id: string; readonly kind: "client"; readonly label: string } + | { + readonly id: string; + readonly kind: "environment"; + readonly environmentId: EnvironmentId; + readonly label: string; + readonly machine: EnvironmentMachineKind | null; + readonly phase: EnvironmentConnectionPhase; + readonly enabled: boolean; + readonly routeCount: number; + readonly outgoing: FleetOutgoingLinks["state"]; + readonly outgoingError: string | null; + readonly linking: FleetLinking; + /** The client can mint a pairing code there itself, so linking to it asks for none. */ + readonly mintable: boolean; + } + | { + readonly id: string; + readonly kind: "connect"; + readonly environmentId: EnvironmentId; + readonly label: string; + readonly machine: EnvironmentMachineKind | null; + readonly availability: FleetConnectMachineInput["availability"]; + } + /** Seen only as another environment's link target; the client is not connected to it. */ + | { + readonly id: string; + readonly kind: "target"; + readonly environmentId: EnvironmentId; + readonly label: string; + /** Where the first environment linking to it reaches it. */ + readonly address: string | null; + }; + +export type FleetEnvironmentNode = Extract; + +export type FleetEdge = + | { + readonly id: string; + readonly kind: "route"; + readonly from: string; + readonly to: string; + readonly routeId: string; + readonly routeKind: ConnectionRouteKind; + readonly state: FleetRouteState; + } + | { + readonly id: string; + readonly kind: "link"; + readonly from: string; + readonly to: string; + readonly sourceEnvironmentId: EnvironmentId; + readonly link: PeerLinkSummary; + readonly health: PeerLinkHealth; + }; + +export type FleetRouteEdge = Extract; +export type FleetLinkEdge = Extract; + +export interface FleetGraph { + readonly nodes: ReadonlyArray; + readonly edges: ReadonlyArray; +} + +export const fleetEnvironmentNodeId = (environmentId: EnvironmentId) => `env:${environmentId}`; + +function routeState(environment: FleetEnvironmentInput, routeId: string): FleetRouteState { + if (environment.refusedRouteIds.includes(routeId)) return "refused"; + if (!environment.enabled) return "idle"; + switch (environment.phase) { + case "connected": + return routeId === environment.activeRouteId ? "in-use" : "standby"; + case "connecting": + return "trying"; + case "unsupported": + case "available": + return "idle"; + case "reconnecting": + case "error": + case "offline": + return "down"; + } +} + +function linking(environment: FleetEnvironmentInput): FleetLinking { + if (environment.phase !== "connected") return "disconnected"; + if (!environment.offersLinks) return "off"; + return environment.canWriteAccess ? "ready" : "forbidden"; +} + +/** + * One node per machine however often it is named: an environment listed twice, a link repeated + * in a list, a T3 Connect machine the client also saved, and a link to a machine the client + * knows all land on the same node. Each saved route is its own edge from the client. + */ +export function buildFleetGraph(input: { + readonly clientLabel: string; + readonly environments: ReadonlyArray; + readonly connectMachines?: ReadonlyArray; + readonly now: DateTime.Utc; +}): FleetGraph { + const nodes = new Map([ + [FLEET_CLIENT_NODE_ID, { id: FLEET_CLIENT_NODE_ID, kind: "client", label: input.clientLabel }], + ]); + const edges = new Map(); + const environments = input.environments.filter( + (environment, index, all) => + all.findIndex((other) => other.environmentId === environment.environmentId) === index, + ); + for (const environment of environments) { + const id = fleetEnvironmentNodeId(environment.environmentId); + nodes.set(id, { + id, + kind: "environment", + environmentId: environment.environmentId, + label: environment.label, + machine: environment.machine, + phase: environment.phase, + enabled: environment.enabled, + routeCount: environment.routes.length, + outgoing: environment.outgoing.state, + outgoingError: environment.outgoing.state === "error" ? environment.outgoing.message : null, + linking: linking(environment), + mintable: + environment.phase === "connected" && + environment.canWriteAccess && + environment.hasLinkAddress, + }); + for (const route of environment.routes) { + const edgeId = `route:${id}:${route.id}`; + if (edges.has(edgeId)) continue; + edges.set(edgeId, { + id: edgeId, + kind: "route", + from: FLEET_CLIENT_NODE_ID, + to: id, + routeId: route.id, + routeKind: route.kind, + state: routeState(environment, route.id), + }); + } + } + for (const machine of input.connectMachines ?? []) { + const id = fleetEnvironmentNodeId(machine.environmentId); + if (nodes.has(id)) continue; + nodes.set(id, { + id, + kind: "connect", + environmentId: machine.environmentId, + label: machine.label, + machine: machine.machine, + availability: machine.availability, + }); + edges.set(`route:${id}:offer`, { + id: `route:${id}:offer`, + kind: "route", + from: FLEET_CLIENT_NODE_ID, + to: id, + routeId: "offer", + routeKind: "relay", + state: "offered", + }); + } + for (const environment of environments) { + if (environment.outgoing.state !== "loaded") continue; + const from = fleetEnvironmentNodeId(environment.environmentId); + for (const link of environment.outgoing.links) { + const to = fleetEnvironmentNodeId(link.environmentId); + const id = `link:${from}>${to}`; + if (to === from || edges.has(id)) continue; + if (!nodes.has(to)) { + nodes.set(to, { + id: to, + kind: "target", + environmentId: link.environmentId, + label: link.label, + address: link.urls[0] ?? null, + }); + } + edges.set(id, { + id, + kind: "link", + from, + to, + sourceEnvironmentId: environment.environmentId, + link, + health: peerLinkHealth(link, input.now), + }); + } + } + return { nodes: [...nodes.values()], edges: [...edges.values()] }; +} + +export const isLinkEdge = (edge: FleetEdge): edge is FleetLinkEdge => edge.kind === "link"; +export const isRouteEdge = (edge: FleetEdge): edge is FleetRouteEdge => edge.kind === "route"; + +/** + * The setup in two numbers. `links` is null when the total is not known: a list still loading, + * none read, or one failed among several. A failed or unread list is not "no links". + */ +export function fleetSummary(graph: FleetGraph): { + readonly machines: number; + readonly links: number | null; + readonly loading: boolean; +} { + const connected = graph.nodes.filter( + (node) => node.kind === "environment" && node.phase === "connected", + ) as FleetEnvironmentNode[]; + const loading = connected.some((node) => node.outgoing === "loading"); + const known = + !loading && + connected.some((node) => node.outgoing === "loaded") && + !connected.some((node) => node.outgoing === "error"); + return { + machines: graph.nodes.length - 1, + links: known ? graph.edges.filter(isLinkEdge).length : null, + loading, + }; +} + +/** Whether a link wants the user's attention: anything but reachable with time left. */ +export const linkNeedsAttention = (health: PeerLinkHealth) => + health.kind !== "reachable" || health.expiresInDays !== null; + +const ACCESS_ORDER = AuthMcpClientAccess.literals; +const labelOrder = new Intl.Collator("en", { numeric: true, sensitivity: "base" }); + +/** + * Machines only one environment links to, at one access level, drawn as a single node. Forty + * VMs under one host cost one node and one line, and each link stays listed in the details. + */ +export interface FleetStack { + readonly id: string; + readonly sourceId: string; + readonly access: AuthMcpClientAccess; + /** In name order, so the first and last name the range. */ + readonly memberIds: ReadonlyArray; + readonly edgeIds: ReadonlyArray; + readonly reachable: number; + readonly firstLabel: string; + readonly lastLabel: string; + readonly expanded: boolean; +} + +/** Below this many machines a group is clearer drawn one by one. */ +const FLEET_STACK_MIN = 5; + +export function fleetStacks(graph: FleetGraph, expanded: ReadonlySet): FleetStack[] { + const byId = new Map(graph.nodes.map((node) => [node.id, node])); + const links = graph.edges.filter(isLinkEdge); + const incoming = new Map(); + for (const link of links) incoming.set(link.to, (incoming.get(link.to) ?? 0) + 1); + const groups = new Map(); + for (const link of links) { + if (byId.get(link.to)?.kind !== "target" || incoming.get(link.to) !== 1) continue; + const id = `stack:${link.from}:${link.link.access}`; + groups.set(id, [...(groups.get(id) ?? []), link]); + } + const label = (link: FleetLinkEdge) => byId.get(link.to)?.label ?? ""; + return [...groups] + .filter(([, members]) => members.length >= FLEET_STACK_MIN) + .map(([id, unsorted]) => { + const members = unsorted.toSorted( + (left, right) => + labelOrder.compare(label(left), label(right)) || (left.to < right.to ? -1 : 1), + ); + return { + id, + sourceId: members[0]!.from, + access: members[0]!.link.access, + memberIds: members.map((link) => link.to), + edgeIds: members.map((link) => link.id), + reachable: members.filter((link) => link.health.kind === "reachable").length, + firstLabel: label(members[0]!), + lastLabel: label(members.at(-1)!), + expanded: expanded.has(id), + }; + }); +} + +export type FleetFocus = + | { readonly kind: "node"; readonly id: string } + | { readonly kind: "edge"; readonly id: string } + | { readonly kind: "stack"; readonly id: string }; + +export interface FleetNeighborhood { + readonly nodes: ReadonlySet; + readonly edges: ReadonlySet; +} + +/** + * What a node reaches and what reaches it, one hop only, plus how this client gets there. A link + * does not chain: A linked to B and B linked to C gives A's agents nothing on C, so following + * links further would lie. + */ +export function fleetNeighborhood( + graph: FleetGraph, + stacks: ReadonlyArray, + focus: FleetFocus, +): FleetNeighborhood { + const nodes = new Set(); + const edges = new Set(); + const sources = new Set(); + const stack = focus.kind === "stack" ? stacks.find((entry) => entry.id === focus.id) : undefined; + const stackEdges = new Set(stack?.edgeIds); + for (const edge of graph.edges) { + const touches = + focus.kind === "stack" + ? stackEdges.has(edge.id) + : focus.kind === "edge" + ? edge.id === focus.id + : edge.from === focus.id || edge.to === focus.id; + if (!touches) continue; + edges.add(edge.id); + nodes.add(edge.from).add(edge.to); + if (edge.kind === "link" && (focus.kind !== "node" || edge.to === focus.id)) { + sources.add(edge.from); + } + } + // The client reaches the focus through whichever environment holds the link to it. + for (const edge of graph.edges) { + if (edge.kind !== "route" || !sources.has(edge.to)) continue; + edges.add(edge.id); + nodes.add(edge.from); + } + if (focus.kind === "node" && graph.nodes.some((node) => node.id === focus.id)) { + nodes.add(focus.id); + } + return { nodes, edges }; +} + +/** What linking `sourceId` to `targetId` would take, or why the map does not offer it. */ +export type FleetLinkOffer = + | { + readonly kind: "unavailable"; + readonly reason: + | "not-an-environment" + | "same-machine" + | "source-disconnected" + | "source-off" + | "source-forbidden"; + } + | { + readonly kind: "link"; + readonly sourceEnvironmentId: EnvironmentId; + /** + * `code-less`: the client mints the pairing code on the target with its own session there. + * `pairing-code`: the user brings one from the target. + */ + readonly path: "code-less" | "pairing-code"; + /** The pair is already linked, so linking again renews it. */ + readonly renews: boolean; + readonly target: + | { readonly kind: "machine"; readonly environmentId: EnvironmentId } + /** A machine the client has no entry for: only an address another host uses. */ + | { readonly kind: "address"; readonly address: string | null }; + }; + +export function fleetLinkOffer( + graph: FleetGraph, + sourceId: string, + targetId: string, +): FleetLinkOffer { + const source = graph.nodes.find((node) => node.id === sourceId); + const target = graph.nodes.find((node) => node.id === targetId); + if (source?.kind !== "environment" || target === undefined || target.kind === "client") { + return { kind: "unavailable", reason: "not-an-environment" }; + } + if (source.id === target.id) return { kind: "unavailable", reason: "same-machine" }; + if (source.linking !== "ready") { + return { kind: "unavailable", reason: `source-${source.linking}` as const }; + } + const renews = graph.edges.some( + (edge) => + edge.kind === "link" && + edge.from === source.id && + edge.to === target.id && + edge.health.kind !== "expired", + ); + const base = { kind: "link", sourceEnvironmentId: source.environmentId, renews } as const; + if (target.kind === "target") { + return { + ...base, + path: "pairing-code", + target: { kind: "address", address: target.address }, + }; + } + return { + ...base, + path: target.kind === "environment" && target.mintable ? "code-less" : "pairing-code", + target: { kind: "machine", environmentId: target.environmentId }, + }; +} + +/** Changes exactly when the layout would: membership, labels, routes, wiring and open stacks. */ +export function fleetShapeKey(graph: FleetGraph, stacks: ReadonlyArray): string { + return [ + ...graph.nodes.map((node) => `${node.kind}\u0000${node.id}\u0000${node.label}`), + ...graph.edges.map((edge) => + edge.kind === "link" ? `${edge.id}\u0000${edge.link.access}` : edge.id, + ), + ...stacks.map((stack) => `${stack.id}\u0000${stack.expanded}`), + ].join("\n"); +} + +export interface FleetRect { + readonly x: number; + readonly y: number; + readonly width: number; + readonly height: number; +} + +export interface FleetPoint { + readonly x: number; + readonly y: number; +} + +export interface FleetRouteGeometry { + readonly d: string; + /** Where the route's kind is named, on the wire just before the environment. */ + readonly pill: FleetRect; +} + +/** Room for a link's access in words. `side` is the way it grows from the lane it sits on. */ +export type FleetLinkBadge = FleetRect & { readonly side: 1 | -1 }; + +export interface FleetLinkGeometry { + readonly d: string; + /** Arrowhead tip and the horizontal direction it points. */ + readonly arrow: { readonly x: number; readonly y: number; readonly dir: 1 | -1 }; + /** + * Where a link between two environments names its access; a target's card shows its own. + * Null too where so many links pass that a name would sit on another's. + */ + readonly badge: FleetLinkBadge | null; +} + +export interface FleetStackGeometry { + /** The whole footprint: the sheets of a closed stack, or the frame of an open one. */ + readonly rect: FleetRect; + /** The part that is the stack's control: the front sheet, or an open stack's header. */ + readonly face: FleetRect; + readonly d: string; + readonly arrow: FleetPoint; +} + +export type FleetColumn = "client" | "environments" | "targets"; + +export interface FleetLayout { + /** Every machine drawn on its own. Members of a closed stack are not here. */ + readonly nodes: ReadonlyMap; + readonly stacks: ReadonlyMap; + readonly routes: ReadonlyMap; + /** Links drawn one by one. A stack's links are drawn by the stack. */ + readonly links: ReadonlyMap; + /** Where an environment's links leave it and its link handle sits, on its right edge. */ + readonly handles: ReadonlyMap; + readonly columns: ReadonlyArray<{ readonly id: FleetColumn; readonly x: number }>; + readonly width: number; + readonly height: number; +} + +const HEADER = 28; +const CLIENT = { width: 136, height: 44 }; +const WIRE = 72; +const PILL = { width: 82, height: 18 }; +const PILL_GAP = 10; +const PORT_PITCH = 22; +const CARD = { width: 204, height: 60 }; +const OFFER = { height: 44 }; +const TARGET = { width: 188, height: 44 }; +const STACK = { height: 50, lift: 8 }; +const CHIP = { width: 124, height: 26 }; +const CHIP_GAP = 6; +const FRAME_PAD = 8; +const FRAME_HEADER = 30; +const GROUP_GAP = 28; +const BAY_GAP = 12; +const LANE_FIRST = 24; +const LANE_STEP = 14; +const LANE_CLEARANCE = 10; +const LINK_RUN = 92; +const ARROW_LENGTH = 6; +/** How far apart two hosts' links enter one machine, so each keeps its own last stretch. */ +const ENTRY_PITCH = 14; +/** The channel left of the cards that links between environments keep to themselves. */ +const BETWEEN = { first: 16, step: 14, last: 10 }; +/** Where those links meet a card's left edge: past its routes, the outermost lane innermost. */ +const LINK_PORT = { first: 4, pitch: 8, margin: 8 }; +const CORNER = 8; +const BADGE = { width: 120, height: 20, overhang: 5, gap: 4 }; + +/** Horizontal, a vertical run at `viaX`, then horizontal again, with rounded turns. */ +function elbowPath(x0: number, y0: number, viaX: number, x1: number, y1: number): string { + const dy = y1 - y0; + if (Math.abs(dy) < 1) return `M${x0} ${y0}H${x1}`; + const r = Math.min(CORNER, Math.abs(dy) / 2, Math.abs(viaX - x0), Math.abs(x1 - viaX)); + const sy = Math.sign(dy); + const inX = Math.sign(viaX - x0); + const outX = Math.sign(x1 - viaX); + return [ + `M${x0} ${y0}`, + `H${viaX - inX * r}`, + `Q${viaX} ${y0} ${viaX} ${y0 + sy * r}`, + `V${y1 - sy * r}`, + `Q${viaX} ${y1} ${viaX + outX * r} ${y1}`, + `H${x1}`, + ].join(""); +} + +/** Straight to `fanX`, across any lanes so they only ever meet it square, then a curve. */ +const sCurve = (x0: number, y0: number, x1: number, y1: number, fanX = x0) => { + const reach = Math.max(24, (x1 - fanX) / 2); + const lead = fanX > x0 ? `H${fanX}` : ""; + return `M${x0} ${y0}${lead}C${fanX + reach} ${y0} ${x1 - reach} ${y1} ${x1} ${y1}`; +}; + +const frameColumns = (count: number) => Math.max(2, Math.min(4, Math.ceil(Math.sqrt(count / 2.2)))); + +type BayItem = + | { readonly kind: "target"; readonly targetId: string; readonly incoming: FleetLinkEdge[] } + | { readonly kind: "stack"; readonly stack: FleetStack }; + +interface FleetRow { + /** The host whose own machines these are; a row of shared machines has none. */ + readonly hostId: string | null; + readonly hosts: FleetNode[]; + readonly items: ReadonlyArray; +} + +/** One host's vertical run to a row of shared machines, kept to itself for its whole span. */ +interface FleetLane { + readonly id: string; + readonly from: number; + readonly to: number; + /** Where its links turn off towards their machines. */ + readonly branches: ReadonlyArray; + index: number; +} + +/** + * This client, the machines it knows, and those seen only through a link: beside the one host + * linking to them, or in a row between the several that do. Links to those run right of the + * environments and links between two environments run left of them, each on its own lane with + * its own entry, so two hosts' links never share a stretch. Deterministic. + */ +export function layoutFleetGraph( + graph: FleetGraph, + stacks: ReadonlyArray = [], +): FleetLayout { + const nodes = new Map(); + const stackGeometry = new Map(); + const routes = new Map(); + const linkGeometry = new Map(); + const handles = new Map(); + const links = graph.edges.filter(isLinkEdge); + const routeEdges = graph.edges.filter(isRouteEdge); + const byId = new Map(graph.nodes.map((node) => [node.id, node])); + const hosts = graph.nodes.filter( + (node) => node.kind === "environment" || node.kind === "connect", + ); + const hostIndex = new Map(hosts.map((host, index) => [host.id, index])); + const indexOf = (hostId: string) => hostIndex.get(hostId) ?? 0; + const accessRank = (access: AuthMcpClientAccess) => -ACCESS_ORDER.indexOf(access); + const labelOf = (id: string) => byId.get(id)?.label ?? ""; + const byLabel = (left: string, right: string) => + labelOrder.compare(labelOf(left), labelOf(right)) || (left < right ? -1 : 1); + + const stacked = new Set(stacks.flatMap((stack) => stack.edgeIds)); + const incomingOf = new Map(); + for (const link of links) { + if (byId.get(link.to)?.kind !== "target" || stacked.has(link.id)) continue; + incomingOf.set(link.to, [...(incomingOf.get(link.to) ?? []), link]); + } + const bayOf = new Map(); + const bandOf = new Map(); + const push = (into: Map, hostId: string, item: BayItem) => + into.set(hostId, [...(into.get(hostId) ?? []), item]); + for (const stack of stacks.toSorted((a, b) => accessRank(a.access) - accessRank(b.access))) { + push(bayOf, stack.sourceId, { kind: "stack", stack }); + } + const targets = [...incomingOf].map(([targetId, unsorted]) => ({ + targetId, + // Top to bottom in the order of the hosts, so the upper line is the upper host's. + incoming: unsorted.toSorted((left, right) => indexOf(left.from) - indexOf(right.from)), + })); + for (const { targetId, incoming } of targets + .filter((target) => target.incoming.length === 1) + .toSorted( + (left, right) => + accessRank(left.incoming[0]!.link.access) - accessRank(right.incoming[0]!.link.access) || + byLabel(left.targetId, right.targetId), + )) { + push(bayOf, incoming[0]!.from, { kind: "target", targetId, incoming }); + } + // Below the middle host of those linking to it: the shortest total reach, with ties going up. + const meanSource = (incoming: ReadonlyArray) => + incoming.reduce((sum, link) => sum + indexOf(link.from), 0) / incoming.length; + for (const { targetId, incoming } of targets + .filter((target) => target.incoming.length > 1) + .toSorted( + (left, right) => + meanSource(left.incoming) - meanSource(right.incoming) || + byLabel(left.targetId, right.targetId), + )) { + const anchor = incoming[Math.floor((incoming.length - 1) / 2)]!.from; + push(bandOf, anchor, { kind: "target", targetId, incoming }); + } + + // A machine with no links rides beside a shared row instead of pushing the hosts further apart. + const linked = new Set(links.flatMap((link) => [link.from, link.to])); + const rows: FleetRow[] = []; + let shared: FleetRow | null = null; + for (const host of hosts) { + if (shared !== null && !linked.has(host.id)) { + shared.hosts.push(host); + continue; + } + rows.push({ hostId: host.id, hosts: [host], items: bayOf.get(host.id) ?? [] }); + const band = bandOf.get(host.id); + shared = band === undefined ? null : { hostId: null, hosts: [], items: band }; + if (shared !== null) rows.push(shared); + } + + // Links between environments: shorter ones take the lanes nearer the cards, and two share a + // lane when no host lies between both pairs, so a chain of links reads as one line. + const reach = (link: FleetLinkEdge) => Math.abs(indexOf(link.to) - indexOf(link.from)); + const low = (link: FleetLinkEdge) => Math.min(indexOf(link.from), indexOf(link.to)); + const high = (link: FleetLinkEdge) => Math.max(indexOf(link.from), indexOf(link.to)); + const between = links + .filter((link) => hostIndex.has(link.from) && hostIndex.has(link.to)) + .toSorted((left, right) => reach(left) - reach(right) || (left.id < right.id ? -1 : 1)); + const betweenLanes: FleetLinkEdge[][] = []; + const betweenLane = new Map(); + for (const link of between) { + let index = 0; + while ( + betweenLanes[index]?.some( + (other) => Math.max(low(other), low(link)) < Math.min(high(other), high(link)), + ) + ) { + index += 1; + } + betweenLane.set(link.id, index); + (betweenLanes[index] ??= []).push(link); + } + // Each end of such a link has its own port on the card's left edge, above the routes when the + // other machine is above and below them when it is below. The outer lane's port is nearer the + // middle, so two links turning at one card never cross. + const portsOf = new Map(); + for (const link of between) { + const down = Math.sign(indexOf(link.to) - indexOf(link.from)); + for (const key of [`${link.from}:${down}`, `${link.to}:${-down}`]) { + portsOf.set(key, [...(portsOf.get(key) ?? []), link]); + } + } + for (const ports of portsOf.values()) { + ports.sort((left, right) => betweenLane.get(right.id)! - betweenLane.get(left.id)!); + } + const routesInto = (hostId: string) => routeEdges.filter((edge) => edge.to === hostId).length; + const routesExtent = (hostId: string) => + ((Math.max(1, routesInto(hostId)) - 1) * PORT_PITCH + PILL.height) / 2; + const cardHeight = (host: FleetNode) => { + const ports = Math.max( + portsOf.get(`${host.id}:-1`)?.length ?? 0, + portsOf.get(`${host.id}:1`)?.length ?? 0, + ); + const plain = + host.kind === "connect" + ? OFFER.height + : Math.max(CARD.height, (routesInto(host.id) - 1) * PORT_PITCH + PILL.height + 20); + return ports === 0 + ? plain + : Math.max( + plain, + 2 * + (routesExtent(host.id) + + LINK_PORT.first + + (ports - 1) * LINK_PORT.pitch + + LINK_PORT.margin), + ); + }; + const itemSize = (item: BayItem) => { + if (item.kind === "target") { + return { + width: TARGET.width, + height: Math.max(TARGET.height, 20 + (item.incoming.length - 1) * ENTRY_PITCH), + }; + } + if (!item.stack.expanded) { + return { width: TARGET.width + STACK.lift, height: STACK.height + STACK.lift }; + } + const columns = frameColumns(item.stack.memberIds.length); + const stackRows = Math.ceil(item.stack.memberIds.length / columns); + return { + width: FRAME_PAD * 2 + columns * (CHIP.width + CHIP_GAP) - CHIP_GAP, + height: FRAME_HEADER + stackRows * (CHIP.height + CHIP_GAP) - CHIP_GAP + FRAME_PAD, + }; + }; + + const pillX = CLIENT.width + WIRE; + const cardX = + pillX + + PILL.width + + (betweenLanes.length === 0 + ? PILL_GAP + : BETWEEN.last + (betweenLanes.length - 1) * BETWEEN.step + BETWEEN.first); + const cardRight = cardX + CARD.width; + + // Heights first: which lanes the channel needs, and so how wide it is, follows from them. + const placed: Array<{ + readonly item: BayItem; + readonly y: number; + readonly size: { readonly width: number; readonly height: number }; + readonly hostId: string | null; + }> = []; + let y = HEADER; + for (const row of rows) { + const heights = row.hosts.map(cardHeight); + const cardsHeight = heights.reduce((sum, height) => sum + height + GROUP_GAP, -GROUP_GAP); + const sizes = row.items.map(itemSize); + const bayHeight = sizes.reduce((sum, size) => sum + size.height + BAY_GAP, -BAY_GAP); + const rowHeight = Math.max(cardsHeight, bayHeight); + let cardY = y + (rowHeight - cardsHeight) / 2; + row.hosts.forEach((host, index) => { + const height = heights[index]!; + nodes.set(host.id, { x: cardX, y: cardY, width: CARD.width, height }); + if (host.kind === "environment") { + handles.set(host.id, { x: cardRight, y: cardY + height / 2 }); + } + cardY += height + GROUP_GAP; + }); + let itemY = y + (rowHeight - bayHeight) / 2; + row.items.forEach((item, index) => { + const size = sizes[index]!; + placed.push({ item, y: itemY, size, hostId: row.hostId }); + itemY += size.height + BAY_GAP; + }); + y += rowHeight + GROUP_GAP; + } + const height = Math.max(HEADER + CLIENT.height, y - GROUP_GAP); + + const centerOf = (id: string) => { + const rect = nodes.get(id)!; + return rect.y + rect.height / 2; + }; + + /** Where each link into a machine several hosts link to arrives. */ + const entryY = new Map(); + for (const { item, y: itemY, size, hostId } of placed) { + if (item.kind !== "target" || hostId !== null) continue; + item.incoming.forEach((link, index) => { + entryY.set( + link.id, + itemY + size.height / 2 + (index - (item.incoming.length - 1) / 2) * ENTRY_PITCH, + ); + }); + } + const portY = (link: FleetLinkEdge, hostId: string) => { + const side = Math.sign(indexOf(link.from === hostId ? link.to : link.from) - indexOf(hostId)); + const port = portsOf.get(`${hostId}:${side}`)!.indexOf(link); + return ( + centerOf(hostId) + side * (routesExtent(hostId) + LINK_PORT.first + port * LINK_PORT.pitch) + ); + }; + + // One lane per host for each shared row it reaches. + const trunkOf = new Map(); + const lanes: FleetLane[] = []; + for (const [anchor, band] of bandOf) { + const incoming = band.flatMap((item) => (item.kind === "target" ? item.incoming : [])); + for (const hostId of new Set(incoming.map((link) => link.from))) { + const from = centerOf(hostId); + const mine = incoming.filter((link) => link.from === hostId); + const branches = mine.map((link) => entryY.get(link.id)!); + const lane: FleetLane = { + id: `${hostId}>${anchor}`, + from, + to: branches.reduce((far, y) => (Math.abs(y - from) > Math.abs(far - from) ? y : far)), + branches, + index: 0, + }; + for (const link of mine) trunkOf.set(link.id, lane); + lanes.push(lane); + } + } + const span = (lane: FleetLane) => Math.abs(lane.to - lane.from); + const passes = (lane: FleetLane, at: number) => + at > Math.min(lane.from, lane.to) && at < Math.max(lane.from, lane.to); + // What `inner` nearer the cards costs: each of its turn-offs that has to cross `outer`, and + // `outer` leaving its host across it. Of two lanes the one that costs less goes inside. + const crossings = (inner: FleetLane, outer: FleetLane) => + inner.branches.filter((at) => passes(outer, at)).length + Number(passes(inner, outer.from)); + const taken: FleetLane[][] = []; + for (const lane of lanes + .toSorted((left, right) => (left.id < right.id ? -1 : 1)) + .toSorted( + (left, right) => crossings(left, right) - crossings(right, left) || span(left) - span(right), + )) { + const top = Math.min(lane.from, lane.to) - LANE_CLEARANCE; + const bottom = Math.max(lane.from, lane.to) + LANE_CLEARANCE; + let index = 0; + while ( + taken[index]?.some( + (other) => Math.min(other.from, other.to) < bottom && top < Math.max(other.from, other.to), + ) + ) { + index += 1; + } + lane.index = index; + (taken[index] ??= []).push(lane); + } + const laneX = (lane: FleetLane) => cardRight + LANE_FIRST + lane.index * LANE_STEP; + const fanX = taken.length === 0 ? cardRight : cardRight + LANE_FIRST + taken.length * LANE_STEP; + const bayX = fanX + LINK_RUN; + const endX = bayX - ARROW_LENGTH; + + let width = fanX; + for (const { item, y: itemY, size, hostId } of placed) { + width = Math.max(width, bayX + size.width); + if (item.kind === "target") { + nodes.set(item.targetId, { x: bayX, y: itemY, ...size }); + for (const link of item.incoming) { + const trunk = trunkOf.get(link.id); + const targetY = entryY.get(link.id) ?? itemY + size.height / 2; + linkGeometry.set(link.id, { + d: + trunk === undefined + ? sCurve(cardRight, centerOf(link.from), endX, targetY, fanX) + : elbowPath(cardRight, trunk.from, laneX(trunk), endX, targetY), + arrow: { x: bayX, y: targetY, dir: 1 }, + badge: null, + }); + } + continue; + } + const originY = centerOf(hostId ?? item.stack.sourceId); + if (!item.stack.expanded) { + const face = { x: bayX, y: itemY + STACK.lift, width: TARGET.width, height: STACK.height }; + const faceY = face.y + face.height / 2; + stackGeometry.set(item.stack.id, { + rect: { x: bayX, y: itemY, ...size }, + face, + d: sCurve(cardRight, originY, endX, faceY, fanX), + arrow: { x: bayX, y: faceY }, + }); + continue; + } + const columns = frameColumns(item.stack.memberIds.length); + item.stack.memberIds.forEach((memberId, member) => { + nodes.set(memberId, { + x: bayX + FRAME_PAD + (member % columns) * (CHIP.width + CHIP_GAP), + y: itemY + FRAME_HEADER + Math.floor(member / columns) * (CHIP.height + CHIP_GAP), + ...CHIP, + }); + }); + const headerY = itemY + FRAME_HEADER / 2; + stackGeometry.set(item.stack.id, { + rect: { x: bayX, y: itemY, ...size }, + face: { x: bayX, y: itemY, width: size.width, height: FRAME_HEADER }, + d: sCurve(cardRight, originY, endX, headerY, fanX), + arrow: { x: bayX, y: headerY }, + }); + } + + const hostCenters = hosts.map((host) => centerOf(host.id)); + const clientCenterY = + hostCenters.length === 0 + ? HEADER + CLIENT.height / 2 + : (hostCenters[0]! + hostCenters.at(-1)!) / 2; + nodes.set(FLEET_CLIENT_NODE_ID, { + x: 0, + y: clientCenterY - CLIENT.height / 2, + ...CLIENT, + }); + + // Wires leave the client a little apart, in the order they arrive, so they never cross. + const fan = Math.min(CLIENT.height - 20, (routeEdges.length - 1) * 4); + let wire = 0; + for (const host of hosts) { + const hostRoutes = routeEdges.filter((edge) => edge.to === host.id); + hostRoutes.forEach((edge, index) => { + const portY = centerOf(host.id) + (index - (hostRoutes.length - 1) / 2) * PORT_PITCH; + const startY = + clientCenterY + (routeEdges.length < 2 ? 0 : (wire / (routeEdges.length - 1) - 0.5) * fan); + wire += 1; + routes.set(edge.id, { + d: `${sCurve(CLIENT.width, startY, pillX, portY)}H${cardX}`, + pill: { x: pillX, y: portY - PILL.height / 2, ...PILL }, + }); + }); + } + + // A link between environments names its access on its own lane, in a gap between two cards: + // the one just past the environment it leaves, or the next one free. It grows away from the + // other lanes passing there; where it cannot, it may cover one, but never another name. + const runs = between.map((link) => ({ + link, + x: cardX - BETWEEN.first - betweenLane.get(link.id)! * BETWEEN.step, + from: portY(link, link.from), + to: portY(link, link.to), + })); + const badges: FleetLinkBadge[] = []; + for (const run of runs) { + const { link, x } = run; + const down = indexOf(link.to) > indexOf(link.from); + const gaps: number[] = []; + for (let index = low(link); index < high(link); index += 1) { + const above = nodes.get(hosts[index]!.id)!; + const below = nodes.get(hosts[index + 1]!.id)!; + gaps.push(above.y + above.height + GROUP_GAP / 2, below.y - GROUP_GAP / 2); + } + if (!down) gaps.reverse(); + const place = (y: number, side: 1 | -1): FleetLinkBadge => ({ + x: side === 1 ? x - BADGE.overhang : x + BADGE.overhang - BADGE.width, + y: y - BADGE.height / 2, + width: BADGE.width, + height: BADGE.height, + side, + }); + const clearOfLanes = (badge: FleetLinkBadge) => + !runs.some( + (other) => + other !== run && + other.x > badge.x && + other.x < badge.x + badge.width && + Math.min(other.from, other.to) < badge.y + badge.height && + Math.max(other.from, other.to) > badge.y, + ); + const clearOfNames = (badge: FleetLinkBadge) => + !badges.some( + (other) => + other.x < badge.x + badge.width + BADGE.gap && + badge.x < other.x + other.width + BADGE.gap && + other.y < badge.y + badge.height + BADGE.gap && + badge.y < other.y + other.height + BADGE.gap, + ); + const options = gaps.flatMap((y) => [place(y, 1), place(y, -1)]).filter(clearOfNames); + const badge = options.find(clearOfLanes) ?? options[0] ?? null; + if (badge !== null) badges.push(badge); + linkGeometry.set(link.id, { + d: elbowPath(cardX, run.from, x, cardX - ARROW_LENGTH, run.to), + arrow: { x: cardX, y: run.to, dir: 1 }, + badge, + }); + } + + return { + nodes, + stacks: stackGeometry, + routes, + links: linkGeometry, + handles, + columns: [ + { id: "client", x: 0 }, + ...(hosts.length > 0 ? [{ id: "environments" as const, x: cardX }] : []), + ...(placed.length > 0 ? [{ id: "targets" as const, x: bayX }] : []), + ], + width, + height, + }; +} + +/** What the arrow keys move between: every machine drawn, and each stack's control. */ +export function fleetFocusRects(layout: FleetLayout): ReadonlyMap { + return new Map([ + ...layout.nodes, + ...[...layout.stacks].map(([id, geometry]) => [id, geometry.face] as const), + ]); +} + +export type FleetDirection = "up" | "down" | "left" | "right"; + +/** The nearest item in that direction, for arrow keys. Sideways distance counts double. */ +export function nextFleetNode( + rects: ReadonlyMap, + fromId: string, + direction: FleetDirection, +): string | null { + const from = rects.get(fromId); + if (!from) return null; + const horizontal = direction === "left" || direction === "right"; + const sign = direction === "left" || direction === "up" ? -1 : 1; + const center = (rect: FleetRect) => ({ + x: rect.x + rect.width / 2, + y: rect.y + rect.height / 2, + }); + const origin = center(from); + let best: { readonly id: string; readonly score: number } | null = null; + for (const [id, rect] of rects) { + if (id === fromId) continue; + const point = center(rect); + const along = sign * (horizontal ? point.x - origin.x : point.y - origin.y); + const across = Math.abs(horizontal ? point.y - origin.y : point.x - origin.x); + if (along < 1) continue; + const score = along + across * 2; + if (best === null || score < best.score) best = { id, score }; + } + return best?.id ?? null; +} + +export interface FleetViewTransform { + readonly x: number; + readonly y: number; + readonly scale: number; +} + +const FLEET_MIN_SCALE = 0.3; +const FLEET_MAX_SCALE = 2; +/** A small setup is enlarged to fill the canvas, but not until two machines look like a poster. */ +const FLEET_FIT_MAX_SCALE = 1.15; +const FLEET_FIT_PADDING = 28; + +const fitScale = (available: number, extent: number) => + Math.max(0.01, (available - FLEET_FIT_PADDING * 2) / Math.max(1, extent)); + +/** Centers the whole map in the viewport at the largest scale that shows all of it. */ +export function fitFleetLayout( + layout: Pick, + viewport: { readonly width: number; readonly height: number }, +): FleetViewTransform { + const scale = Math.min( + FLEET_FIT_MAX_SCALE, + fitScale(viewport.width, layout.width), + fitScale(viewport.height, layout.height), + ); + return { + scale, + x: (viewport.width - layout.width * scale) / 2, + y: (viewport.height - layout.height * scale) / 2, + }; +} + +/** How tall the canvas wants to be at this width: the fitted map plus padding, within bounds. */ +export function fleetCanvasHeight( + layout: Pick, + width: number, + bounds: { readonly min: number; readonly max: number }, +): number { + const scale = Math.min(FLEET_FIT_MAX_SCALE, fitScale(width, layout.width)); + const wanted = Math.ceil(layout.height * scale + FLEET_FIT_PADDING * 2); + return Math.max(bounds.min, Math.min(bounds.max, wanted)); +} + +/** Zooms by `factor`, keeping the map point under `anchor` where it is. */ +export function zoomFleetView( + view: FleetViewTransform, + factor: number, + anchor: FleetPoint, + fitScale = view.scale, +): FleetViewTransform { + // A fit of a very large setup sits below the manual minimum: zooming out stops at the fit + // instead of jumping up, and can return to it after zooming in. + const floor = Math.min(FLEET_MIN_SCALE, fitScale, view.scale); + const scale = Math.max(floor, Math.min(FLEET_MAX_SCALE, view.scale * factor)); + const ratio = scale / view.scale; + return { + scale, + x: anchor.x - (anchor.x - view.x) * ratio, + y: anchor.y - (anchor.y - view.y) * ratio, + }; +} diff --git a/apps/web/src/i18n/translations/de.json b/apps/web/src/i18n/translations/de.json index 5439ee39688ea..113e5451965e8 100644 --- a/apps/web/src/i18n/translations/de.json +++ b/apps/web/src/i18n/translations/de.json @@ -8047,6 +8047,9 @@ "d087da5017f20fa2": "Keine Umgebung ausgewählt", "cb553d31c9d1b1c7": "Verbinde eine Umgebung, um ihre Einstellungen und Zugriffe zu sehen.", "9a84dc0e80037e05": "Diese App", + "3d96310c2214fe2d": "Umgebungen anzeigen als", + "41e0e5e03e07db42": "Karte", + "3a8adb207fb5e078": "Liste", "493685e264877b13": "Zugriff wird angezeigt für", "5b2287f7b10cfa2f": "Offline", "03f150efa96ec728": "Zu Windows wechseln", @@ -8349,6 +8352,83 @@ "191fa21f1cfda1ef": "Der Host hat die Anmeldung dieses Geräts abgelehnt. Kopple diese Adresse erneut über „Route hinzufügen“.", "219bc3612d646a01": "Route entfernen", "b2877341429675aa": "über {route}", + "537e7cf4df7a0af1": "Dieser Browser", + "601e0c9e6a45a54f": "Karte einpassen", + "feec58f6653f5673": "So liest man die Linien", + "e459bd5c53a993e2": "Route in Verwendung", + "46e0a0c6ff391521": "In Verwendung", + "1151e8a9fb7bdfcf": "Bereit", + "a322337b6655de2a": "Nicht in Verwendung", + "e31c7e76ef900ef4": "Anmeldung abgelehnt", + "235b3e270162f18b": "Verknüpfung, kräftiger bei mehr Zugriff", + "c326a7e66bab5da0": "Deine Umgebungen", + "86222507d918084b": "Über eine Verknüpfung erreicht", + "aa34f7bc5aaf6bb0": "Karte deiner Rechner", + "3b61cc529ae01681": "Mit den Pfeiltasten wechselst du zwischen Rechnern. Die Eingabetaste öffnet die Details eines Rechners mit seinen Routen und Verknüpfungen. Tab führt von einer Umgebung zu ihrer Verknüpfen-Schaltfläche. Plus und Minus zoomen, Null passt die Karte ein.", + "753b4a8ec5521c98": "Verknüpfung von {source} zu {target}: {summary}", + "bb6a74a47a3852c7": "Abgelaufen", + "3076117d81a9c1c0": "Antwortet nicht", + "96fdb2fd529b1fbb": "Fehlerhaft", + "8971602c42718d72": "Erreichbar", + "1b256867b95ee022": "{days, plural, one {Läuft in {days} Tag ab} other {Läuft in {days} Tagen ab}}", + "aae31cf2017dab5b": "Öffentlich", + "19f6a3505837907d": "{access}. {reachable} von {count} erreichbar", + "325f85fe7ade4efd": "{first} bis {last}, {count} Rechner, verknüpft von {source}. {summary}", + "35b783cfc817cb6f": "Diese Rechner einklappen", + "b8f2d917d3a592df": "Jeden Rechner auf der Karte zeigen", + "b0d81579d80fb94a": "nur über eine Verknüpfung bekannt", + "2d3dc930fd1cdd55": "von {source}: {summary}", + "911bc3bcde1aba3b": "{count, plural, one {# eingehende Verknüpfung} other {# eingehende Verknüpfungen}}", + "0fecb34fd1ae531f": "{label}, in deinem T3-Connect-Konto, dieser App nicht hinzugefügt. {status}", + "930f9e01fc4591b4": "Aus", + "4a84ad9b7f8e4909": "Verknüpfungen werden geladen…", + "9c88c8e716354091": "Verknüpfungen konnten nicht geladen werden", + "f9733c7b64c6f5d9": "Verknüpfte Umgebungen sind aus", + "ba30444f6d79cbdd": "Verknüpfungen von hier nicht lesbar", + "6a34b35812bb4ad0": "{count, plural, =0 {Keine ausgehenden Verknüpfungen} one {# ausgehende Verknüpfung} other {# ausgehende Verknüpfungen}}", + "5d252c8bbc3b24d0": "{status}. Verknüpfungen unbekannt", + "ec2c609c028d63b4": "{label} mit einem anderen Rechner verknüpfen", + "0a72d33781010657": "Damit ist keine Verknüpfung möglich", + "4f10f6354f38106e": "Verknüpfung zu {target} erneuern. Kein Kopplungscode nötig", + "5a25bfd7c3a8e4b4": "Mit {target} verknüpfen. Kein Kopplungscode nötig", + "b4b893b9c210e0ba": "Verknüpfung zu {target} erneuern. Benötigt einen Kopplungscode von dort", + "052c3f87704b216d": "Mit {target} verknüpfen. Benötigt einen Kopplungscode von dort", + "e6b05c7e6ef4fef7": "Auf einem Rechner ablegen, um {source} damit zu verknüpfen", + "7f045c3477f783cc": "{count, plural, one {# Verknüpfung braucht Aufmerksamkeit.} other {# Verknüpfungen brauchen Aufmerksamkeit.}}", + "d53ada50331e6041": "{machines, plural, one {# Rechner} other {# Rechner}}, {links, plural, =0 {keine Verknüpfungen} one {# Verknüpfung} other {# Verknüpfungen}}", + "706ac721bf99036c": "{machines, plural, one {# Rechner} other {# Rechner}}", + "61287d7320b20cad": "Wähle einen Rechner aus, um ihn zu verwalten. Um zwei Rechner zu verknüpfen, ziehe das Plus einer Umgebung auf einen anderen Rechner oder drücke es, um einen auszuwählen.", + "743b93767ec7ebf8": "Wähle einen Rechner aus, um ihn zu verwalten.", + "718e9f7ff8f48497": "Eine Verknüpfung erreicht einen Rechner und endet dort. Sie reicht nicht weiter zu den Rechnern, mit denen dieser verknüpft ist.", + "3e8441af6148878f": "Läuft am {date} ab", + "786d62572ebcebdf": "{count, plural, one {# Rechner} other {# Rechner}}, verknüpft von {source}, {access}, {reachable} erreichbar", + "166aac696c3ec460": "Auf der Karte einklappen", + "069d8ba658617f30": "Jeden auf der Karte zeigen", + "eefe994332120d82": "Verknüpfen", + "9aca4025e20bef31": "Mit {connected} von {total} Umgebungen verbunden", + "7f3ea6eba251a165": "Jede Linie von hier ist eine gespeicherte Route zu einer Umgebung. Die Karte zeigt die Verknüpfungen der Umgebungen, mit denen diese App verbunden ist; eine nicht erreichbare Umgebung kann Verknüpfungen haben, die nicht eingezeichnet sind.", + "398cee23ca4dabec": "{count, plural, =0 {Kein bekannter Rechner ist hierher verknüpft} one {Von # Rechner verknüpft} other {Von # Rechnern verknüpft}}", + "4492f856b6539118": "{label} ist in deinem T3-Connect-Konto, aber dieser App nicht hinzugefügt. Füge es hinzu, um dich zu verbinden und seine Verknüpfungen zu sehen.", + "da2990354cbe0fab": "Nur über eine Verknüpfung bekannt", + "5d46435186f86deb": "Diese App ist nicht mit {label} verbunden, daher werden dessen Verknüpfungen zu anderen Rechnern nicht angezeigt.", + "b943528e12e44252": "Diese App ist gerade nicht mit {label} verbunden, daher werden dessen Verknüpfungen zu anderen Rechnern nicht angezeigt.", + "f0fa4a3c6960cb17": "Verknüpfte Umgebungen sind auf {label} aus. Schalte sie dort in den Einstellungen unter Labs ein, um von dort aus zu verknüpfen.", + "eb3226bab4946cfa": "Diese App darf die Verknüpfungen von {label} nicht lesen.", + "59bb2a50641eb2a9": "Verknüpfungen von {label} konnten nicht geladen werden: {error}", + "58cb9c075da185fb": "Verknüpfte Umgebungen werden geladen…", + "126e2b7a117f01d5": "{count, plural, =0 {Mit keinem Rechner verknüpft} one {Verknüpft mit # Rechner} other {Verknüpft mit # Rechnern}}", + "285d95a8e5ad0ec5": "ist verknüpft mit", + "57f38a04b1e5c033": "Wird vergessen…", + "20ffe8337f8f30ba": "Vergessen", + "1f221fe54654ed13": "Zugriff", + "8b0cd4f77cc74c37": "Status", + "33386c89f3b07fea": "Abgelaufen. Verknüpfe es erneut mit einem neuen Kopplungscode.", + "13d91e967cd9065c": "Antwortet gerade nicht.", + "42e613ac8acac777": "{days, plural, one {Läuft in {days} Tag ab. Verknüpfe es erneut, um es zu verlängern.} other {Läuft in {days} Tagen ab. Verknüpfe es erneut, um es zu verlängern.}}", + "0990edee7035bcfe": "Läuft ab", + "1c161c630d28d225": "Adressen", + "7ee376c7db73ab57": "Verknüpft", + "e9f7a62ecd609a46": "Zuletzt erreicht", "70bae47e93a2f207": "Vollständigen Fehler anzeigen", "e4099af6d85770ff": "„{font}“ ist keine Monospace-Schrift", "a8448493d83279e2": "Code und Terminal brauchen eine Schrift mit fester Breite, daher wurde die aktuelle Schrift beibehalten.", @@ -8686,21 +8766,14 @@ "18b1d4d42b945b34": "Rechner", "03860d65c4052ab5": "Es wird geprüft, welche Rechner bereits verknüpft sind…", "4cea6be0fe6be16f": "Verknüpfte Umgebungen konnten nicht geladen werden", - "58cb9c075da185fb": "Verknüpfte Umgebungen werden geladen…", "25b74062dc03079e": "Keine verknüpften Umgebungen", "6698127fcc912f23": "Verknüpfe einen anderen Rechner mit T3 Code, etwa einen VPS, damit Agenten hier dort Threads starten und steuern können.", - "ad5ed0ce61b966eb": "{label} vergessen? Agenten von hier arbeiten dort nicht mehr. Widerrufe „T3 Code · …“ unter „Freigabe & Zugriff“ auf {label}, um die Sitzung auch dort zu beenden.", - "81c9796bf61b306a": "Verknüpfung konnte nicht vergessen werden", - "33386c89f3b07fea": "Abgelaufen. Verknüpfe es erneut mit einem neuen Kopplungscode.", - "13d91e967cd9065c": "Antwortet gerade nicht.", - "42e613ac8acac777": "{days, plural, one {Läuft in {days} Tag ab. Verknüpfe es erneut, um es zu verlängern.} other {Läuft in {days} Tagen ab. Verknüpfe es erneut, um es zu verlängern.}}", - "8971602c42718d72": "Erreichbar", - "57f38a04b1e5c033": "Wird vergessen…", - "20ffe8337f8f30ba": "Vergessen", "e1789f863205ad5a": "Umgebung konnte nicht verknüpft werden", "40cde51afa218290": "{label} verknüpft", - "eefe994332120d82": "Verknüpfen", + "64ac3d1579ca9f5b": "{source} mit {target} verknüpfen", "fb71127e5746a6bc": "Unter „Freigabe & Zugriff“ dort oder mit t3 pair", + "ad5ed0ce61b966eb": "{label} vergessen? Agenten von hier arbeiten dort nicht mehr. Widerrufe „T3 Code · …“ unter „Freigabe & Zugriff“ auf {label}, um die Sitzung auch dort zu beenden.", + "81c9796bf61b306a": "Verknüpfung konnte nicht vergessen werden", "130e51beb6cf5aad": "Umgebung verknüpfen", "122c3e355699e69d": "Agenten hier können dort dann Threads starten, ihnen Nachrichten senden und auf sie warten. Sie erscheint unter „Autorisierte Clients“ in „Freigabe & Zugriff“ dieser Umgebung und kann dort widerrufen werden.", "dc9a0b68d101e904": "Bereits verknüpft. Erneutes Verknüpfen verlängert sie mit dem gewählten Zugriff.", @@ -9388,7 +9461,6 @@ "e3349eb2353ee27c": "Die Genehmigung neuer Geräte ist aus, daher kann sich ein widerrufenes Gerät, das bei deinem T3-Connect-Konto angemeldet ist, von selbst wieder verbinden.", "080160002915c666": "Genehmigung für neue Geräte verlangen", "73dd0f86f5363431": "Das Gerät muss hier genehmigt werden, bevor es sich erneut verbinden kann.", - "930f9e01fc4591b4": "Aus", "6c7762bd72cea808": "Verbindung wird wiederhergestellt: {error}", "6cced6a88a19f1f2": "Verbindung wird wiederhergestellt", "8cbb63fdff9fde72": "Verbindung fehlgeschlagen: {error}", diff --git a/apps/web/src/i18n/translations/en.json b/apps/web/src/i18n/translations/en.json index c378e66342505..3fb9be66826b5 100644 --- a/apps/web/src/i18n/translations/en.json +++ b/apps/web/src/i18n/translations/en.json @@ -8054,6 +8054,9 @@ "d087da5017f20fa2": "No environment selected", "cb553d31c9d1b1c7": "Connect an environment to view its settings and access.", "9a84dc0e80037e05": "This app", + "3d96310c2214fe2d": "Show environments as", + "41e0e5e03e07db42": "Map", + "3a8adb207fb5e078": "List", "493685e264877b13": "Showing access for", "5b2287f7b10cfa2f": "Offline", "03f150efa96ec728": "Switch to Windows", @@ -8357,6 +8360,83 @@ "191fa21f1cfda1ef": "The host refused this device's sign-in. Pair this address again with Add route.", "219bc3612d646a01": "Remove route", "b2877341429675aa": "via {route}", + "537e7cf4df7a0af1": "This browser", + "601e0c9e6a45a54f": "Fit the map to view", + "feec58f6653f5673": "How to read the lines", + "e459bd5c53a993e2": "Route in use", + "46e0a0c6ff391521": "In use", + "1151e8a9fb7bdfcf": "Standby", + "a322337b6655de2a": "Not in use", + "e31c7e76ef900ef4": "Sign-in refused", + "235b3e270162f18b": "Link, heavier with more access", + "c326a7e66bab5da0": "Your environments", + "86222507d918084b": "Reached through a link", + "aa34f7bc5aaf6bb0": "Map of your machines", + "3b61cc529ae01681": "Arrow keys move between machines. Enter opens a machine's details, with its routes and links. Tab from an environment reaches its link button. Plus and minus zoom, zero fits the map.", + "753b4a8ec5521c98": "Link from {source} to {target}: {summary}", + "bb6a74a47a3852c7": "Expired", + "3076117d81a9c1c0": "Not answering", + "96fdb2fd529b1fbb": "Failing", + "8971602c42718d72": "Reachable", + "1b256867b95ee022": "{days, plural, one {Expires in {days} day} other {Expires in {days} days}}", + "aae31cf2017dab5b": "Public", + "19f6a3505837907d": "{access}. {reachable} of {count} reachable", + "325f85fe7ade4efd": "{first} to {last}, {count} machines linked from {source}. {summary}", + "35b783cfc817cb6f": "Collapse these machines", + "b8f2d917d3a592df": "Show each machine on the map", + "b0d81579d80fb94a": "known only through a link", + "2d3dc930fd1cdd55": "from {source}: {summary}", + "911bc3bcde1aba3b": "{count, plural, one {# link in} other {# links in}}", + "0fecb34fd1ae531f": "{label}, on your T3 Connect account, not added to this app. {status}", + "930f9e01fc4591b4": "Off", + "4a84ad9b7f8e4909": "Loading links…", + "9c88c8e716354091": "Links could not be loaded", + "f9733c7b64c6f5d9": "Linked environments is off", + "ba30444f6d79cbdd": "Links not readable from here", + "6a34b35812bb4ad0": "{count, plural, =0 {No links out} one {# link out} other {# links out}}", + "5d252c8bbc3b24d0": "{status}. Links unknown", + "ec2c609c028d63b4": "Link {label} to another machine", + "0a72d33781010657": "Cannot link to this", + "4f10f6354f38106e": "Renew the link to {target}. No pairing code needed", + "5a25bfd7c3a8e4b4": "Link to {target}. No pairing code needed", + "b4b893b9c210e0ba": "Renew the link to {target}. Needs a pairing code from it", + "052c3f87704b216d": "Link to {target}. Needs a pairing code from it", + "e6b05c7e6ef4fef7": "Drop on a machine to link {source} to it", + "7f045c3477f783cc": "{count, plural, one {# link needs attention.} other {# links need attention.}}", + "d53ada50331e6041": "{machines, plural, one {# machine} other {# machines}}, {links, plural, =0 {no links} one {# link} other {# links}}", + "706ac721bf99036c": "{machines, plural, one {# machine} other {# machines}}", + "61287d7320b20cad": "Select a machine to manage it. To link two machines, drag the plus on an environment onto another machine, or press it to pick one.", + "743b93767ec7ebf8": "Select a machine to manage it.", + "718e9f7ff8f48497": "A link reaches one machine and stops there. It does not pass on to the machines that one links to.", + "3e8441af6148878f": "Expires {date}", + "786d62572ebcebdf": "{count, plural, one {# machine} other {# machines}} linked from {source}, {access}, {reachable} reachable", + "166aac696c3ec460": "Collapse on the map", + "069d8ba658617f30": "Show each on the map", + "eefe994332120d82": "Link", + "9aca4025e20bef31": "Connected to {connected} of {total} environments", + "7f3ea6eba251a165": "Each line from here is a saved route to an environment. The map shows the links of the environments this app is connected to; one it cannot reach may hold links that are not drawn.", + "398cee23ca4dabec": "{count, plural, =0 {No known machine links here} one {Linked from # machine} other {Linked from # machines}}", + "4492f856b6539118": "{label} is on your T3 Connect account but not added to this app. Add it to connect, and to see the links it holds.", + "da2990354cbe0fab": "Known only through a link", + "5d46435186f86deb": "This app is not connected to {label}, so any links it holds to other machines are not shown.", + "b943528e12e44252": "This app is not connected to {label} right now, so any links it holds to other machines are not shown.", + "f0fa4a3c6960cb17": "Linked environments is off on {label}. Turn it on in its Settings, under Labs, to link from it.", + "eb3226bab4946cfa": "This app may not read the links {label} holds.", + "59bb2a50641eb2a9": "Could not load the links {label} holds: {error}", + "58cb9c075da185fb": "Loading linked environments…", + "126e2b7a117f01d5": "{count, plural, =0 {Links to no one} one {Links to # machine} other {Links to # machines}}", + "285d95a8e5ad0ec5": "links to", + "57f38a04b1e5c033": "Forgetting…", + "20ffe8337f8f30ba": "Forget", + "1f221fe54654ed13": "Access", + "8b0cd4f77cc74c37": "Status", + "33386c89f3b07fea": "Expired. Link it again with a new pairing code.", + "13d91e967cd9065c": "Not answering right now.", + "42e613ac8acac777": "{days, plural, one {Expires in {days} day. Link it again to renew.} other {Expires in {days} days. Link it again to renew.}}", + "0990edee7035bcfe": "Expires", + "1c161c630d28d225": "Addresses", + "7ee376c7db73ab57": "Linked", + "e9f7a62ecd609a46": "Last reached", "70bae47e93a2f207": "Show full error", "e4099af6d85770ff": "\"{font}\" isn't monospace", "a8448493d83279e2": "Code and terminal need a fixed-width font, so the current font was kept.", @@ -8694,21 +8774,14 @@ "18b1d4d42b945b34": "Machines", "03860d65c4052ab5": "Checking which machines are already linked…", "4cea6be0fe6be16f": "Could not load linked environments", - "58cb9c075da185fb": "Loading linked environments…", "25b74062dc03079e": "No linked environments", "6698127fcc912f23": "Link another machine running T3 Code, such as a VPS, so agents here can launch and drive threads there.", - "ad5ed0ce61b966eb": "Forget {label}? Agents here stop working there. Revoke \"T3 Code · …\" in {label}''s Sharing & access to end the session there too.", - "81c9796bf61b306a": "Could not forget the link", - "33386c89f3b07fea": "Expired. Link it again with a new pairing code.", - "13d91e967cd9065c": "Not answering right now.", - "42e613ac8acac777": "{days, plural, one {Expires in {days} day. Link it again to renew.} other {Expires in {days} days. Link it again to renew.}}", - "8971602c42718d72": "Reachable", - "57f38a04b1e5c033": "Forgetting…", - "20ffe8337f8f30ba": "Forget", "e1789f863205ad5a": "Could not link the environment", "40cde51afa218290": "Linked {label}", - "eefe994332120d82": "Link", + "64ac3d1579ca9f5b": "Link {source} to {target}", "fb71127e5746a6bc": "From Sharing & access there, or t3 pair", + "ad5ed0ce61b966eb": "Forget {label}? Agents here stop working there. Revoke \"T3 Code · …\" in {label}''s Sharing & access to end the session there too.", + "81c9796bf61b306a": "Could not forget the link", "130e51beb6cf5aad": "Link an environment", "122c3e355699e69d": "Agents here can then launch, message and wait on threads there. It appears under Authorized clients in that environment's Sharing & access, where it can be revoked.", "dc9a0b68d101e904": "Already linked. Linking again renews it with the access you pick.", @@ -9396,7 +9469,6 @@ "e3349eb2353ee27c": "Approval for new devices is off, so a revoked device signed in to your T3 Connect account can connect again on its own.", "080160002915c666": "Require approval for new devices", "73dd0f86f5363431": "The device has to be approved here before it can connect again.", - "930f9e01fc4591b4": "Off", "6c7762bd72cea808": "Reconnecting: {error}", "6cced6a88a19f1f2": "Reconnecting", "8cbb63fdff9fde72": "Connection failed: {error}", diff --git a/apps/web/src/i18n/translations/es.json b/apps/web/src/i18n/translations/es.json index 1538850527718..47dae4f585679 100644 --- a/apps/web/src/i18n/translations/es.json +++ b/apps/web/src/i18n/translations/es.json @@ -8046,6 +8046,9 @@ "d087da5017f20fa2": "No hay ningún entorno seleccionado", "cb553d31c9d1b1c7": "Conecta un entorno para ver sus ajustes y su acceso.", "9a84dc0e80037e05": "Esta app", + "3d96310c2214fe2d": "Mostrar entornos como", + "41e0e5e03e07db42": "Mapa", + "3a8adb207fb5e078": "Lista", "493685e264877b13": "Mostrando el acceso de", "5b2287f7b10cfa2f": "Sin conexión", "03f150efa96ec728": "Cambiar a Windows", @@ -8347,6 +8350,83 @@ "191fa21f1cfda1ef": "El host rechazó el inicio de sesión de este dispositivo. Vuelve a emparejar esta dirección con Añadir ruta.", "219bc3612d646a01": "Quitar ruta", "b2877341429675aa": "vía {route}", + "537e7cf4df7a0af1": "Este navegador", + "601e0c9e6a45a54f": "Ajustar el mapa a la vista", + "feec58f6653f5673": "Cómo leer las líneas", + "e459bd5c53a993e2": "Ruta en uso", + "46e0a0c6ff391521": "En uso", + "1151e8a9fb7bdfcf": "En espera", + "a322337b6655de2a": "Sin usar", + "e31c7e76ef900ef4": "Inicio de sesión rechazado", + "235b3e270162f18b": "Vínculo, más grueso cuanto más acceso", + "c326a7e66bab5da0": "Tus entornos", + "86222507d918084b": "Alcanzadas mediante un vínculo", + "aa34f7bc5aaf6bb0": "Mapa de tus máquinas", + "3b61cc529ae01681": "Las flechas mueven entre máquinas. Intro abre los detalles de una máquina, con sus rutas y vínculos. Tab desde un entorno lleva a su botón de vincular. Más y menos hacen zoom, cero ajusta el mapa.", + "753b4a8ec5521c98": "Vínculo de {source} a {target}: {summary}", + "bb6a74a47a3852c7": "Caducado", + "3076117d81a9c1c0": "No responde", + "96fdb2fd529b1fbb": "Con errores", + "8971602c42718d72": "Accesible", + "1b256867b95ee022": "{days, plural, one {Caduca en {days} día} other {Caduca en {days} días}}", + "aae31cf2017dab5b": "Pública", + "19f6a3505837907d": "{access}. {reachable} de {count} accesibles", + "325f85fe7ade4efd": "De {first} a {last}, {count} máquinas vinculadas desde {source}. {summary}", + "35b783cfc817cb6f": "Contraer estas máquinas", + "b8f2d917d3a592df": "Mostrar cada máquina en el mapa", + "b0d81579d80fb94a": "conocida solo por un vínculo", + "2d3dc930fd1cdd55": "desde {source}: {summary}", + "911bc3bcde1aba3b": "{count, plural, one {# vínculo entrante} other {# vínculos entrantes}}", + "0fecb34fd1ae531f": "{label}, en tu cuenta de T3 Connect, no añadida a esta app. {status}", + "930f9e01fc4591b4": "Desactivado", + "4a84ad9b7f8e4909": "Cargando vínculos…", + "9c88c8e716354091": "No se pudieron cargar los vínculos", + "f9733c7b64c6f5d9": "Entornos vinculados está desactivado", + "ba30444f6d79cbdd": "Vínculos no legibles desde aquí", + "6a34b35812bb4ad0": "{count, plural, =0 {Sin vínculos salientes} one {# vínculo saliente} other {# vínculos salientes}}", + "5d252c8bbc3b24d0": "{status}. Vínculos desconocidos", + "ec2c609c028d63b4": "Vincular {label} con otra máquina", + "0a72d33781010657": "No se puede vincular con esto", + "4f10f6354f38106e": "Renovar el vínculo con {target}. No hace falta código de emparejamiento", + "5a25bfd7c3a8e4b4": "Vincular con {target}. No hace falta código de emparejamiento", + "b4b893b9c210e0ba": "Renovar el vínculo con {target}. Necesita un código de emparejamiento de esa máquina", + "052c3f87704b216d": "Vincular con {target}. Necesita un código de emparejamiento de esa máquina", + "e6b05c7e6ef4fef7": "Suelta sobre una máquina para vincular {source} con ella", + "7f045c3477f783cc": "{count, plural, one {# vínculo requiere atención.} other {# vínculos requieren atención.}}", + "d53ada50331e6041": "{machines, plural, one {# máquina} other {# máquinas}}, {links, plural, =0 {sin vínculos} one {# vínculo} other {# vínculos}}", + "706ac721bf99036c": "{machines, plural, one {# máquina} other {# máquinas}}", + "61287d7320b20cad": "Selecciona una máquina para gestionarla. Para vincular dos máquinas, arrastra el signo más de un entorno hasta otra máquina, o púlsalo para elegir una.", + "743b93767ec7ebf8": "Selecciona una máquina para gestionarla.", + "718e9f7ff8f48497": "Un vínculo llega a una máquina y termina ahí. No continúa hacia las máquinas con las que esa está vinculada.", + "3e8441af6148878f": "Caduca el {date}", + "786d62572ebcebdf": "{count, plural, one {# máquina vinculada} other {# máquinas vinculadas}} desde {source}, {access}, {reachable} accesibles", + "166aac696c3ec460": "Contraer en el mapa", + "069d8ba658617f30": "Mostrar cada una en el mapa", + "eefe994332120d82": "Vincular", + "9aca4025e20bef31": "Conectado a {connected} de {total} entornos", + "7f3ea6eba251a165": "Cada línea que sale de aquí es una ruta guardada hacia un entorno. El mapa muestra los vínculos de los entornos a los que esta app está conectada; uno al que no llega puede tener vínculos que no se dibujan.", + "398cee23ca4dabec": "{count, plural, =0 {Ninguna máquina conocida vincula aquí} one {Vinculada desde # máquina} other {Vinculada desde # máquinas}}", + "4492f856b6539118": "{label} está en tu cuenta de T3 Connect, pero no se ha añadido a esta app. Añádela para conectarte y ver los vínculos que tiene.", + "da2990354cbe0fab": "Conocida solo por un vínculo", + "5d46435186f86deb": "Esta app no está conectada a {label}, así que no se muestran los vínculos que tenga con otras máquinas.", + "b943528e12e44252": "Esta app no está conectada a {label} en este momento, así que no se muestran los vínculos que tenga con otras máquinas.", + "f0fa4a3c6960cb17": "Entornos vinculados está desactivado en {label}. Actívalo en sus Ajustes, en Experimentos, para vincular desde ahí.", + "eb3226bab4946cfa": "Esta app no tiene permiso para leer los vínculos de {label}.", + "59bb2a50641eb2a9": "No se pudieron cargar los vínculos de {label}: {error}", + "58cb9c075da185fb": "Cargando entornos vinculados…", + "126e2b7a117f01d5": "{count, plural, =0 {No vincula con ninguna máquina} one {Vincula con # máquina} other {Vincula con # máquinas}}", + "285d95a8e5ad0ec5": "vincula con", + "57f38a04b1e5c033": "Olvidando…", + "20ffe8337f8f30ba": "Olvidar", + "1f221fe54654ed13": "Acceso", + "8b0cd4f77cc74c37": "Estado", + "33386c89f3b07fea": "Caducado. Vuelve a vincularlo con un código de emparejamiento nuevo.", + "13d91e967cd9065c": "No responde en este momento.", + "42e613ac8acac777": "{days, plural, one {Caduca en {days} día. Vuelve a vincularlo para renovarlo.} other {Caduca en {days} días. Vuelve a vincularlo para renovarlo.}}", + "0990edee7035bcfe": "Caduca", + "1c161c630d28d225": "Direcciones", + "7ee376c7db73ab57": "Vinculado", + "e9f7a62ecd609a46": "Último contacto", "70bae47e93a2f207": "Mostrar error completo", "e4099af6d85770ff": "\"{font}\" no es monoespaciada", "a8448493d83279e2": "El código y la terminal necesitan una fuente de ancho fijo, así que se mantuvo la fuente actual.", @@ -8684,21 +8764,14 @@ "18b1d4d42b945b34": "Máquinas", "03860d65c4052ab5": "Comprobando qué máquinas ya están vinculadas…", "4cea6be0fe6be16f": "No se pudieron cargar los entornos vinculados", - "58cb9c075da185fb": "Cargando entornos vinculados…", "25b74062dc03079e": "No hay entornos vinculados", "6698127fcc912f23": "Vincula otra máquina que ejecute T3 Code, como un VPS, para que los agentes de aquí puedan iniciar y controlar hilos allí.", - "ad5ed0ce61b966eb": "¿Olvidar {label}? Los agentes de aquí dejarán de trabajar allí. Revoca \"T3 Code · …\" en Compartir y acceso de {label} para cerrar también la sesión allí.", - "81c9796bf61b306a": "No se pudo olvidar el vínculo", - "33386c89f3b07fea": "Caducado. Vuelve a vincularlo con un código de emparejamiento nuevo.", - "13d91e967cd9065c": "No responde en este momento.", - "42e613ac8acac777": "{days, plural, one {Caduca en {days} día. Vuelve a vincularlo para renovarlo.} other {Caduca en {days} días. Vuelve a vincularlo para renovarlo.}}", - "8971602c42718d72": "Accesible", - "57f38a04b1e5c033": "Olvidando…", - "20ffe8337f8f30ba": "Olvidar", "e1789f863205ad5a": "No se pudo vincular el entorno", "40cde51afa218290": "{label} vinculado", - "eefe994332120d82": "Vincular", + "64ac3d1579ca9f5b": "Vincular {source} con {target}", "fb71127e5746a6bc": "Desde Compartir y acceso allí, o t3 pair", + "ad5ed0ce61b966eb": "¿Olvidar {label}? Los agentes de aquí dejarán de trabajar allí. Revoca \"T3 Code · …\" en Compartir y acceso de {label} para cerrar también la sesión allí.", + "81c9796bf61b306a": "No se pudo olvidar el vínculo", "130e51beb6cf5aad": "Vincular un entorno", "122c3e355699e69d": "Así los agentes de aquí podrán iniciar hilos allí, enviarles mensajes y esperarlos. Aparece en Clientes autorizados, en Compartir y acceso de ese entorno, donde se puede revocar.", "dc9a0b68d101e904": "Ya está vinculado. Vincularlo de nuevo lo renueva con el acceso que elijas.", @@ -9384,7 +9457,6 @@ "e3349eb2353ee27c": "La aprobación de nuevos dispositivos está desactivada, así que un dispositivo revocado con sesión iniciada en tu cuenta de T3 Connect puede volver a conectarse por sí solo.", "080160002915c666": "Requerir aprobación para dispositivos nuevos", "73dd0f86f5363431": "El dispositivo tiene que aprobarse aquí antes de poder volver a conectarse.", - "930f9e01fc4591b4": "Desactivado", "6c7762bd72cea808": "Reconectando: {error}", "6cced6a88a19f1f2": "Reconectando", "8cbb63fdff9fde72": "Falló la conexión: {error}", diff --git a/apps/web/src/i18n/translations/fr.json b/apps/web/src/i18n/translations/fr.json index b9166940ccf66..e9192b65d2287 100644 --- a/apps/web/src/i18n/translations/fr.json +++ b/apps/web/src/i18n/translations/fr.json @@ -8047,6 +8047,9 @@ "d087da5017f20fa2": "Aucun environnement sélectionné", "cb553d31c9d1b1c7": "Connectez un environnement pour voir ses paramètres et ses accès.", "9a84dc0e80037e05": "Cette app", + "3d96310c2214fe2d": "Afficher les environnements en", + "41e0e5e03e07db42": "Carte", + "3a8adb207fb5e078": "Liste", "493685e264877b13": "Accès affichés pour", "5b2287f7b10cfa2f": "Hors ligne", "03f150efa96ec728": "Passer à Windows", @@ -8348,6 +8351,83 @@ "191fa21f1cfda1ef": "L’hôte a refusé la connexion de cet appareil. Appairez à nouveau cette adresse avec Ajouter une route.", "219bc3612d646a01": "Supprimer la route", "b2877341429675aa": "via {route}", + "537e7cf4df7a0af1": "Ce navigateur", + "601e0c9e6a45a54f": "Ajuster la carte à la vue", + "feec58f6653f5673": "Comment lire les lignes", + "e459bd5c53a993e2": "Route utilisée", + "46e0a0c6ff391521": "Utilisée", + "1151e8a9fb7bdfcf": "En attente", + "a322337b6655de2a": "Non utilisée", + "e31c7e76ef900ef4": "Connexion refusée", + "235b3e270162f18b": "Association, plus épaisse avec plus d’accès", + "c326a7e66bab5da0": "Vos environnements", + "86222507d918084b": "Atteintes par une association", + "aa34f7bc5aaf6bb0": "Carte de vos machines", + "3b61cc529ae01681": "Les flèches passent d’une machine à l’autre. Entrée ouvre les détails d’une machine, avec ses routes et ses associations. Tab depuis un environnement mène à son bouton d’association. Plus et moins zooment, zéro ajuste la carte.", + "753b4a8ec5521c98": "Association de {source} vers {target} : {summary}", + "bb6a74a47a3852c7": "Expirée", + "3076117d81a9c1c0": "Ne répond pas", + "96fdb2fd529b1fbb": "En échec", + "8971602c42718d72": "Joignable", + "1b256867b95ee022": "{days, plural, one {Expire dans {days} jour} other {Expire dans {days} jours}}", + "aae31cf2017dab5b": "Publique", + "19f6a3505837907d": "{access}. {reachable} sur {count} joignables", + "325f85fe7ade4efd": "De {first} à {last}, {count} machines associées depuis {source}. {summary}", + "35b783cfc817cb6f": "Replier ces machines", + "b8f2d917d3a592df": "Afficher chaque machine sur la carte", + "b0d81579d80fb94a": "connue uniquement par une association", + "2d3dc930fd1cdd55": "depuis {source} : {summary}", + "911bc3bcde1aba3b": "{count, plural, one {# association entrante} other {# associations entrantes}}", + "0fecb34fd1ae531f": "{label}, sur votre compte T3 Connect, non ajoutée à cette app. {status}", + "930f9e01fc4591b4": "Éteint", + "4a84ad9b7f8e4909": "Chargement des associations…", + "9c88c8e716354091": "Impossible de charger les associations", + "f9733c7b64c6f5d9": "Environnements associés est désactivé", + "ba30444f6d79cbdd": "Associations illisibles d’ici", + "6a34b35812bb4ad0": "{count, plural, =0 {Aucune association sortante} one {# association sortante} other {# associations sortantes}}", + "5d252c8bbc3b24d0": "{status}. Associations inconnues", + "ec2c609c028d63b4": "Associer {label} à une autre machine", + "0a72d33781010657": "Association impossible avec cet élément", + "4f10f6354f38106e": "Renouveler l’association avec {target}. Aucun code d’appairage requis", + "5a25bfd7c3a8e4b4": "Associer à {target}. Aucun code d’appairage requis", + "b4b893b9c210e0ba": "Renouveler l’association avec {target}. Nécessite un code d’appairage de cette machine", + "052c3f87704b216d": "Associer à {target}. Nécessite un code d’appairage de cette machine", + "e6b05c7e6ef4fef7": "Déposez sur une machine pour y associer {source}", + "7f045c3477f783cc": "{count, plural, one {# association demande votre attention.} other {# associations demandent votre attention.}}", + "d53ada50331e6041": "{machines, plural, one {# machine} other {# machines}}, {links, plural, =0 {aucune association} one {# association} other {# associations}}", + "706ac721bf99036c": "{machines, plural, one {# machine} other {# machines}}", + "61287d7320b20cad": "Sélectionnez une machine pour la gérer. Pour associer deux machines, faites glisser le plus d’un environnement sur une autre machine, ou appuyez dessus pour en choisir une.", + "743b93767ec7ebf8": "Sélectionnez une machine pour la gérer.", + "718e9f7ff8f48497": "Une association atteint une machine et s’arrête là. Elle ne se prolonge pas vers les machines auxquelles celle-ci est associée.", + "3e8441af6148878f": "Expire le {date}", + "786d62572ebcebdf": "{count, plural, one {# machine associée} other {# machines associées}} depuis {source}, {access}, {reachable} joignables", + "166aac696c3ec460": "Replier sur la carte", + "069d8ba658617f30": "Afficher chacune sur la carte", + "eefe994332120d82": "Associer", + "9aca4025e20bef31": "Connecté à {connected} environnements sur {total}", + "7f3ea6eba251a165": "Chaque ligne partant d’ici est une route enregistrée vers un environnement. La carte montre les associations des environnements auxquels cette app est connectée ; un environnement injoignable peut avoir des associations qui ne sont pas dessinées.", + "398cee23ca4dabec": "{count, plural, =0 {Aucune machine connue n’est associée ici} one {Associé depuis # machine} other {Associé depuis # machines}}", + "4492f856b6539118": "{label} est sur votre compte T3 Connect mais n’est pas ajoutée à cette app. Ajoutez-la pour vous connecter et voir ses associations.", + "da2990354cbe0fab": "Connue uniquement par une association", + "5d46435186f86deb": "Cette app n’est pas connectée à {label} ; ses éventuelles associations vers d’autres machines ne sont donc pas affichées.", + "b943528e12e44252": "Cette app n’est pas connectée à {label} pour le moment ; ses éventuelles associations vers d’autres machines ne sont donc pas affichées.", + "f0fa4a3c6960cb17": "Environnements associés est désactivé sur {label}. Activez-le dans ses Réglages, sous Labs, pour associer depuis cette machine.", + "eb3226bab4946cfa": "Cette app n’est pas autorisée à lire les associations de {label}.", + "59bb2a50641eb2a9": "Impossible de charger les associations de {label} : {error}", + "58cb9c075da185fb": "Chargement des environnements associés…", + "126e2b7a117f01d5": "{count, plural, =0 {Associé à aucune machine} one {Associé à # machine} other {Associé à # machines}}", + "285d95a8e5ad0ec5": "est associé à", + "57f38a04b1e5c033": "Oubli en cours…", + "20ffe8337f8f30ba": "Oublier", + "1f221fe54654ed13": "Accès", + "8b0cd4f77cc74c37": "État", + "33386c89f3b07fea": "Expirée. Associez-la à nouveau avec un nouveau code d’appairage.", + "13d91e967cd9065c": "Ne répond pas pour le moment.", + "42e613ac8acac777": "{days, plural, one {Expire dans {days} jour. Associez-la à nouveau pour la renouveler.} other {Expire dans {days} jours. Associez-la à nouveau pour la renouveler.}}", + "0990edee7035bcfe": "Expire", + "1c161c630d28d225": "Adresses", + "7ee376c7db73ab57": "Associé", + "e9f7a62ecd609a46": "Dernier contact", "70bae47e93a2f207": "Afficher l’erreur complète", "e4099af6d85770ff": "« {font} » n’est pas à chasse fixe", "a8448493d83279e2": "Le code et le terminal nécessitent une police à chasse fixe, la police actuelle a donc été conservée.", @@ -8686,21 +8766,14 @@ "18b1d4d42b945b34": "Machines", "03860d65c4052ab5": "Vérification des machines déjà associées…", "4cea6be0fe6be16f": "Impossible de charger les environnements associés", - "58cb9c075da185fb": "Chargement des environnements associés…", "25b74062dc03079e": "Aucun environnement associé", "6698127fcc912f23": "Associez une autre machine qui exécute T3 Code, comme un VPS, pour que les agents d’ici puissent y lancer et piloter des fils.", - "ad5ed0ce61b966eb": "Oublier {label} ? Les agents d’ici cessent d’y travailler. Révoquez « T3 Code · … » dans Partage et accès sur {label} pour y fermer aussi la session.", - "81c9796bf61b306a": "Impossible d’oublier l’association", - "33386c89f3b07fea": "Expirée. Associez-la à nouveau avec un nouveau code d’appairage.", - "13d91e967cd9065c": "Ne répond pas pour le moment.", - "42e613ac8acac777": "{days, plural, one {Expire dans {days} jour. Associez-la à nouveau pour la renouveler.} other {Expire dans {days} jours. Associez-la à nouveau pour la renouveler.}}", - "8971602c42718d72": "Joignable", - "57f38a04b1e5c033": "Oubli en cours…", - "20ffe8337f8f30ba": "Oublier", "e1789f863205ad5a": "Impossible d’associer l’environnement", "40cde51afa218290": "{label} associé", - "eefe994332120d82": "Associer", + "64ac3d1579ca9f5b": "Associer {source} à {target}", "fb71127e5746a6bc": "Depuis Partage et accès sur cette machine, ou t3 pair", + "ad5ed0ce61b966eb": "Oublier {label} ? Les agents d’ici cessent d’y travailler. Révoquez « T3 Code · … » dans Partage et accès sur {label} pour y fermer aussi la session.", + "81c9796bf61b306a": "Impossible d’oublier l’association", "130e51beb6cf5aad": "Associer un environnement", "122c3e355699e69d": "Les agents d’ici pourront alors lancer des fils là-bas, leur envoyer des messages et les attendre. L’association apparaît sous Clients autorisés dans Partage et accès de cet environnement, où elle peut être révoquée.", "dc9a0b68d101e904": "Déjà associé. Associer à nouveau renouvelle l’association avec l’accès que vous choisissez.", @@ -9386,7 +9459,6 @@ "e3349eb2353ee27c": "L’approbation des nouveaux appareils est désactivée : un appareil révoqué connecté à votre compte T3 Connect peut donc se reconnecter de lui-même.", "080160002915c666": "Exiger l’approbation des nouveaux appareils", "73dd0f86f5363431": "L’appareil doit être approuvé ici avant de pouvoir se reconnecter.", - "930f9e01fc4591b4": "Éteint", "6c7762bd72cea808": "Reconnexion : {error}", "6cced6a88a19f1f2": "Reconnexion", "8cbb63fdff9fde72": "Échec de la connexion : {error}", diff --git a/apps/web/src/i18n/translations/ja.json b/apps/web/src/i18n/translations/ja.json index da6a34749df88..b12035d52d118 100644 --- a/apps/web/src/i18n/translations/ja.json +++ b/apps/web/src/i18n/translations/ja.json @@ -8007,6 +8007,9 @@ "d087da5017f20fa2": "環境が選択されていません", "cb553d31c9d1b1c7": "設定とアクセスを表示するには、環境を接続してください。", "9a84dc0e80037e05": "このアプリ", + "3d96310c2214fe2d": "環境の表示形式", + "41e0e5e03e07db42": "マップ", + "3a8adb207fb5e078": "リスト", "493685e264877b13": "アクセスを表示する対象", "5b2287f7b10cfa2f": "オフライン", "03f150efa96ec728": "Windows に切り替え", @@ -8305,6 +8308,83 @@ "191fa21f1cfda1ef": "ホストがこのデバイスのサインインを拒否しました。「ルートを追加」でこのアドレスを再度ペアリングしてください。", "219bc3612d646a01": "ルートを削除", "b2877341429675aa": "{route} 経由", + "537e7cf4df7a0af1": "このブラウザ", + "601e0c9e6a45a54f": "マップ全体を表示", + "feec58f6653f5673": "線の見方", + "e459bd5c53a993e2": "使用中のルート", + "46e0a0c6ff391521": "使用中", + "1151e8a9fb7bdfcf": "待機中", + "a322337b6655de2a": "未使用", + "e31c7e76ef900ef4": "サインインが拒否されました", + "235b3e270162f18b": "リンク(アクセスが広いほど太い)", + "c326a7e66bab5da0": "あなたの環境", + "86222507d918084b": "リンク経由で到達", + "aa34f7bc5aaf6bb0": "マシンのマップ", + "3b61cc529ae01681": "矢印キーでマシン間を移動します。Enter でマシンの詳細(ルートとリンク)を開きます。環境から Tab でリンクボタンに移動します。プラスとマイナスでズーム、ゼロでマップ全体を表示します。", + "753b4a8ec5521c98": "{source} から {target} へのリンク: {summary}", + "bb6a74a47a3852c7": "期限切れ", + "3076117d81a9c1c0": "応答なし", + "96fdb2fd529b1fbb": "失敗中", + "8971602c42718d72": "到達可能", + "1b256867b95ee022": "{days, plural, other {{days} 日後に期限切れ}}", + "aae31cf2017dab5b": "パブリック", + "19f6a3505837907d": "{access}。{count} 台中 {reachable} 台が到達可能", + "325f85fe7ade4efd": "{first} から {last}、{source} からリンクされた {count} 台のマシン。{summary}", + "35b783cfc817cb6f": "これらのマシンを折りたたむ", + "b8f2d917d3a592df": "各マシンをマップに表示", + "b0d81579d80fb94a": "リンク経由でのみ把握", + "2d3dc930fd1cdd55": "{source} から: {summary}", + "911bc3bcde1aba3b": "{count, plural, other {内向きのリンク # 件}}", + "0fecb34fd1ae531f": "{label}、T3 Connect アカウントにあり、このアプリには未追加。{status}", + "930f9e01fc4591b4": "オフ", + "4a84ad9b7f8e4909": "リンクを読み込んでいます…", + "9c88c8e716354091": "リンクを読み込めませんでした", + "f9733c7b64c6f5d9": "リンクされた環境はオフです", + "ba30444f6d79cbdd": "ここからはリンクを読み取れません", + "6a34b35812bb4ad0": "{count, plural, =0 {外向きのリンクなし} other {外向きのリンク # 件}}", + "5d252c8bbc3b24d0": "{status}。リンクは不明", + "ec2c609c028d63b4": "{label} を別のマシンにリンク", + "0a72d33781010657": "これにはリンクできません", + "4f10f6354f38106e": "{target} へのリンクを更新。ペアリングコードは不要", + "5a25bfd7c3a8e4b4": "{target} にリンク。ペアリングコードは不要", + "b4b893b9c210e0ba": "{target} へのリンクを更新。そのマシンのペアリングコードが必要", + "052c3f87704b216d": "{target} にリンク。そのマシンのペアリングコードが必要", + "e6b05c7e6ef4fef7": "マシンにドロップして {source} をリンク", + "7f045c3477f783cc": "{count, plural, other {# 件のリンクに対応が必要です。}}", + "d53ada50331e6041": "{machines, plural, other {マシン # 台}}、{links, plural, =0 {リンクなし} other {リンク # 件}}", + "706ac721bf99036c": "{machines, plural, other {# 台のマシン}}", + "61287d7320b20cad": "マシンを選択すると管理できます。2 台のマシンをリンクするには、環境のプラスを別のマシンにドラッグするか、押して選択します。", + "743b93767ec7ebf8": "マシンを選択すると管理できます。", + "718e9f7ff8f48497": "リンクは 1 台のマシンに届き、そこで止まります。そのマシンがリンクしている先のマシンには及びません。", + "3e8441af6148878f": "{date} に期限切れ", + "786d62572ebcebdf": "{count, plural, other {{source} からリンクされた # 台のマシン}}、{access}、{reachable} 台が到達可能", + "166aac696c3ec460": "マップ上で折りたたむ", + "069d8ba658617f30": "それぞれをマップに表示", + "eefe994332120d82": "リンク", + "9aca4025e20bef31": "{total} 個中 {connected} 個の環境に接続済み", + "7f3ea6eba251a165": "ここから出る線はそれぞれ、環境への保存済みルートです。マップには、このアプリが接続している環境のリンクが表示されます。到達できない環境には、描かれていないリンクがあるかもしれません。", + "398cee23ca4dabec": "{count, plural, =0 {ここにリンクしている既知のマシンはありません} other {# 台のマシンからリンク}}", + "4492f856b6539118": "{label} は T3 Connect アカウントにありますが、このアプリには追加されていません。追加すると接続でき、そのリンクも表示されます。", + "da2990354cbe0fab": "リンク経由でのみ把握", + "5d46435186f86deb": "このアプリは {label} に接続していないため、{label} が他のマシンに持つリンクは表示されません。", + "b943528e12e44252": "このアプリは現在 {label} に接続していないため、{label} が他のマシンに持つリンクは表示されません。", + "f0fa4a3c6960cb17": "{label} ではリンクされた環境がオフです。{label} の設定の「試験的機能」でオンにすると、そこからリンクできます。", + "eb3226bab4946cfa": "このアプリには {label} のリンクを読み取る権限がありません。", + "59bb2a50641eb2a9": "{label} のリンクを読み込めませんでした: {error}", + "58cb9c075da185fb": "リンクされた環境を読み込んでいます…", + "126e2b7a117f01d5": "{count, plural, =0 {リンク先なし} other {リンク先 # 台}}", + "285d95a8e5ad0ec5": "→", + "57f38a04b1e5c033": "削除中…", + "20ffe8337f8f30ba": "削除", + "1f221fe54654ed13": "アクセス権", + "8b0cd4f77cc74c37": "状態", + "33386c89f3b07fea": "期限切れです。新しいペアリングコードで再度リンクしてください。", + "13d91e967cd9065c": "現在応答していません。", + "42e613ac8acac777": "{days, plural, other {あと {days} 日で期限切れになります。更新するには再度リンクしてください。}}", + "0990edee7035bcfe": "有効期限", + "1c161c630d28d225": "アドレス", + "7ee376c7db73ab57": "リンク日時", + "e9f7a62ecd609a46": "最終到達", "70bae47e93a2f207": "エラー全体を表示", "e4099af6d85770ff": "「{font}」は等幅フォントではありません", "a8448493d83279e2": "コードとターミナルには固定幅フォントが必要なため、現在のフォントを維持しました。", @@ -8642,21 +8722,14 @@ "18b1d4d42b945b34": "マシン", "03860d65c4052ab5": "リンク済みのマシンを確認しています…", "4cea6be0fe6be16f": "リンクされた環境を読み込めませんでした", - "58cb9c075da185fb": "リンクされた環境を読み込んでいます…", "25b74062dc03079e": "リンクされた環境はありません", "6698127fcc912f23": "VPS など T3 Code を実行している別のマシンをリンクすると、ここのエージェントがそこでスレッドを起動して操作できます。", - "ad5ed0ce61b966eb": "{label} を削除しますか?ここのエージェントはそこで作業できなくなります。そこでのセッションも終了するには、{label} の「共有とアクセス」で \"T3 Code · …\" を取り消してください。", - "81c9796bf61b306a": "リンクを削除できませんでした", - "33386c89f3b07fea": "期限切れです。新しいペアリングコードで再度リンクしてください。", - "13d91e967cd9065c": "現在応答していません。", - "42e613ac8acac777": "{days, plural, other {あと {days} 日で期限切れになります。更新するには再度リンクしてください。}}", - "8971602c42718d72": "到達可能", - "57f38a04b1e5c033": "削除中…", - "20ffe8337f8f30ba": "削除", "e1789f863205ad5a": "環境をリンクできませんでした", "40cde51afa218290": "{label} をリンクしました", - "eefe994332120d82": "リンク", + "64ac3d1579ca9f5b": "{source} を {target} にリンク", "fb71127e5746a6bc": "リンク先の「共有とアクセス」、または t3 pair から", + "ad5ed0ce61b966eb": "{label} を削除しますか?ここのエージェントはそこで作業できなくなります。そこでのセッションも終了するには、{label} の「共有とアクセス」で \"T3 Code · …\" を取り消してください。", + "81c9796bf61b306a": "リンクを削除できませんでした", "130e51beb6cf5aad": "環境をリンク", "122c3e355699e69d": "これで、ここのエージェントがそこでスレッドを起動し、メッセージを送り、完了を待てるようになります。リンクはその環境の「共有とアクセス」の「承認済みクライアント」に表示され、そこで取り消せます。", "dc9a0b68d101e904": "すでにリンクされています。再度リンクすると、選択したアクセス権で更新されます。", @@ -9341,7 +9414,6 @@ "e3349eb2353ee27c": "新しいデバイスの承認がオフになっているため、T3 Connect アカウントにサインインしている取り消し済みのデバイスは自動的に再接続できます。", "080160002915c666": "新しいデバイスに承認を要求", "73dd0f86f5363431": "再接続する前に、ここでデバイスを承認する必要があります。", - "930f9e01fc4591b4": "オフ", "6c7762bd72cea808": "再接続中: {error}", "6cced6a88a19f1f2": "再接続中", "8cbb63fdff9fde72": "接続に失敗しました: {error}", diff --git a/apps/web/src/i18n/translations/ko.json b/apps/web/src/i18n/translations/ko.json index f38e81a9b9398..9127f380671e0 100644 --- a/apps/web/src/i18n/translations/ko.json +++ b/apps/web/src/i18n/translations/ko.json @@ -8009,6 +8009,9 @@ "d087da5017f20fa2": "선택된 환경 없음", "cb553d31c9d1b1c7": "설정과 액세스를 보려면 환경을 연결하세요.", "9a84dc0e80037e05": "이 앱", + "3d96310c2214fe2d": "환경 표시 방식", + "41e0e5e03e07db42": "지도", + "3a8adb207fb5e078": "목록", "493685e264877b13": "액세스 표시 대상", "5b2287f7b10cfa2f": "오프라인", "03f150efa96ec728": "Windows로 전환", @@ -8308,6 +8311,83 @@ "191fa21f1cfda1ef": "호스트가 이 기기의 로그인을 거부했습니다. 경로 추가로 이 주소를 다시 페어링하세요.", "219bc3612d646a01": "경로 제거", "b2877341429675aa": "{route} 경유", + "537e7cf4df7a0af1": "이 브라우저", + "601e0c9e6a45a54f": "지도를 화면에 맞추기", + "feec58f6653f5673": "선 읽는 법", + "e459bd5c53a993e2": "사용 중인 경로", + "46e0a0c6ff391521": "사용 중", + "1151e8a9fb7bdfcf": "대기", + "a322337b6655de2a": "사용 안 함", + "e31c7e76ef900ef4": "로그인 거부됨", + "235b3e270162f18b": "링크, 권한이 클수록 굵게", + "c326a7e66bab5da0": "내 환경", + "86222507d918084b": "링크를 통해 도달", + "aa34f7bc5aaf6bb0": "내 머신 지도", + "3b61cc529ae01681": "화살표 키로 머신 사이를 이동합니다. Enter는 머신의 세부 정보와 경로, 링크를 엽니다. 환경에서 Tab을 누르면 연결 버튼으로 이동합니다. 더하기와 빼기로 확대/축소하고, 0으로 지도를 맞춥니다.", + "753b4a8ec5521c98": "{source}에서 {target}(으)로의 링크: {summary}", + "bb6a74a47a3852c7": "만료됨", + "3076117d81a9c1c0": "응답 없음", + "96fdb2fd529b1fbb": "실패 중", + "8971602c42718d72": "연결 가능", + "1b256867b95ee022": "{days, plural, other {{days}일 후 만료}}", + "aae31cf2017dab5b": "공개", + "19f6a3505837907d": "{access}. {count}대 중 {reachable}대 연결 가능", + "325f85fe7ade4efd": "{first}부터 {last}까지, {source}에서 연결된 머신 {count}대. {summary}", + "35b783cfc817cb6f": "이 머신들 접기", + "b8f2d917d3a592df": "각 머신을 지도에 표시", + "b0d81579d80fb94a": "링크를 통해서만 알려짐", + "2d3dc930fd1cdd55": "{source}에서: {summary}", + "911bc3bcde1aba3b": "{count, plural, other {들어오는 링크 #개}}", + "0fecb34fd1ae531f": "{label}, T3 Connect 계정에 있으며 이 앱에 추가되지 않음. {status}", + "930f9e01fc4591b4": "꺼짐", + "4a84ad9b7f8e4909": "링크 불러오는 중…", + "9c88c8e716354091": "링크를 불러올 수 없습니다", + "f9733c7b64c6f5d9": "연결된 환경이 꺼져 있음", + "ba30444f6d79cbdd": "여기서는 링크를 읽을 수 없음", + "6a34b35812bb4ad0": "{count, plural, =0 {나가는 링크 없음} other {나가는 링크 #개}}", + "5d252c8bbc3b24d0": "{status}. 링크 알 수 없음", + "ec2c609c028d63b4": "{label}을(를) 다른 머신에 연결", + "0a72d33781010657": "여기에는 연결할 수 없음", + "4f10f6354f38106e": "{target} 링크 갱신. 페어링 코드 필요 없음", + "5a25bfd7c3a8e4b4": "{target}에 연결. 페어링 코드 필요 없음", + "b4b893b9c210e0ba": "{target} 링크 갱신. 해당 머신의 페어링 코드 필요", + "052c3f87704b216d": "{target}에 연결. 해당 머신의 페어링 코드 필요", + "e6b05c7e6ef4fef7": "머신에 놓아 {source}을(를) 연결", + "7f045c3477f783cc": "{count, plural, other {링크 #개에 조치가 필요합니다.}}", + "d53ada50331e6041": "{machines, plural, other {머신 #대}}, {links, plural, =0 {링크 없음} other {링크 #개}}", + "706ac721bf99036c": "{machines, plural, other {머신 #대}}", + "61287d7320b20cad": "머신을 선택해 관리하세요. 두 머신을 연결하려면 환경의 더하기를 다른 머신으로 끌어다 놓거나, 눌러서 선택하세요.", + "743b93767ec7ebf8": "머신을 선택해 관리하세요.", + "718e9f7ff8f48497": "링크는 머신 한 대까지만 닿습니다. 그 머신이 링크한 다른 머신으로는 이어지지 않습니다.", + "3e8441af6148878f": "{date}에 만료", + "786d62572ebcebdf": "{count, plural, other {{source}에서 연결된 머신 #대}}, {access}, {reachable}대 연결 가능", + "166aac696c3ec460": "지도에서 접기", + "069d8ba658617f30": "각각 지도에 표시", + "eefe994332120d82": "연결", + "9aca4025e20bef31": "환경 {total}개 중 {connected}개에 연결됨", + "7f3ea6eba251a165": "여기서 나가는 각 선은 환경으로 가는 저장된 경로입니다. 지도에는 이 앱이 연결된 환경의 링크가 표시되며, 도달할 수 없는 환경에는 그려지지 않은 링크가 있을 수 있습니다.", + "398cee23ca4dabec": "{count, plural, =0 {여기로 링크한 알려진 머신 없음} other {머신 #대에서 링크됨}}", + "4492f856b6539118": "{label}은(는) T3 Connect 계정에 있지만 이 앱에 추가되지 않았습니다. 추가하면 연결하고 보유한 링크를 볼 수 있습니다.", + "da2990354cbe0fab": "링크를 통해서만 알려짐", + "5d46435186f86deb": "이 앱은 {label}에 연결되어 있지 않아, {label}이(가) 다른 머신에 가진 링크는 표시되지 않습니다.", + "b943528e12e44252": "이 앱은 지금 {label}에 연결되어 있지 않아, {label}이(가) 다른 머신에 가진 링크는 표시되지 않습니다.", + "f0fa4a3c6960cb17": "{label}에서 연결된 환경이 꺼져 있습니다. 거기서 링크하려면 해당 설정의 실험 기능에서 켜세요.", + "eb3226bab4946cfa": "이 앱은 {label}의 링크를 읽을 권한이 없습니다.", + "59bb2a50641eb2a9": "{label}의 링크를 불러올 수 없습니다: {error}", + "58cb9c075da185fb": "연결된 환경 불러오는 중…", + "126e2b7a117f01d5": "{count, plural, =0 {링크한 머신 없음} other {머신 #대에 링크}}", + "285d95a8e5ad0ec5": "→", + "57f38a04b1e5c033": "삭제 중…", + "20ffe8337f8f30ba": "삭제", + "1f221fe54654ed13": "액세스 권한", + "8b0cd4f77cc74c37": "상태", + "33386c89f3b07fea": "만료되었습니다. 새 페어링 코드로 다시 연결하세요.", + "13d91e967cd9065c": "지금 응답하지 않습니다.", + "42e613ac8acac777": "{days, plural, other {{days}일 후 만료됩니다. 갱신하려면 다시 연결하세요.}}", + "0990edee7035bcfe": "만료", + "1c161c630d28d225": "주소", + "7ee376c7db73ab57": "링크한 날짜", + "e9f7a62ecd609a46": "마지막 연결", "70bae47e93a2f207": "전체 오류 표시", "e4099af6d85770ff": "\"{font}\"은(는) 고정폭 글꼴이 아닙니다", "a8448493d83279e2": "코드와 터미널에는 고정폭 글꼴이 필요하므로 현재 글꼴을 유지했습니다.", @@ -8645,21 +8725,14 @@ "18b1d4d42b945b34": "머신", "03860d65c4052ab5": "이미 연결된 머신을 확인하는 중…", "4cea6be0fe6be16f": "연결된 환경을 불러올 수 없습니다", - "58cb9c075da185fb": "연결된 환경 불러오는 중…", "25b74062dc03079e": "연결된 환경 없음", "6698127fcc912f23": "VPS처럼 T3 Code를 실행하는 다른 머신을 연결하면 이곳의 에이전트가 그곳에서 스레드를 시작하고 조작할 수 있습니다.", - "ad5ed0ce61b966eb": "{label}을(를) 삭제할까요? 이곳의 에이전트가 그곳에서 더 이상 작업하지 않습니다. 그곳의 세션도 끝내려면 {label}의 공유 및 액세스에서 \"T3 Code · …\"를 취소하세요.", - "81c9796bf61b306a": "링크를 삭제할 수 없습니다", - "33386c89f3b07fea": "만료되었습니다. 새 페어링 코드로 다시 연결하세요.", - "13d91e967cd9065c": "지금 응답하지 않습니다.", - "42e613ac8acac777": "{days, plural, other {{days}일 후 만료됩니다. 갱신하려면 다시 연결하세요.}}", - "8971602c42718d72": "연결 가능", - "57f38a04b1e5c033": "삭제 중…", - "20ffe8337f8f30ba": "삭제", "e1789f863205ad5a": "환경을 연결할 수 없습니다", "40cde51afa218290": "{label} 연결됨", - "eefe994332120d82": "연결", + "64ac3d1579ca9f5b": "{source}을(를) {target}에 연결", "fb71127e5746a6bc": "그곳의 공유 및 액세스 또는 t3 pair에서", + "ad5ed0ce61b966eb": "{label}을(를) 삭제할까요? 이곳의 에이전트가 그곳에서 더 이상 작업하지 않습니다. 그곳의 세션도 끝내려면 {label}의 공유 및 액세스에서 \"T3 Code · …\"를 취소하세요.", + "81c9796bf61b306a": "링크를 삭제할 수 없습니다", "130e51beb6cf5aad": "환경 연결", "122c3e355699e69d": "그러면 이곳의 에이전트가 그곳에서 스레드를 시작하고, 메시지를 보내고, 기다릴 수 있습니다. 해당 환경의 공유 및 액세스에서 승인된 클라이언트에 표시되며 그곳에서 취소할 수 있습니다.", "dc9a0b68d101e904": "이미 연결되어 있습니다. 다시 연결하면 선택한 액세스 권한으로 갱신됩니다.", @@ -9344,7 +9417,6 @@ "e3349eb2353ee27c": "새 기기 승인이 꺼져 있으므로 T3 Connect 계정에 로그인한 취소된 기기가 스스로 다시 연결할 수 있습니다.", "080160002915c666": "새 기기 승인 필요", "73dd0f86f5363431": "기기가 다시 연결하려면 여기에서 승인을 받아야 합니다.", - "930f9e01fc4591b4": "꺼짐", "6c7762bd72cea808": "다시 연결 중: {error}", "6cced6a88a19f1f2": "다시 연결 중", "8cbb63fdff9fde72": "연결 실패: {error}", diff --git a/apps/web/src/i18n/translations/pt-BR.json b/apps/web/src/i18n/translations/pt-BR.json index 24ce6764ab312..91fed20a1f941 100644 --- a/apps/web/src/i18n/translations/pt-BR.json +++ b/apps/web/src/i18n/translations/pt-BR.json @@ -8046,6 +8046,9 @@ "d087da5017f20fa2": "Nenhum ambiente selecionado", "cb553d31c9d1b1c7": "Conecte um ambiente para ver as configurações e o acesso dele.", "9a84dc0e80037e05": "Este app", + "3d96310c2214fe2d": "Mostrar ambientes como", + "41e0e5e03e07db42": "Mapa", + "3a8adb207fb5e078": "Lista", "493685e264877b13": "Mostrando o acesso de", "5b2287f7b10cfa2f": "Offline", "03f150efa96ec728": "Mudar para o Windows", @@ -8347,6 +8350,83 @@ "191fa21f1cfda1ef": "O host recusou o login deste dispositivo. Pareie este endereço novamente com Adicionar rota.", "219bc3612d646a01": "Remover rota", "b2877341429675aa": "via {route}", + "537e7cf4df7a0af1": "Este navegador", + "601e0c9e6a45a54f": "Ajustar o mapa à tela", + "feec58f6653f5673": "Como ler as linhas", + "e459bd5c53a993e2": "Rota em uso", + "46e0a0c6ff391521": "Em uso", + "1151e8a9fb7bdfcf": "Em espera", + "a322337b6655de2a": "Sem uso", + "e31c7e76ef900ef4": "Login recusado", + "235b3e270162f18b": "Vínculo, mais grosso com mais acesso", + "c326a7e66bab5da0": "Seus ambientes", + "86222507d918084b": "Alcançadas por um vínculo", + "aa34f7bc5aaf6bb0": "Mapa das suas máquinas", + "3b61cc529ae01681": "As setas movem entre máquinas. Enter abre os detalhes de uma máquina, com suas rotas e vínculos. Tab a partir de um ambiente leva ao botão de vincular. Mais e menos dão zoom, zero ajusta o mapa.", + "753b4a8ec5521c98": "Vínculo de {source} para {target}: {summary}", + "bb6a74a47a3852c7": "Expirado", + "3076117d81a9c1c0": "Sem resposta", + "96fdb2fd529b1fbb": "Com falha", + "8971602c42718d72": "Acessível", + "1b256867b95ee022": "{days, plural, one {Expira em {days} dia} other {Expira em {days} dias}}", + "aae31cf2017dab5b": "Pública", + "19f6a3505837907d": "{access}. {reachable} de {count} acessíveis", + "325f85fe7ade4efd": "De {first} a {last}, {count} máquinas vinculadas a partir de {source}. {summary}", + "35b783cfc817cb6f": "Recolher estas máquinas", + "b8f2d917d3a592df": "Mostrar cada máquina no mapa", + "b0d81579d80fb94a": "conhecida apenas por um vínculo", + "2d3dc930fd1cdd55": "de {source}: {summary}", + "911bc3bcde1aba3b": "{count, plural, one {# vínculo de entrada} other {# vínculos de entrada}}", + "0fecb34fd1ae531f": "{label}, na sua conta do T3 Connect, não adicionada a este app. {status}", + "930f9e01fc4591b4": "Desligado", + "4a84ad9b7f8e4909": "Carregando vínculos…", + "9c88c8e716354091": "Não foi possível carregar os vínculos", + "f9733c7b64c6f5d9": "Ambientes vinculados está desativado", + "ba30444f6d79cbdd": "Vínculos não legíveis daqui", + "6a34b35812bb4ad0": "{count, plural, =0 {Sem vínculos de saída} one {# vínculo de saída} other {# vínculos de saída}}", + "5d252c8bbc3b24d0": "{status}. Vínculos desconhecidos", + "ec2c609c028d63b4": "Vincular {label} a outra máquina", + "0a72d33781010657": "Não é possível vincular a isto", + "4f10f6354f38106e": "Renovar o vínculo com {target}. Sem código de pareamento", + "5a25bfd7c3a8e4b4": "Vincular a {target}. Sem código de pareamento", + "b4b893b9c210e0ba": "Renovar o vínculo com {target}. Precisa de um código de pareamento dessa máquina", + "052c3f87704b216d": "Vincular a {target}. Precisa de um código de pareamento dessa máquina", + "e6b05c7e6ef4fef7": "Solte em uma máquina para vincular {source} a ela", + "7f045c3477f783cc": "{count, plural, one {# vínculo precisa de atenção.} other {# vínculos precisam de atenção.}}", + "d53ada50331e6041": "{machines, plural, one {# máquina} other {# máquinas}}, {links, plural, =0 {sem vínculos} one {# vínculo} other {# vínculos}}", + "706ac721bf99036c": "{machines, plural, one {# máquina} other {# máquinas}}", + "61287d7320b20cad": "Selecione uma máquina para gerenciá-la. Para vincular duas máquinas, arraste o sinal de mais de um ambiente até outra máquina, ou pressione-o para escolher uma.", + "743b93767ec7ebf8": "Selecione uma máquina para gerenciá-la.", + "718e9f7ff8f48497": "Um vínculo chega a uma máquina e termina ali. Ele não segue para as máquinas às quais ela está vinculada.", + "3e8441af6148878f": "Expira em {date}", + "786d62572ebcebdf": "{count, plural, one {# máquina vinculada} other {# máquinas vinculadas}} a partir de {source}, {access}, {reachable} acessíveis", + "166aac696c3ec460": "Recolher no mapa", + "069d8ba658617f30": "Mostrar cada uma no mapa", + "eefe994332120d82": "Vincular", + "9aca4025e20bef31": "Conectado a {connected} de {total} ambientes", + "7f3ea6eba251a165": "Cada linha que sai daqui é uma rota salva para um ambiente. O mapa mostra os vínculos dos ambientes aos quais este app está conectado; um que ele não alcança pode ter vínculos que não são desenhados.", + "398cee23ca4dabec": "{count, plural, =0 {Nenhuma máquina conhecida vincula aqui} one {Vinculada a partir de # máquina} other {Vinculada a partir de # máquinas}}", + "4492f856b6539118": "{label} está na sua conta do T3 Connect, mas não foi adicionada a este app. Adicione-a para conectar e ver os vínculos que ela tem.", + "da2990354cbe0fab": "Conhecida apenas por um vínculo", + "5d46435186f86deb": "Este app não está conectado a {label}, então os vínculos que ela tiver com outras máquinas não são mostrados.", + "b943528e12e44252": "Este app não está conectado a {label} no momento, então os vínculos que ela tiver com outras máquinas não são mostrados.", + "f0fa4a3c6960cb17": "Ambientes vinculados está desativado em {label}. Ative em Ajustes, em Labs, nessa máquina para vincular a partir dela.", + "eb3226bab4946cfa": "Este app não tem permissão para ler os vínculos de {label}.", + "59bb2a50641eb2a9": "Não foi possível carregar os vínculos de {label}: {error}", + "58cb9c075da185fb": "Carregando ambientes vinculados…", + "126e2b7a117f01d5": "{count, plural, =0 {Não vincula a nenhuma máquina} one {Vincula a # máquina} other {Vincula a # máquinas}}", + "285d95a8e5ad0ec5": "vincula a", + "57f38a04b1e5c033": "Esquecendo…", + "20ffe8337f8f30ba": "Esquecer", + "1f221fe54654ed13": "Acesso", + "8b0cd4f77cc74c37": "Status", + "33386c89f3b07fea": "Expirado. Vincule novamente com um novo código de pareamento.", + "13d91e967cd9065c": "Sem resposta no momento.", + "42e613ac8acac777": "{days, plural, one {Expira em {days} dia. Vincule novamente para renovar.} other {Expira em {days} dias. Vincule novamente para renovar.}}", + "0990edee7035bcfe": "Expira", + "1c161c630d28d225": "Endereços", + "7ee376c7db73ab57": "Vinculado", + "e9f7a62ecd609a46": "Último contato", "70bae47e93a2f207": "Mostrar erro completo", "e4099af6d85770ff": "\"{font}\" não é monoespaçada", "a8448493d83279e2": "O código e o terminal precisam de uma fonte de largura fixa, então a fonte atual foi mantida.", @@ -8685,21 +8765,14 @@ "18b1d4d42b945b34": "Máquinas", "03860d65c4052ab5": "Verificando quais máquinas já estão vinculadas…", "4cea6be0fe6be16f": "Não foi possível carregar os ambientes vinculados", - "58cb9c075da185fb": "Carregando ambientes vinculados…", "25b74062dc03079e": "Nenhum ambiente vinculado", "6698127fcc912f23": "Vincule outra máquina que rode o T3 Code, como uma VPS, para que os agentes daqui possam iniciar e conduzir threads lá.", - "ad5ed0ce61b966eb": "Esquecer {label}? Os agentes daqui deixam de funcionar lá. Revogue \"T3 Code · …\" em Compartilhamento e acesso de {label} para encerrar a sessão lá também.", - "81c9796bf61b306a": "Não foi possível esquecer o vínculo", - "33386c89f3b07fea": "Expirado. Vincule novamente com um novo código de pareamento.", - "13d91e967cd9065c": "Sem resposta no momento.", - "42e613ac8acac777": "{days, plural, one {Expira em {days} dia. Vincule novamente para renovar.} other {Expira em {days} dias. Vincule novamente para renovar.}}", - "8971602c42718d72": "Acessível", - "57f38a04b1e5c033": "Esquecendo…", - "20ffe8337f8f30ba": "Esquecer", "e1789f863205ad5a": "Não foi possível vincular o ambiente", "40cde51afa218290": "{label} vinculado", - "eefe994332120d82": "Vincular", + "64ac3d1579ca9f5b": "Vincular {source} a {target}", "fb71127e5746a6bc": "Em Compartilhamento e acesso de lá, ou t3 pair", + "ad5ed0ce61b966eb": "Esquecer {label}? Os agentes daqui deixam de funcionar lá. Revogue \"T3 Code · …\" em Compartilhamento e acesso de {label} para encerrar a sessão lá também.", + "81c9796bf61b306a": "Não foi possível esquecer o vínculo", "130e51beb6cf5aad": "Vincular um ambiente", "122c3e355699e69d": "Os agentes daqui poderão então iniciar threads lá, enviar mensagens e aguardá-las. Ele aparece em Clientes autorizados em Compartilhamento e acesso daquele ambiente, onde pode ser revogado.", "dc9a0b68d101e904": "Já vinculado. Vincular novamente renova o vínculo com o acesso escolhido.", @@ -9385,7 +9458,6 @@ "e3349eb2353ee27c": "A aprovação de novos dispositivos está desativada, então um dispositivo revogado conectado à sua conta T3 Connect pode se conectar novamente sozinho.", "080160002915c666": "Exigir aprovação para novos dispositivos", "73dd0f86f5363431": "O dispositivo precisa ser aprovado aqui antes de poder se conectar novamente.", - "930f9e01fc4591b4": "Desligado", "6c7762bd72cea808": "Reconectando: {error}", "6cced6a88a19f1f2": "Reconectando", "8cbb63fdff9fde72": "Falha na conexão: {error}", diff --git a/apps/web/src/i18n/translations/ru.json b/apps/web/src/i18n/translations/ru.json index a5f0c249e2ffc..8ab143c760858 100644 --- a/apps/web/src/i18n/translations/ru.json +++ b/apps/web/src/i18n/translations/ru.json @@ -8046,6 +8046,9 @@ "d087da5017f20fa2": "Окружение не выбрано", "cb553d31c9d1b1c7": "Подключите окружение, чтобы просматривать его настройки и доступ.", "9a84dc0e80037e05": "Это приложение", + "3d96310c2214fe2d": "Показывать окружения как", + "41e0e5e03e07db42": "Карта", + "3a8adb207fb5e078": "Список", "493685e264877b13": "Доступ для", "5b2287f7b10cfa2f": "Не в сети", "03f150efa96ec728": "Переключиться на Windows", @@ -8349,6 +8352,83 @@ "191fa21f1cfda1ef": "Хост отклонил вход с этого устройства. Повторите сопряжение по этому адресу через «Добавить маршрут».", "219bc3612d646a01": "Удалить маршрут", "b2877341429675aa": "через {route}", + "537e7cf4df7a0af1": "Этот браузер", + "601e0c9e6a45a54f": "Вместить карту в окно", + "feec58f6653f5673": "Как читать линии", + "e459bd5c53a993e2": "Используемый маршрут", + "46e0a0c6ff391521": "Используется", + "1151e8a9fb7bdfcf": "В резерве", + "a322337b6655de2a": "Не используется", + "e31c7e76ef900ef4": "Вход отклонён", + "235b3e270162f18b": "Привязка: чем больше доступ, тем толще", + "c326a7e66bab5da0": "Ваши окружения", + "86222507d918084b": "Доступны через привязку", + "aa34f7bc5aaf6bb0": "Карта ваших машин", + "3b61cc529ae01681": "Стрелки перемещают между машинами. Enter открывает сведения о машине с её маршрутами и привязками. Tab с окружения ведёт к его кнопке привязки. Плюс и минус меняют масштаб, ноль вписывает карту.", + "753b4a8ec5521c98": "Привязка от {source} к {target}: {summary}", + "bb6a74a47a3852c7": "Срок истёк", + "3076117d81a9c1c0": "Не отвечает", + "96fdb2fd529b1fbb": "Сбой", + "8971602c42718d72": "Доступно", + "1b256867b95ee022": "{days, plural, one {Истекает через {days} день} few {Истекает через {days} дня} many {Истекает через {days} дней} other {Истекает через {days} дня}}", + "aae31cf2017dab5b": "Публичный", + "19f6a3505837907d": "{access}. Доступно {reachable} из {count}", + "325f85fe7ade4efd": "От {first} до {last}, машин: {count}, привязаны из {source}. {summary}", + "35b783cfc817cb6f": "Свернуть эти машины", + "b8f2d917d3a592df": "Показать каждую машину на карте", + "b0d81579d80fb94a": "известна только по привязке", + "2d3dc930fd1cdd55": "от {source}: {summary}", + "911bc3bcde1aba3b": "{count, plural, one {# входящая привязка} few {# входящие привязки} many {# входящих привязок} other {# входящей привязки}}", + "0fecb34fd1ae531f": "{label}, в вашей учётной записи T3 Connect, не добавлена в это приложение. {status}", + "930f9e01fc4591b4": "Выкл.", + "4a84ad9b7f8e4909": "Загрузка привязок…", + "9c88c8e716354091": "Не удалось загрузить привязки", + "f9733c7b64c6f5d9": "Привязанные окружения выключены", + "ba30444f6d79cbdd": "Привязки отсюда не читаются", + "6a34b35812bb4ad0": "{count, plural, =0 {Нет исходящих привязок} one {# исходящая привязка} few {# исходящие привязки} many {# исходящих привязок} other {# исходящей привязки}}", + "5d252c8bbc3b24d0": "{status}. Привязки неизвестны", + "ec2c609c028d63b4": "Привязать {label} к другой машине", + "0a72d33781010657": "К этому нельзя привязать", + "4f10f6354f38106e": "Обновить привязку к {target}. Код сопряжения не нужен", + "5a25bfd7c3a8e4b4": "Привязать к {target}. Код сопряжения не нужен", + "b4b893b9c210e0ba": "Обновить привязку к {target}. Нужен код сопряжения с той машины", + "052c3f87704b216d": "Привязать к {target}. Нужен код сопряжения с той машины", + "e6b05c7e6ef4fef7": "Отпустите на машине, чтобы привязать к ней {source}", + "7f045c3477f783cc": "{count, plural, one {# привязка требует внимания.} few {# привязки требуют внимания.} many {# привязок требуют внимания.} other {# привязки требуют внимания.}}", + "d53ada50331e6041": "{machines, plural, one {# машина} few {# машины} many {# машин} other {# машины}}, {links, plural, =0 {нет привязок} one {# привязка} few {# привязки} many {# привязок} other {# привязки}}", + "706ac721bf99036c": "{machines, plural, one {# машина} few {# машины} many {# машин} other {# машины}}", + "61287d7320b20cad": "Выберите машину, чтобы управлять ею. Чтобы привязать две машины, перетащите плюс окружения на другую машину или нажмите его, чтобы выбрать.", + "743b93767ec7ebf8": "Выберите машину, чтобы управлять ею.", + "718e9f7ff8f48497": "Привязка ведёт к одной машине и на ней заканчивается. Она не распространяется на машины, к которым привязана та.", + "3e8441af6148878f": "Истекает {date}", + "786d62572ebcebdf": "{count, plural, one {# машина} few {# машины} many {# машин} other {# машины}}, привязаны из {source}, {access}, доступно: {reachable}", + "166aac696c3ec460": "Свернуть на карте", + "069d8ba658617f30": "Показать каждую на карте", + "eefe994332120d82": "Привязать", + "9aca4025e20bef31": "Подключено окружений: {connected} из {total}", + "7f3ea6eba251a165": "Каждая линия отсюда — сохранённый маршрут к окружению. Карта показывает привязки окружений, к которым подключено это приложение; у недоступного окружения могут быть привязки, которые не нарисованы.", + "398cee23ca4dabec": "{count, plural, =0 {Известные машины сюда не привязаны} one {Привязки от # машины} few {Привязки от # машин} many {Привязки от # машин} other {Привязки от # машины}}", + "4492f856b6539118": "{label} есть в вашей учётной записи T3 Connect, но не добавлена в это приложение. Добавьте её, чтобы подключиться и увидеть её привязки.", + "da2990354cbe0fab": "Известна только по привязке", + "5d46435186f86deb": "Это приложение не подключено к {label}, поэтому привязки {label} к другим машинам не показаны.", + "b943528e12e44252": "Это приложение сейчас не подключено к {label}, поэтому привязки {label} к другим машинам не показаны.", + "f0fa4a3c6960cb17": "На {label} привязанные окружения выключены. Включите их там в настройках, в разделе «Эксперименты», чтобы создавать привязки оттуда.", + "eb3226bab4946cfa": "У этого приложения нет права читать привязки {label}.", + "59bb2a50641eb2a9": "Не удалось загрузить привязки {label}: {error}", + "58cb9c075da185fb": "Загрузка привязанных окружений…", + "126e2b7a117f01d5": "{count, plural, =0 {Нет привязок к другим машинам} one {Привязки к # машине} few {Привязки к # машинам} many {Привязки к # машинам} other {Привязки к # машины}}", + "285d95a8e5ad0ec5": "привязано к", + "57f38a04b1e5c033": "Удаление привязки…", + "20ffe8337f8f30ba": "Забыть", + "1f221fe54654ed13": "Доступ", + "8b0cd4f77cc74c37": "Состояние", + "33386c89f3b07fea": "Срок истёк. Свяжите заново с новым кодом сопряжения.", + "13d91e967cd9065c": "Сейчас не отвечает.", + "42e613ac8acac777": "{days, plural, one {Истекает через {days} день. Свяжите заново, чтобы продлить.} few {Истекает через {days} дня. Свяжите заново, чтобы продлить.} many {Истекает через {days} дней. Свяжите заново, чтобы продлить.} other {Истекает через {days} дня. Свяжите заново, чтобы продлить.}}", + "0990edee7035bcfe": "Истекает", + "1c161c630d28d225": "Адреса", + "7ee376c7db73ab57": "Привязано", + "e9f7a62ecd609a46": "Последняя связь", "70bae47e93a2f207": "Показать ошибку полностью", "e4099af6d85770ff": "«{font}» не моноширинный", "a8448493d83279e2": "Коду и терминалу нужен моноширинный шрифт, поэтому текущий шрифт сохранён.", @@ -8686,21 +8766,14 @@ "18b1d4d42b945b34": "Машины", "03860d65c4052ab5": "Проверяем, какие машины уже привязаны…", "4cea6be0fe6be16f": "Не удалось загрузить привязанные окружения", - "58cb9c075da185fb": "Загрузка привязанных окружений…", "25b74062dc03079e": "Нет привязанных окружений", "6698127fcc912f23": "Свяжите другую машину с T3 Code, например VPS, чтобы агенты отсюда могли запускать треды там и управлять ими.", - "ad5ed0ce61b966eb": "Забыть {label}? Агенты отсюда перестанут там работать. Чтобы завершить сеанс и там, отзовите «T3 Code · …» в разделе «Общий доступ» на {label}.", - "81c9796bf61b306a": "Не удалось забыть привязку", - "33386c89f3b07fea": "Срок истёк. Свяжите заново с новым кодом сопряжения.", - "13d91e967cd9065c": "Сейчас не отвечает.", - "42e613ac8acac777": "{days, plural, one {Истекает через {days} день. Свяжите заново, чтобы продлить.} few {Истекает через {days} дня. Свяжите заново, чтобы продлить.} many {Истекает через {days} дней. Свяжите заново, чтобы продлить.} other {Истекает через {days} дня. Свяжите заново, чтобы продлить.}}", - "8971602c42718d72": "Доступно", - "57f38a04b1e5c033": "Удаление привязки…", - "20ffe8337f8f30ba": "Забыть", "e1789f863205ad5a": "Не удалось привязать окружение", "40cde51afa218290": "Привязано: {label}", - "eefe994332120d82": "Привязать", + "64ac3d1579ca9f5b": "Привязать {source} к {target}", "fb71127e5746a6bc": "Из раздела «Общий доступ» там или через t3 pair", + "ad5ed0ce61b966eb": "Забыть {label}? Агенты отсюда перестанут там работать. Чтобы завершить сеанс и там, отзовите «T3 Code · …» в разделе «Общий доступ» на {label}.", + "81c9796bf61b306a": "Не удалось забыть привязку", "130e51beb6cf5aad": "Привязать окружение", "122c3e355699e69d": "После этого агенты отсюда смогут запускать треды там, писать в них и ждать их. Связь появится в разделе «Авторизованные клиенты» в «Общем доступе» того окружения, где её можно отозвать.", "dc9a0b68d101e904": "Уже привязано. Повторная привязка продлевает её с выбранным уровнем доступа.", @@ -9388,7 +9461,6 @@ "e3349eb2353ee27c": "Подтверждение новых устройств выключено, поэтому отозванное устройство, вошедшее в ваш аккаунт T3 Connect, может снова подключиться самостоятельно.", "080160002915c666": "Требовать подтверждения новых устройств", "73dd0f86f5363431": "Устройство должно быть подтверждено здесь, прежде чем сможет снова подключиться.", - "930f9e01fc4591b4": "Выкл.", "6c7762bd72cea808": "Переподключение: {error}", "6cced6a88a19f1f2": "Переподключение", "8cbb63fdff9fde72": "Ошибка подключения: {error}", diff --git a/apps/web/src/i18n/translations/sv.json b/apps/web/src/i18n/translations/sv.json index 353df28a8a9aa..9c5444718521e 100644 --- a/apps/web/src/i18n/translations/sv.json +++ b/apps/web/src/i18n/translations/sv.json @@ -8052,6 +8052,9 @@ "d087da5017f20fa2": "Ingen miljö vald", "cb553d31c9d1b1c7": "Anslut en miljö för att visa dess inställningar och åtkomst.", "9a84dc0e80037e05": "Den här appen", + "3d96310c2214fe2d": "Visa miljöer som", + "41e0e5e03e07db42": "Karta", + "3a8adb207fb5e078": "Lista", "493685e264877b13": "Visar åtkomst för", "5b2287f7b10cfa2f": "Offline", "03f150efa96ec728": "Byt till Windows", @@ -8355,6 +8358,83 @@ "191fa21f1cfda1ef": "Värden nekade den här enhetens inloggning. Parkoppla adressen igen med Lägg till rutt.", "219bc3612d646a01": "Ta bort rutt", "b2877341429675aa": "via {route}", + "537e7cf4df7a0af1": "Den här webbläsaren", + "601e0c9e6a45a54f": "Anpassa kartan till vyn", + "feec58f6653f5673": "Så läser du linjerna", + "e459bd5c53a993e2": "Rutt som används", + "46e0a0c6ff391521": "Används", + "1151e8a9fb7bdfcf": "Reserv", + "a322337b6655de2a": "Används inte", + "e31c7e76ef900ef4": "Inloggning nekad", + "235b3e270162f18b": "Länk, tjockare med mer åtkomst", + "c326a7e66bab5da0": "Dina miljöer", + "86222507d918084b": "Nås via en länk", + "aa34f7bc5aaf6bb0": "Karta över dina maskiner", + "3b61cc529ae01681": "Piltangenterna flyttar mellan maskiner. Enter öppnar en maskins detaljer, med dess rutter och länkar. Tabb från en miljö går till dess länkknapp. Plus och minus zoomar, noll anpassar kartan.", + "753b4a8ec5521c98": "Länk från {source} till {target}: {summary}", + "bb6a74a47a3852c7": "Har gått ut", + "3076117d81a9c1c0": "Svarar inte", + "96fdb2fd529b1fbb": "Fungerar inte", + "8971602c42718d72": "Nåbar", + "1b256867b95ee022": "{days, plural, one {Går ut om {days} dag} other {Går ut om {days} dagar}}", + "aae31cf2017dab5b": "Publik", + "19f6a3505837907d": "{access}. {reachable} av {count} nåbara", + "325f85fe7ade4efd": "{first} till {last}, {count} maskiner länkade från {source}. {summary}", + "35b783cfc817cb6f": "Fäll ihop de här maskinerna", + "b8f2d917d3a592df": "Visa varje maskin på kartan", + "b0d81579d80fb94a": "känd endast via en länk", + "2d3dc930fd1cdd55": "från {source}: {summary}", + "911bc3bcde1aba3b": "{count, plural, one {# inkommande länk} other {# inkommande länkar}}", + "0fecb34fd1ae531f": "{label}, på ditt T3 Connect-konto, inte tillagd i den här appen. {status}", + "930f9e01fc4591b4": "Av", + "4a84ad9b7f8e4909": "Läser in länkar…", + "9c88c8e716354091": "Länkarna kunde inte läsas in", + "f9733c7b64c6f5d9": "Länkade miljöer är avstängt", + "ba30444f6d79cbdd": "Länkarna kan inte läsas härifrån", + "6a34b35812bb4ad0": "{count, plural, =0 {Inga utgående länkar} one {# utgående länk} other {# utgående länkar}}", + "5d252c8bbc3b24d0": "{status}. Länkar okända", + "ec2c609c028d63b4": "Länka {label} till en annan maskin", + "0a72d33781010657": "Går inte att länka till detta", + "4f10f6354f38106e": "Förnya länken till {target}. Ingen parkopplingskod behövs", + "5a25bfd7c3a8e4b4": "Länka till {target}. Ingen parkopplingskod behövs", + "b4b893b9c210e0ba": "Förnya länken till {target}. Kräver en parkopplingskod därifrån", + "052c3f87704b216d": "Länka till {target}. Kräver en parkopplingskod därifrån", + "e6b05c7e6ef4fef7": "Släpp på en maskin för att länka {source} till den", + "7f045c3477f783cc": "{count, plural, one {# länk behöver åtgärdas.} other {# länkar behöver åtgärdas.}}", + "d53ada50331e6041": "{machines, plural, one {# dator} other {# datorer}}, {links, plural, =0 {inga länkar} one {# länk} other {# länkar}}", + "706ac721bf99036c": "{machines, plural, one {# maskin} other {# maskiner}}", + "61287d7320b20cad": "Välj en maskin för att hantera den. För att länka två maskiner drar du plustecknet på en miljö till en annan maskin, eller trycker på det för att välja en.", + "743b93767ec7ebf8": "Välj en maskin för att hantera den.", + "718e9f7ff8f48497": "En länk når en dator och stannar där. Den går inte vidare till de datorer som den datorn länkar till.", + "3e8441af6148878f": "Går ut {date}", + "786d62572ebcebdf": "{count, plural, one {# maskin länkad} other {# maskiner länkade}} från {source}, {access}, {reachable} nåbara", + "166aac696c3ec460": "Fäll ihop på kartan", + "069d8ba658617f30": "Visa var och en på kartan", + "eefe994332120d82": "Länka", + "9aca4025e20bef31": "Ansluten till {connected} av {total} miljöer", + "7f3ea6eba251a165": "Varje linje härifrån är en sparad rutt till en miljö. Kartan visar länkarna för de miljöer som appen är ansluten till; en miljö den inte når kan ha länkar som inte ritas ut.", + "398cee23ca4dabec": "{count, plural, =0 {Ingen känd dator länkar hit} one {Länkad från # dator} other {Länkad från # datorer}}", + "4492f856b6539118": "{label} finns på ditt T3 Connect-konto men är inte tillagd i den här appen. Lägg till den för att ansluta och se vilka länkar den har.", + "da2990354cbe0fab": "Känd endast via en länk", + "5d46435186f86deb": "Den här appen är inte ansluten till {label}, så eventuella länkar därifrån till andra datorer visas inte.", + "b943528e12e44252": "Den här appen är inte ansluten till {label} just nu, så eventuella länkar därifrån till andra datorer visas inte.", + "f0fa4a3c6960cb17": "Länkade miljöer är avstängt på {label}. Slå på det i dess inställningar, under Labs, för att länka därifrån.", + "eb3226bab4946cfa": "Den här appen får inte läsa länkarna som {label} har.", + "59bb2a50641eb2a9": "Kunde inte läsa in länkarna som {label} har: {error}", + "58cb9c075da185fb": "Läser in länkade miljöer…", + "126e2b7a117f01d5": "{count, plural, =0 {Länkar inte till någon} one {Länkar till # dator} other {Länkar till # datorer}}", + "285d95a8e5ad0ec5": "länkar till", + "57f38a04b1e5c033": "Glömmer…", + "20ffe8337f8f30ba": "Glöm", + "1f221fe54654ed13": "Åtkomst", + "8b0cd4f77cc74c37": "Status", + "33386c89f3b07fea": "Har gått ut. Länka den igen med en ny parkopplingskod.", + "13d91e967cd9065c": "Svarar inte just nu.", + "42e613ac8acac777": "{days, plural, one {Går ut om {days} dag. Länka den igen för att förnya.} other {Går ut om {days} dagar. Länka den igen för att förnya.}}", + "0990edee7035bcfe": "Går ut", + "1c161c630d28d225": "Adresser", + "7ee376c7db73ab57": "Länkad", + "e9f7a62ecd609a46": "Senast nådd", "70bae47e93a2f207": "Visa hela felet", "e4099af6d85770ff": "”{font}” är inte ett teckensnitt med fast bredd", "a8448493d83279e2": "Kod och terminal kräver ett teckensnitt med fast bredd, så det aktuella teckensnittet behölls.", @@ -8692,21 +8772,14 @@ "18b1d4d42b945b34": "Datorer", "03860d65c4052ab5": "Kontrollerar vilka datorer som redan är länkade…", "4cea6be0fe6be16f": "Kunde inte läsa in länkade miljöer", - "58cb9c075da185fb": "Läser in länkade miljöer…", "25b74062dc03079e": "Inga länkade miljöer", "6698127fcc912f23": "Länka en annan dator som kör T3 Code, till exempel en VPS, så att agenter här kan starta och styra trådar där.", - "ad5ed0ce61b966eb": "Glöm {label}? Agenter här slutar arbeta där. Återkalla ”T3 Code · …” under Delning och åtkomst på {label} för att avsluta sessionen där också.", - "81c9796bf61b306a": "Kunde inte glömma länken", - "33386c89f3b07fea": "Har gått ut. Länka den igen med en ny parkopplingskod.", - "13d91e967cd9065c": "Svarar inte just nu.", - "42e613ac8acac777": "{days, plural, one {Går ut om {days} dag. Länka den igen för att förnya.} other {Går ut om {days} dagar. Länka den igen för att förnya.}}", - "8971602c42718d72": "Nåbar", - "57f38a04b1e5c033": "Glömmer…", - "20ffe8337f8f30ba": "Glöm", "e1789f863205ad5a": "Kunde inte länka miljön", "40cde51afa218290": "Länkade {label}", - "eefe994332120d82": "Länka", + "64ac3d1579ca9f5b": "Länka {source} till {target}", "fb71127e5746a6bc": "Från Delning och åtkomst där, eller t3 pair", + "ad5ed0ce61b966eb": "Glöm {label}? Agenter här slutar arbeta där. Återkalla ”T3 Code · …” under Delning och åtkomst på {label} för att avsluta sessionen där också.", + "81c9796bf61b306a": "Kunde inte glömma länken", "130e51beb6cf5aad": "Länka en miljö", "122c3e355699e69d": "Agenter här kan sedan starta, skicka meddelanden till och vänta på trådar där. Den visas under Auktoriserade klienter i miljöns Delning och åtkomst, där den kan återkallas.", "dc9a0b68d101e904": "Redan länkad. Om du länkar igen förnyas den med den åtkomst du väljer.", @@ -9394,7 +9467,6 @@ "e3349eb2353ee27c": "Godkännande för nya enheter är avstängt, så en återkallad enhet som är inloggad på ditt T3 Connect-konto kan ansluta igen på egen hand.", "080160002915c666": "Kräv godkännande för nya enheter", "73dd0f86f5363431": "Enheten måste godkännas här innan den kan ansluta igen.", - "930f9e01fc4591b4": "Av", "6c7762bd72cea808": "Återansluter: {error}", "6cced6a88a19f1f2": "Återansluter", "8cbb63fdff9fde72": "Anslutningen misslyckades: {error}", diff --git a/apps/web/src/i18n/translations/zh.json b/apps/web/src/i18n/translations/zh.json index 4acdfc14e2cb4..829a37430d51d 100644 --- a/apps/web/src/i18n/translations/zh.json +++ b/apps/web/src/i18n/translations/zh.json @@ -8065,6 +8065,9 @@ "d087da5017f20fa2": "未选择环境", "cb553d31c9d1b1c7": "连接一个环境,查看其设置和访问权限。", "9a84dc0e80037e05": "此应用", + "3d96310c2214fe2d": "环境显示方式", + "41e0e5e03e07db42": "地图", + "3a8adb207fb5e078": "列表", "493685e264877b13": "权限所属环境", "5b2287f7b10cfa2f": "离线", "03f150efa96ec728": "切换到 Windows", @@ -8365,6 +8368,83 @@ "191fa21f1cfda1ef": "主机拒绝了此设备的登录。请通过“添加线路”重新配对此地址。", "219bc3612d646a01": "移除线路", "b2877341429675aa": "通过 {route}", + "537e7cf4df7a0af1": "此浏览器", + "601e0c9e6a45a54f": "让地图适应视图", + "feec58f6653f5673": "如何看这些线", + "e459bd5c53a993e2": "使用中的线路", + "46e0a0c6ff391521": "使用中", + "1151e8a9fb7bdfcf": "备用", + "a322337b6655de2a": "未使用", + "e31c7e76ef900ef4": "登录被拒绝", + "235b3e270162f18b": "关联,权限越大线越粗", + "c326a7e66bab5da0": "你的环境", + "86222507d918084b": "通过关联到达", + "aa34f7bc5aaf6bb0": "你的机器地图", + "3b61cc529ae01681": "方向键在机器之间移动。按 Enter 打开机器的详情,包括线路和关联。在环境上按 Tab 可到达它的关联按钮。加号和减号缩放,零让地图适应视图。", + "753b4a8ec5521c98": "从 {source} 到 {target} 的关联:{summary}", + "bb6a74a47a3852c7": "已过期", + "3076117d81a9c1c0": "无响应", + "96fdb2fd529b1fbb": "出错", + "8971602c42718d72": "可访问", + "1b256867b95ee022": "{days, plural, other {{days} 天后过期}}", + "aae31cf2017dab5b": "公网", + "19f6a3505837907d": "{access}。{count} 台中 {reachable} 台可访问", + "325f85fe7ade4efd": "{first} 到 {last},从 {source} 关联的 {count} 台机器。{summary}", + "35b783cfc817cb6f": "折叠这些机器", + "b8f2d917d3a592df": "在地图上显示每台机器", + "b0d81579d80fb94a": "仅通过关联得知", + "2d3dc930fd1cdd55": "来自 {source}:{summary}", + "911bc3bcde1aba3b": "{count, plural, other {# 个向内的关联}}", + "0fecb34fd1ae531f": "{label},在你的 T3 Connect 账户中,尚未添加到此应用。{status}", + "930f9e01fc4591b4": "关闭", + "4a84ad9b7f8e4909": "正在加载关联…", + "9c88c8e716354091": "无法加载关联", + "f9733c7b64c6f5d9": "关联环境已关闭", + "ba30444f6d79cbdd": "无法从这里读取关联", + "6a34b35812bb4ad0": "{count, plural, =0 {没有向外的关联} other {# 个向外的关联}}", + "5d252c8bbc3b24d0": "{status}。关联未知", + "ec2c609c028d63b4": "将 {label} 关联到另一台机器", + "0a72d33781010657": "无法关联到这里", + "4f10f6354f38106e": "续期到 {target} 的关联。无需配对码", + "5a25bfd7c3a8e4b4": "关联到 {target}。无需配对码", + "b4b893b9c210e0ba": "续期到 {target} 的关联。需要来自它的配对码", + "052c3f87704b216d": "关联到 {target}。需要来自它的配对码", + "e6b05c7e6ef4fef7": "拖放到一台机器上,将 {source} 关联到它", + "7f045c3477f783cc": "{count, plural, other {# 个关联需要处理。}}", + "d53ada50331e6041": "{machines, plural, other {# 台机器}},{links, plural, =0 {没有关联} other {# 个关联}}", + "706ac721bf99036c": "{machines, plural, other {# 台机器}}", + "61287d7320b20cad": "选择一台机器进行管理。要关联两台机器,请将环境上的加号拖到另一台机器上,或按下它来选择一台。", + "743b93767ec7ebf8": "选择一台机器进行管理。", + "718e9f7ff8f48497": "关联只到达一台机器并止于此,不会延伸到那台机器所关联的其他机器。", + "3e8441af6148878f": "{date} 到期", + "786d62572ebcebdf": "{count, plural, other {从 {source} 关联的 # 台机器}},{access},{reachable} 台可访问", + "166aac696c3ec460": "在地图上折叠", + "069d8ba658617f30": "在地图上逐台显示", + "eefe994332120d82": "关联", + "9aca4025e20bef31": "已连接 {total} 个环境中的 {connected} 个", + "7f3ea6eba251a165": "从这里出发的每条线都是通往某个环境的已保存线路。地图显示此应用已连接环境的关联;无法到达的环境可能有未画出的关联。", + "398cee23ca4dabec": "{count, plural, =0 {没有已知机器关联到这里} other {被 # 台机器关联}}", + "4492f856b6539118": "{label} 在你的 T3 Connect 账户中,但尚未添加到此应用。添加后即可连接并查看它的关联。", + "da2990354cbe0fab": "仅通过关联得知", + "5d46435186f86deb": "此应用未连接到 {label},因此不会显示它到其他机器的关联。", + "b943528e12e44252": "此应用目前未连接到 {label},因此不会显示它到其他机器的关联。", + "f0fa4a3c6960cb17": "{label} 上的关联环境已关闭。请在它的设置中的“实验功能”里开启,才能从它发起关联。", + "eb3226bab4946cfa": "此应用无权读取 {label} 的关联。", + "59bb2a50641eb2a9": "无法加载 {label} 的关联:{error}", + "58cb9c075da185fb": "正在加载已关联的环境…", + "126e2b7a117f01d5": "{count, plural, =0 {未关联任何机器} other {关联到 # 台机器}}", + "285d95a8e5ad0ec5": "关联到", + "57f38a04b1e5c033": "正在移除…", + "20ffe8337f8f30ba": "移除", + "1f221fe54654ed13": "访问权限", + "8b0cd4f77cc74c37": "状态", + "33386c89f3b07fea": "已过期。请使用新的配对码重新关联。", + "13d91e967cd9065c": "暂时没有响应。", + "42e613ac8acac777": "{days, plural, other {{days} 天后过期。重新关联以续期。}}", + "0990edee7035bcfe": "过期时间", + "1c161c630d28d225": "地址", + "7ee376c7db73ab57": "关联时间", + "e9f7a62ecd609a46": "上次连通", "70bae47e93a2f207": "显示完整错误", "e4099af6d85770ff": "“{font}”不是等宽字体", "a8448493d83279e2": "代码和终端需要等宽字体,已保留当前字体。", @@ -8702,21 +8782,14 @@ "18b1d4d42b945b34": "机器", "03860d65c4052ab5": "正在检查哪些机器已关联…", "4cea6be0fe6be16f": "无法加载已关联的环境", - "58cb9c075da185fb": "正在加载已关联的环境…", "25b74062dc03079e": "没有已关联的环境", "6698127fcc912f23": "关联另一台运行 T3 Code 的机器(例如 VPS),让这里的智能体能够在那台机器上启动和操作会话。", - "ad5ed0ce61b966eb": "忘记 {label}?此处的智能体将停止在那里工作。在 {label} 的“共享与访问”中撤销“T3 Code · …”,以同时结束那里的连接。", - "81c9796bf61b306a": "无法移除关联", - "33386c89f3b07fea": "已过期。请使用新的配对码重新关联。", - "13d91e967cd9065c": "暂时没有响应。", - "42e613ac8acac777": "{days, plural, other {{days} 天后过期。重新关联以续期。}}", - "8971602c42718d72": "可访问", - "57f38a04b1e5c033": "正在移除…", - "20ffe8337f8f30ba": "移除", "e1789f863205ad5a": "无法关联环境", "40cde51afa218290": "已关联 {label}", - "eefe994332120d82": "关联", + "64ac3d1579ca9f5b": "将 {source} 关联到 {target}", "fb71127e5746a6bc": "从远端“共享与访问”页面或 t3 pair 获取", + "ad5ed0ce61b966eb": "忘记 {label}?此处的智能体将停止在那里工作。在 {label} 的“共享与访问”中撤销“T3 Code · …”,以同时结束那里的连接。", + "81c9796bf61b306a": "无法移除关联", "130e51beb6cf5aad": "关联环境", "122c3e355699e69d": "这里的智能体随后就能在该环境中启动会话、发送消息并等待结果。此连接将显示在该环境“共享与访问”的“已授权客户端”中,可在那里撤销。", "dc9a0b68d101e904": "已关联。再次关联将使用你选择的访问权限续期。", @@ -9402,7 +9475,6 @@ "e3349eb2353ee27c": "新设备审批未开启,因此已撤销但仍登录你的 T3 Connect 账号的设备可以自行重新连接。", "080160002915c666": "新设备连接需要审批", "73dd0f86f5363431": "设备必须在此获批后才能重新连接。", - "930f9e01fc4591b4": "关闭", "6c7762bd72cea808": "正在重新连接:{error}", "6cced6a88a19f1f2": "正在重新连接", "8cbb63fdff9fde72": "连接失败:{error}", diff --git a/apps/web/src/state/environments.ts b/apps/web/src/state/environments.ts index af231d58c77ee..03b9943c18ea7 100644 --- a/apps/web/src/state/environments.ts +++ b/apps/web/src/state/environments.ts @@ -7,6 +7,7 @@ import { import { Discovery } from "@t3tools/client-runtime/relay"; import type { EnvironmentId } from "@t3tools/contracts"; import * as Option from "effect/Option"; +import { useState } from "react"; import { environmentCatalog } from "../connection/catalog"; import { appAtomRegistry } from "../rpc/atomRegistry"; @@ -105,6 +106,18 @@ export function useRelayEnvironmentDiscovery(): Discovery.RelayEnvironmentDiscov return useAtomValue(relayEnvironmentDiscovery.stateValueAtom); } +/** + * The account's T3 Connect machines for a view that keeps one in front of the user. A refresh + * empties the list until it answers; the machines last seen stay meanwhile. + */ +export function useRetainedRelayEnvironments() { + const discovery = useRelayEnvironmentDiscovery(); + const [seen, setSeen] = useState(discovery.environments); + const emptied = discovery.refreshing && discovery.environments.size === 0; + if (!emptied && seen !== discovery.environments) setSeen(discovery.environments); + return emptied ? seen : discovery.environments; +} + export function useEnvironmentIdentities() { return useAtomValue(environmentSummaries.identitiesAtom); } diff --git a/apps/web/src/state/peerLinks.ts b/apps/web/src/state/peerLinks.ts index b19276c6f88b5..5d34f935bde68 100644 --- a/apps/web/src/state/peerLinks.ts +++ b/apps/web/src/state/peerLinks.ts @@ -10,6 +10,7 @@ import { Atom } from "effect/reactivity"; import { useEffect, useEffectEvent } from "react"; import { connectionAtomRuntime } from "../connection/runtime"; +import { environmentAtomList } from "./environmentAtomList"; import { useEnvironmentIdentities, useEnvironments } from "./environments"; import { environmentPresentations } from "./presentation"; import { relayEnvironmentDiscovery } from "./relay"; @@ -19,6 +20,11 @@ import { useAtomCommand } from "./use-atom-command"; export const peerLinkEnvironment = createPeerLinkEnvironmentAtoms(connectionAtomRuntime); +/** Each environment's link list as the settings list loads it, in the order of the ids. */ +export const peerLinkListsAtom = environmentAtomList("peer-links:lists", (environmentId) => + peerLinkEnvironment.list({ environmentId, input: {} }), +); + /** Whether `environmentId` offers links, so its threads may name another machine. */ export const offersLinkedEnvironmentsAtom = Atom.family((environmentId: EnvironmentId) => Atom.make((get) => diff --git a/apps/web/src/state/session.ts b/apps/web/src/state/session.ts index f53bb3dfa9684..8a08e99fc6967 100644 --- a/apps/web/src/state/session.ts +++ b/apps/web/src/state/session.ts @@ -100,6 +100,12 @@ export function usePreparedConnection(environmentId: EnvironmentId | null) { ); } +/** Each environment's prepared connection, in the order of the ids. */ +export const preparedConnectionsAtom = environmentAtomList( + "web-prepared-connections", + environmentSession.preparedConnectionValueAtom, +); + export function readPreparedConnection(environmentId: EnvironmentId) { return Option.getOrNull( appAtomRegistry.get(environmentSession.preparedConnectionValueAtom(environmentId)), diff --git a/docs/user/remote-access.md b/docs/user/remote-access.md index 80fc00427c5de..7f5a7dad29840 100644 --- a/docs/user/remote-access.md +++ b/docs/user/remote-access.md @@ -470,6 +470,16 @@ an address you trust: the code is sent there. does one to a machine on an older T3 Code after 30 days; link again with a new pairing code. +On web and desktop, **Settings → Environments** opens as a map of your machines: +this app, each environment with one line per route (the one in use is +highlighted), and the machines an environment links to. Select a machine to +manage it, or switch to **List** for the same controls as rows. To link from +the map, drag the plus on an environment onto another machine, or press it and +pick one. If this app is connected to both machines it needs no pairing code. +The map draws the links of the machines this app is connected to; a machine it +is not connected to may hold links the map cannot show. A link reaches one +machine and does not carry on through that machine's own links. + An agent can also hand a task to a linked machine with `delegate_task`: it runs there as an ordinary thread, in the project with the same repository (or the one `target.projectId` names), and this thread wakes with its result when it diff --git a/packages/client-runtime/src/linkRequest.ts b/packages/client-runtime/src/linkRequest.ts index 6b8322e0ebee8..a8981510334ce 100644 --- a/packages/client-runtime/src/linkRequest.ts +++ b/packages/client-runtime/src/linkRequest.ts @@ -112,7 +112,8 @@ export function linkableMachines(input: { readonly environments: ReadonlyArray< EnvironmentPresentation & { readonly environmentId: EnvironmentId } >; - readonly threadEnvironmentId: EnvironmentId; + /** Null lists every machine, for a view that is not about one environment. */ + readonly threadEnvironmentId: EnvironmentId | null; readonly links: ReadonlyArray>; readonly connect: ReadonlyMap; }): ReadonlyArray { From fdb30b5a4c9543479b6890c5099430b203d60bd4 Mon Sep 17 00:00:00 2001 From: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com> Date: Thu, 19 Nov 2026 19:11:34 -0800 Subject: [PATCH 02/10] feat(web): environments map links several machines at once and folds large setups Shift-click, Shift-drag or Space selects machines; dropping an environment's plus on a selected machine or a stack, or the toolbar's Link several, opens main's batch dialog with the source set and those machines ticked. Machines known only through links fold by the exact set of links into them, unlinked environments fold by state past 12, an open stack draws 24 machines and lists the rest in a searchable, virtualised details list, and a search field finds a machine by name. Links into a card keep a 12px pitch and the card grows; a link name with no clear place shows only while its link is in focus. Co-Authored-By: Claude Fable 5.2 --- .../components/settings/EnvironmentsMap.tsx | 595 ++++++++++++-- .../settings/EnvironmentsMapDetails.tsx | 220 +++++- .../settings/LinkSeveralEnvironments.tsx | 62 +- .../settings/environmentsMap.logic.test.ts | 301 +++++++- .../settings/environmentsMap.logic.ts | 727 +++++++++++++----- apps/web/src/i18n/translations/de.json | 42 +- apps/web/src/i18n/translations/en.json | 42 +- apps/web/src/i18n/translations/es.json | 42 +- apps/web/src/i18n/translations/fr.json | 42 +- apps/web/src/i18n/translations/ja.json | 42 +- apps/web/src/i18n/translations/ko.json | 42 +- apps/web/src/i18n/translations/pt-BR.json | 42 +- apps/web/src/i18n/translations/ru.json | 42 +- apps/web/src/i18n/translations/sv.json | 42 +- apps/web/src/i18n/translations/zh.json | 42 +- docs/user/remote-access.md | 15 + 16 files changed, 1953 insertions(+), 387 deletions(-) diff --git a/apps/web/src/components/settings/EnvironmentsMap.tsx b/apps/web/src/components/settings/EnvironmentsMap.tsx index 51ccaaf26c2f1..923a727979c2f 100644 --- a/apps/web/src/components/settings/EnvironmentsMap.tsx +++ b/apps/web/src/components/settings/EnvironmentsMap.tsx @@ -18,11 +18,13 @@ import * as Option from "effect/Option"; import { useGT, useMessages } from "gt-react"; import { AppWindowIcon, + CheckIcon, CloudIcon, GlobeIcon, MaximizeIcon, MinusIcon, PlusIcon, + SearchIcon, UnfoldVerticalIcon, FoldVerticalIcon, } from "lucide-react"; @@ -30,6 +32,7 @@ import { memo, type FocusEvent, type KeyboardEvent, + type MouseEvent, type PointerEvent, type ReactNode, useContext, @@ -61,6 +64,8 @@ import { accessConfig } from "../auth/ConnectAgentSurface"; import { connectionPhaseDotClassName } from "../ConnectionStatusDot"; import { EnvironmentMachineIcon } from "../EnvironmentMachineIcon"; import { Button } from "../ui/button"; +import { InputGroup, InputGroupAddon, InputGroupInput } from "../ui/input-group"; +import { Menu, MenuItem, MenuPopup, MenuTrigger } from "../ui/menu"; import { buildFleetGraph, fitFleetLayout, @@ -68,8 +73,11 @@ import { FLEET_CLIENT_NODE_ID, fleetEnvironmentNodeId, fleetFocusRects, - fleetLinkOffer, + fleetLinkAction, + fleetMoreNodeId, fleetNeighborhood, + fleetNodesInBox, + fleetSearch, fleetShapeKey, fleetStacks, type FleetColumn, @@ -77,10 +85,11 @@ import { type FleetEnvironmentInput, type FleetEnvironmentNode, type FleetFocus, + type FleetFoldGroup, type FleetGraph, type FleetLayout, + type FleetLinkAction, type FleetLinkEdge, - type FleetLinkOffer, type FleetNode, type FleetRect, type FleetRouteState, @@ -102,6 +111,7 @@ import { healthTone, } from "./EnvironmentsMapDetails"; import { LinkEnvironmentDialog, type LinkEnvironmentPrefill } from "./LinkedEnvironmentsSettings"; +import { LinkSeveralEnvironmentsDialog } from "./LinkSeveralEnvironments"; import { savedBackendStatus } from "./SavedEnvironmentRows"; import { SettingsSearchTarget } from "./settingsLayout"; @@ -119,6 +129,9 @@ const ARROW_ROVE: Record = { ArrowRight: "right", }; const NO_STACKS: ReadonlySet = new Set(); +const NO_SELECTION: ReadonlySet = new Set(); +/** Search centres a machine at a scale it can be read at, however far out the map was. */ +const FOUND_MIN_SCALE = 0.85; /** Dashes repeat a link's health without colour, one pattern per kind of trouble. */ function healthDash(health: PeerLinkHealth): string | undefined { @@ -335,6 +348,13 @@ interface LinkRequest { readonly open: boolean; } +interface BatchRequest { + readonly serial: number; + readonly environmentId: EnvironmentId; + readonly preset: ReadonlyArray; + readonly open: boolean; +} + /** * Every machine this app knows about, how it reaches each one, and which of them are linked. * Selecting a machine shows the controls the list has for it. @@ -350,7 +370,12 @@ export function EnvironmentsMap( const stacks = fleetStacks(graph, expanded); const { key, layout } = useFleetLayout(graph, stacks); const [picked, setPicked] = useState(null); + // Machines ticked for a batch link: apart from `picked`, which is what the details show. + const [ticked, setTicked] = useState(NO_SELECTION); + // The machine a search landed on inside a stack, for the stack's list to scroll to. + const [found, setFound] = useState(null); const [linkRequest, setLinkRequest] = useState(null); + const [batchRequest, setBatchRequest] = useState(null); const selection = picked === null ? null @@ -362,21 +387,43 @@ export function EnvironmentsMap( ).some((item) => item.id === picked.id) ? picked : null; + // A machine that left the map leaves the selection with it. + const selected = + ticked.size === 0 + ? NO_SELECTION + : new Set(graph.nodes.filter((node) => ticked.has(node.id)).map((node) => node.id)); const toggleStack = (stackId: string) => setExpanded((current) => { const next = new Set(current); if (!next.delete(stackId)) next.add(stackId); return next; }); - // One dialog for every way in: a drop names the target, the handle and the details do not. + const tick = (ids: ReadonlyArray, mode: "toggle" | "add") => + setTicked((current) => { + const next = new Set(current); + for (const id of ids) { + if (mode === "toggle" && next.delete(id)) continue; + next.add(id); + } + return next; + }); + // One way in for every gesture: the handle, a drop, the details and the toolbar. const requestLink = (sourceId: string, targetId: string | null) => { - const source = graph.nodes.find((node) => node.id === sourceId); - if (source?.kind !== "environment" || source.linking !== "ready") return; - const offer = targetId === null ? null : fleetLinkOffer(graph, sourceId, targetId); - if (offer !== null && offer.kind !== "link") return; + const action = fleetLinkAction(graph, stacks, selected, sourceId, targetId); + if (action === null) return; + if (action.kind === "batch") { + setBatchRequest((current) => ({ + serial: (current?.serial ?? 0) + 1, + environmentId: action.sourceEnvironmentId, + preset: action.environmentIds, + open: true, + })); + return; + } + const { offer } = action; setLinkRequest((current) => ({ serial: (current?.serial ?? 0) + 1, - environmentId: source.environmentId, + environmentId: action.sourceEnvironmentId, open: true, prefill: offer === null @@ -386,6 +433,21 @@ export function EnvironmentsMap( : { choice: ANOTHER_ADDRESS, address: offer.target.address ?? "" }, })); }; + const requestBatch = (sourceId: string) => { + const source = graph.nodes.find((node) => node.id === sourceId); + if (source?.kind !== "environment" || source.linking !== "ready") return; + const action = fleetLinkAction(graph, stacks, selected, sourceId, null); + setBatchRequest((current) => ({ + serial: (current?.serial ?? 0) + 1, + environmentId: source.environmentId, + preset: action?.kind === "batch" ? action.environmentIds : [], + open: true, + })); + }; + const select = (focus: FleetFocus | null) => { + setPicked(focus); + setFound(null); + }; return ( <> setTicked(NO_SELECTION)} onLink={requestLink} + onLinkSeveral={requestBatch} onToggleStack={toggleStack} + onFind={(stackId, memberId) => { + setPicked({ kind: "stack", id: stackId }); + setFound(memberId); + }} /> requestLink(sourceId, null)} onToggleStack={toggleStack} /> @@ -423,6 +494,17 @@ export function EnvironmentsMap( } /> ) : null} + {batchRequest ? ( + + setBatchRequest((current) => (current === null ? null : { ...current, open })) + } + /> + ) : null} ); } @@ -433,16 +515,34 @@ interface FleetSceneProps { readonly layout: FleetLayout; readonly environments: ReadonlyArray; readonly selection: FleetFocus | null; + /** Machines ticked for a batch link. */ + readonly selected: ReadonlySet; readonly onSelect: (focus: FleetFocus | null) => void; + readonly onTick: (ids: ReadonlyArray, mode: "toggle" | "add") => void; readonly onLink: (sourceId: string, targetId: string | null) => void; readonly onToggleStack: (stackId: string) => void; } -function FleetCanvas({ shapeKey, ...scene }: FleetSceneProps & { readonly shapeKey: string }) { +interface FleetCanvasProps extends FleetSceneProps { + readonly shapeKey: string; + readonly onClearTicked: () => void; + readonly onLinkSeveral: (sourceId: string) => void; + /** A search landed on a machine drawn only inside a stack. */ + readonly onFind: (stackId: string, memberId: string) => void; +} + +function FleetCanvas({ + shapeKey, + onClearTicked, + onLinkSeveral, + onFind, + ...scene +}: FleetCanvasProps) { const gt = useGT(); - const { layout, onSelect } = scene; + const { graph, stacks, layout, selection, selected, onSelect, onTick } = scene; const [canvas, setCanvas] = useState(null); const [width, setWidth] = useState(null); + const [query, setQuery] = useState(""); // A view the user set by hand holds until the map's shape changes; otherwise it fits itself. const [manual, setManual] = useState<{ readonly key: string; @@ -451,11 +551,16 @@ function FleetCanvas({ shapeKey, ...scene }: FleetSceneProps & { readonly shapeK readonly glide: boolean; } | null>(null); const [dragging, setDragging] = useState(false); + // The selection box, in canvas pixels, while Shift is held through a drag on empty canvas. + const [box, setBox] = useState(null); const drag = useRef<{ readonly pointerId: number; readonly key: string; + readonly mode: "pan" | "box"; readonly x: number; readonly y: number; + readonly left: number; + readonly top: number; readonly origin: FleetViewTransform; moved: boolean; } | null>(null); @@ -538,21 +643,65 @@ function FleetCanvas({ shapeKey, ...scene }: FleetSceneProps & { readonly shapeK }; }); }; + const centre = (rect: FleetRect) => { + if (size === null || view === null) return; + const scale = Math.max(view.scale, FOUND_MIN_SCALE); + setView( + { + scale, + x: size.width / 2 - (rect.x + rect.width / 2) * scale, + y: size.height / 2 - (rect.y + rect.height / 2) * scale, + }, + true, + ); + }; + + const matchIds = fleetSearch(graph, query); + const matches = query.trim() === "" ? null : new Set(matchIds); + const goToFirstMatch = () => { + const first = matchIds[0]; + if (first === undefined) return; + const rect = layout.nodes.get(first); + if (rect !== undefined) { + onSelect({ kind: "node", id: first }); + centre(rect); + canvas + ?.querySelector(`[data-fleet-node="${CSS.escape(first)}"]`) + ?.focus({ preventScroll: true }); + return; + } + // Folded away: its stack's list in the details scrolls to it. + const stack = stacks.find((entry) => entry.memberIds.includes(first)); + const face = stack === undefined ? undefined : layout.stacks.get(stack.id)?.face; + if (stack === undefined || face === undefined) return; + onFind(stack.id, first); + centre(face); + }; const onPointerDown = (event: PointerEvent) => { // One pointer owns a drag: a second finger neither restarts it nor ends it. if (event.button !== 0 || view === null || drag.current !== null) return; if ((event.target as Element).closest("[data-fleet-item]")) return; + const bounds = event.currentTarget.getBoundingClientRect(); drag.current = { pointerId: event.pointerId, key: shapeKey, + mode: event.shiftKey ? "box" : "pan", x: event.clientX, y: event.clientY, + left: bounds.left, + top: bounds.top, origin: view, moved: false, }; event.currentTarget.setPointerCapture(event.pointerId); }; + const boxAt = (current: NonNullable, event: PointerEvent): FleetRect => ({ + x: Math.min(current.x, event.clientX) - current.left, + y: Math.min(current.y, event.clientY) - current.top, + width: Math.abs(event.clientX - current.x), + height: Math.abs(event.clientY - current.y), + }); const onPointerMove = (event: PointerEvent) => { const current = drag.current; if (current === null || current.pointerId !== event.pointerId) return; @@ -560,13 +709,18 @@ function FleetCanvas({ shapeKey, ...scene }: FleetSceneProps & { readonly shapeK if (current.key !== shapeKey) { drag.current = null; setDragging(false); + setBox(null); return; } const dx = event.clientX - current.x; const dy = event.clientY - current.y; if (!current.moved && Math.hypot(dx, dy) < 4) return; - if (!current.moved) setDragging(true); current.moved = true; + if (current.mode === "box") { + setBox(boxAt(current, event)); + return; + } + setDragging(true); setView({ ...current.origin, x: current.origin.x + dx, y: current.origin.y + dy }, false); }; const endDrag = (event: PointerEvent, cancelled: boolean) => { @@ -574,7 +728,24 @@ function FleetCanvas({ shapeKey, ...scene }: FleetSceneProps & { readonly shapeK if (current === null || current.pointerId !== event.pointerId) return; drag.current = null; setDragging(false); - if (!current.moved && !cancelled) onSelect(null); + setBox(null); + if (cancelled) return; + if (!current.moved) { + if (current.mode === "pan") onSelect(null); + return; + } + if (current.mode !== "box" || current.key !== shapeKey) return; + const drawn = boxAt(current, event); + const { origin } = current; + onTick( + fleetNodesInBox(layout, { + x: (drawn.x - origin.x) / origin.scale, + y: (drawn.y - origin.y) / origin.scale, + width: drawn.width / origin.scale, + height: drawn.height / origin.scale, + }), + "add", + ); }; const onKeyDown = (event: KeyboardEvent) => { if (event.ctrlKey || event.metaKey || event.altKey) return; @@ -586,13 +757,103 @@ function FleetCanvas({ shapeKey, ...scene }: FleetSceneProps & { readonly shapeK event.preventDefault(); }; + const sources = graph.nodes.filter( + (node): node is FleetEnvironmentNode => node.kind === "environment" && node.linking === "ready", + ); + // The environment in the details is the one the user means; a lone one needs no asking. + const source = + sources.find((node) => selection?.kind === "node" && node.id === selection.id) ?? + (sources.length === 1 ? sources[0] : undefined); + return ( <> +
    +
    + + + + + setQuery(event.target.value)} + onKeyDown={(event) => { + if (event.key === "Enter") { + event.preventDefault(); + goToFirstMatch(); + } else if (event.key === "Escape" && query !== "") { + event.stopPropagation(); + setQuery(""); + } + }} + /> + +
    +

    + {matches === null + ? null + : matchIds.length === 0 + ? gt("No machine by that name") + : gt( + "{count, plural, one {# match. Enter goes to it} other {# matches. Enter goes to the first}}", + { count: matchIds.length }, + )} +

    +
    + {selected.size > 0 ? ( + + + {gt("{count, plural, one {# selected} other {# selected}}", { + count: selected.size, + $context: "how many machines are selected on a map", + })} + + + + ) : ( + + {gt("Shift-click or Shift-drag to select several")} + + )} + {sources.length === 0 ? null : source !== undefined ? ( + + ) : ( + + + {gt("Link several…")} + + } + /> + + {sources.map((node) => ( + onLinkSeveral(node.id)}> + {gt("From {source}", { + source: node.label, + $context: "menu item: link several machines from this environment", + })} + + ))} + + + )} +
    +
    - +
    )} + {box === null ? null : ( +
    + )}
    {/* Below the canvas, not over it: nothing on the map can end up under the controls. */}
    @@ -774,8 +1042,16 @@ function linkSummary(edge: FleetLinkEdge, gt: GT, m: Messages): string { return `${m(accessConfig[edge.link.access].label)}, ${healthLabel(edge.health, gt)}`; } -function offerText(offer: FleetLinkOffer, target: string, gt: GT): string { - if (offer.kind !== "link") return gt("Cannot link to this"); +function actionText(action: FleetLinkAction | null, target: string, gt: GT): string { + if (action === null) return gt("Cannot link to this"); + if (action.kind === "batch") { + return gt( + "{count, plural, one {Link to # machine. Pick which in the next step} other {Link to # machines. Pick which in the next step}}", + { count: action.environmentIds.length }, + ); + } + const { offer } = action; + if (offer === null) return gt("Cannot link to this"); if (offer.path === "code-less") { return offer.renews ? gt("Renew the link to {target}. No pairing code needed", { target }) @@ -786,6 +1062,21 @@ function offerText(offer: FleetLinkOffer, target: string, gt: GT): string { : gt("Link to {target}. Needs a pairing code from it", { target }); } +function foldGroupLabel(group: FleetFoldGroup, gt: GT): string { + switch (group) { + case "offline": + return gt("Offline"); + case "off": + return gt("Switched off", { $context: "environments the user has switched off in this app" }); + case "update": + return gt("Need an update", { + $context: "environments running a version this app cannot talk to", + }); + case "not-added": + return gt("Not added"); + } +} + const COLUMN_TITLES = (gt: GT): Record => ({ client: gt("This app"), environments: gt("Your environments"), @@ -805,11 +1096,18 @@ const FleetScene = memo(function FleetScene({ layout, environments, selection, + selected, + matches, onSelect, + onTick, onLink, onToggleStack, onReveal, -}: FleetSceneProps & { readonly onReveal: (rect: FleetRect) => void }) { +}: FleetSceneProps & { + /** Machines a search names; the rest step back. Null when nothing is searched for. */ + readonly matches: ReadonlySet | null; + readonly onReveal: (rect: FleetRect) => void; +}) { const gt = useGT(); const m = useMessages(); const [hover, setHover] = useState(null); @@ -855,15 +1153,31 @@ const FleetScene = memo(function FleetScene({ isSelected("edge", edge.id) || (lit?.edges.has(edge.id) ?? false); // Painted last, so the links in focus lie over the ones that are not. const paintOrder = lit === null ? links : links.toSorted((a, b) => +linkLit(a) - +linkLit(b)); - const dragOffer = (targetId: string) => - linkDrag === null ? null : fleetLinkOffer(graph, linkDrag.sourceId, targetId); + const dragAction = (targetId: string) => + linkDrag === null + ? null + : fleetLinkAction(graph, stacks, selected, linkDrag.sourceId, targetId); + // A stack fades as a whole, by the links and machines it stands for. const nodeDimmed = (id: string) => - linkDrag !== null - ? id !== linkDrag.sourceId && dragOffer(id)?.kind !== "link" - : lit !== null && !lit.nodes.has(id); + layout.stacks.has(id) + ? false + : linkDrag !== null + ? id !== linkDrag.sourceId && dragAction(id) === null + : (lit !== null && !lit.nodes.has(id)) || (matches !== null && !matches.has(id)); // By the links it stands for: a host and a member can both be lit through other links. const stackLit = (stack: FleetStack) => lit === null || stack.edgeIds.some((id) => lit.edges.has(id)); + const stackDimmed = (stack: FleetStack) => + linkDrag !== null + ? false + : !stackLit(stack) || (matches !== null && !stack.memberIds.some((id) => matches.has(id))); + // A machine drawn on its own can be ticked for a batch link; the client and stacks cannot. + const tickable = (id: string) => id !== FLEET_CLIENT_NODE_ID && layout.nodes.has(id); + // A machine shown in the details but folded into a stack marks the stack it is in. + const holdsSelection = (stack: FleetStack) => + selection?.kind === "node" && + !layout.nodes.has(selection.id) && + stack.memberIds.includes(selection.id); const hoverProps = (target: FleetFocus) => ({ onPointerEnter: () => setHover(target), onPointerLeave: () => setHover(null), @@ -872,6 +1186,12 @@ const FleetScene = memo(function FleetScene({ const onKeyDown = (event: KeyboardEvent) => { const direction = ARROW_ROVE[event.key]; const from = (event.target as HTMLElement).closest("[data-fleet-node]"); + if (event.key === " " && from !== null && tickable(from.dataset.fleetNode ?? "")) { + // Space ticks the machine for a batch link; Enter still opens its details. + event.preventDefault(); + if (!event.repeat) onTick([from.dataset.fleetNode ?? ""], "toggle"); + return; + } if (direction === undefined || from === null) return; event.preventDefault(); const next = nextFleetNode(focusRects, from.dataset.fleetNode ?? "", direction); @@ -887,11 +1207,23 @@ const FleetScene = memo(function FleetScene({ type: "button" as const, "data-fleet-item": "", "data-fleet-node": target.id, - "aria-label": label, + "aria-label": selected.has(target.id) + ? gt("{label}, selected", { label, $context: "a machine ticked on a map" }) + : label, "aria-pressed": isSelected(target.kind, target.id), tabIndex: target.id === tabStop ? 0 : -1, style: { left: rect.x, top: rect.y, width: rect.width, height: rect.height }, - onClick: () => onSelect(isSelected(target.kind, target.id) ? null : target), + onClick: (event: MouseEvent) => { + if ((event.shiftKey || event.metaKey || event.ctrlKey) && tickable(target.id)) { + onTick([target.id], "toggle"); + return; + } + onSelect(isSelected(target.kind, target.id) ? null : target); + }, + // The keydown ticked the machine; without this the button would also click. + onKeyUp: (event: KeyboardEvent) => { + if (event.key === " " && tickable(target.id)) event.preventDefault(); + }, onFocus: (event: FocusEvent) => { setRoving(target.id); setHover(target); @@ -918,7 +1250,7 @@ const FleetScene = memo(function FleetScene({ const over = document .elementFromPoint(event.clientX, event.clientY) ?.closest("[data-fleet-node]")?.dataset.fleetNode; - return over !== undefined && fleetLinkOffer(graph, sourceId, over).kind === "link" + return over !== undefined && fleetLinkAction(graph, stacks, selected, sourceId, over) !== null ? over : null; }; @@ -971,14 +1303,14 @@ const FleetScene = memo(function FleetScene({ }); const dragSource = linkDrag === null ? undefined : layout.handles.get(linkDrag.sourceId); - const dragTarget = linkDrag?.overId ? nodeById.get(linkDrag.overId) : undefined; + const dragOver = linkDrag?.overId ?? null; return (
    @@ -1017,25 +1349,39 @@ const FleetScene = memo(function FleetScene({ {stacks.map((stack) => { const geometry = layout.stacks.get(stack.id); if (geometry === undefined) return null; - const level = accessLevel(stack.access); const onPath = stackLit(stack); - return ( - - - - - ); + return geometry.lines.map((line) => { + // A folded group of environments has one wire for all its routes, none in use. + if (line.access === null) { + return ( + + ); + } + const level = accessLevel(line.access); + const mine = lit === null || lit.nodes.has(line.sourceId ?? ""); + return ( + + + {line.arrow === null ? null : ( + + )} + + ); + }); })} {paintOrder.map((edge) => { const geometry = layout.links.get(edge.id); @@ -1129,6 +1475,14 @@ const FleetScene = memo(function FleetScene({ const badge = layout.links.get(edge.id)?.badge; if (!badge) return null; const target = { kind: "edge", id: edge.id } as const; + // With no clear place of its own, the name shows only while its link is the one in focus. + if ( + badge.onDemand && + !isSelected("edge", edge.id) && + !(focus?.kind === "edge" && focus.id === edge.id) + ) { + return null; + } return ( + {more === null ? null : ( + // The rest are never drawn: the details list every machine, and can be searched. + + )}
    ); })} @@ -1351,6 +1753,34 @@ const FleetScene = memo(function FleetScene({ ); } + if (rect.height < 32) { + // Inside an open group of environments: its name and state; the details have the rest. + const state = + node.kind === "connect" + ? connectAvailabilityText(node.availability, gt) + : connectionStateText(node, environmentById.get(node.id), false, gt); + return ( + + ); + } if (node.kind === "connect") { const status = `${gt("Not added")} · ${connectAvailabilityText(node.availability, gt)}`; return ( @@ -1479,10 +1909,31 @@ const FleetScene = memo(function FleetScene({
    ); })} + {[...selected].map((id) => { + const rect = layout.nodes.get(id); + if (rect === undefined) return null; + return ( + + + + + + ); + })} {linkDrag !== null ? ( - {dragTarget - ? offerText(dragOffer(dragTarget.id)!, dragTarget.label, gt) + {dragOver !== null + ? actionText(dragAction(dragOver), nodeById.get(dragOver)?.label ?? "", gt) : gt("Drop on a machine to link {source} to it", { source: nodeById.get(linkDrag.sourceId)?.label ?? "", })} diff --git a/apps/web/src/components/settings/EnvironmentsMapDetails.tsx b/apps/web/src/components/settings/EnvironmentsMapDetails.tsx index 81e8d38a8d590..2e1f8ae46772f 100644 --- a/apps/web/src/components/settings/EnvironmentsMapDetails.tsx +++ b/apps/web/src/components/settings/EnvironmentsMapDetails.tsx @@ -9,7 +9,8 @@ import { import * as DateTime from "effect/DateTime"; import { T, useGT, useMessages } from "gt-react"; import { ArrowRightIcon, ClockAlertIcon, PlusIcon, TriangleAlertIcon, XIcon } from "lucide-react"; -import { type ReactNode, useRef } from "react"; +import { LegendList } from "@legendapp/list/react"; +import { type ReactNode, useRef, useState } from "react"; import { environmentCatalog } from "~/connection/catalog"; import { cn } from "~/lib/utils"; @@ -18,6 +19,7 @@ import { peerLinkEnvironment } from "~/state/peerLinks"; import { useAtomCommand } from "~/state/use-atom-command"; import { accessConfig } from "../auth/ConnectAgentSurface"; import { Button } from "../ui/button"; +import { Input } from "../ui/input"; import { formatAccessTimestamp } from "./ConnectionsSettings.logic"; import { EnvironmentRow, EnvironmentTransportLabel } from "./EnvironmentRow"; import { @@ -113,6 +115,8 @@ export interface FleetDetailsProps { /** Why the account's T3 Connect machines are missing from the map, and how to ask again. */ readonly connectProblem: { readonly message: string; readonly retry: () => void } | null; readonly selection: FleetFocus | null; + /** The machine a map search landed on inside the selected stack. */ + readonly found: string | null; readonly onSelect: (focus: FleetFocus | null) => void; /** Opens the link flow from an environment, with no target picked yet. */ readonly onLinkFrom: (sourceId: string) => void; @@ -176,9 +180,12 @@ export function FleetDetails(props: FleetDetailsProps) {
    ) : stack ? ( props.onToggleStack(stack.id)} /> @@ -238,7 +245,7 @@ function FleetSummary({

    {canLink ? gt( - "Select a machine to manage it. To link two machines, drag the plus on an environment onto another machine, or press it to pick one.", + "Select a machine to manage it. To link two machines, drag the plus on an environment onto another machine, or press it to pick one. To link several at once, Shift-click machines or Shift-drag a box around them, then drag the plus onto one of them.", ) : gt("Select a machine to manage it.")}{" "} {gt( @@ -296,51 +303,218 @@ function LinkButton({ ); } +const MEMBER_ROW_HEIGHT = 28; +const MEMBER_LIST_ROWS = 9; + +interface StackMember { + readonly id: string; + readonly label: string; + /** What the row says about the machine: its link's access, or why it is not connected. */ + readonly detail: string; + readonly address: string | null; + /** The link that most wants attention, for a machine known through links. */ + readonly worst: FleetLinkEdge | null; +} + +/** + * Every machine a stack stands for, however many: the list mounts only the rows in view, and + * a machine's own details, with its actions, are one click away. + */ function StackDetails({ stack, + graph, links, - labelOf, + environments, + found, onSelect, onToggle, }: { readonly stack: FleetStack; + readonly graph: FleetGraph; readonly links: ReadonlyArray; - readonly labelOf: (id: string) => string; + readonly environments: ReadonlyArray; + /** The machine a map search landed on: the list opens narrowed to it. */ + readonly found: string | null; readonly onSelect: (focus: FleetFocus) => void; readonly onToggle: () => void; }) { const gt = useGT(); const m = useMessages(); - const members = stack.edgeIds.flatMap((id) => links.find((edge) => edge.id === id) ?? []); + const nodeById = new Map(graph.nodes.map((node) => [node.id, node])); + const [query, setQuery] = useState(found === null ? "" : (nodeById.get(found)?.label ?? "")); + const memberIds = new Set(stack.memberIds); + const incoming = new Map(); + for (const edge of links) { + if (!memberIds.has(edge.to)) continue; + const into = incoming.get(edge.to); + if (into === undefined) incoming.set(edge.to, [edge]); + else into.push(edge); + } + const environmentById = new Map( + environments.map((environment) => [environment.environmentId, environment]), + ); + const members = stack.memberIds.flatMap((id): StackMember[] => { + const node = nodeById.get(id); + if (node === undefined || node.kind === "client") return []; + if (node.kind === "target") { + const into = incoming.get(id) ?? []; + const worst = into.toSorted( + (left, right) => + Number(linkNeedsAttention(right.health)) - Number(linkNeedsAttention(left.health)), + )[0]; + return [ + { + id, + label: node.label, + detail: + into.length === 1 && worst !== undefined + ? m(accessConfig[worst.link.access].label) + : gt("{count, plural, one {# link in} other {# links in}}", { count: into.length }), + address: node.address, + worst: worst ?? null, + }, + ]; + } + const environment = environmentById.get(node.environmentId); + return [ + { + id, + label: node.label, + detail: + environment === undefined ? gt("Not added") : savedBackendStatus(environment, m).text, + address: null, + worst: null, + }, + ]; + }); + const needle = query.trim().toLocaleLowerCase(); + const shown = + needle === "" + ? members + : members.filter((member) => member.label.toLocaleLowerCase().includes(needle)); + const range = + stack.firstLabel === stack.lastLabel + ? stack.firstLabel + : `${stack.firstLabel} … ${stack.lastLabel}`; + const sources = stack.sources.map((source) => nodeById.get(source.sourceId)?.label ?? ""); + const [only] = stack.sources; + const hidden = stack.memberIds.length - stack.shownIds.length; return (

    - {stack.firstLabel} … {stack.lastLabel} + {range}
    -
      - {members.map((edge) => ( - - ))} -
    + {members.length > MEMBER_LIST_ROWS ? ( +
    +
    + setQuery(event.target.value)} + /> +
    + {needle === "" ? null : ( + + {gt("{shown} of {count}", { shown: shown.length, count: members.length })} + + )} +
    + ) : null} +
    + + data={shown} + keyExtractor={(member) => member.id} + estimatedItemSize={MEMBER_ROW_HEIGHT} + drawDistance={MEMBER_ROW_HEIGHT * MEMBER_LIST_ROWS} + recycleItems + className="h-full overscroll-contain" + renderItem={({ item }) => } + /> +
    ); } +function MemberButton({ + member, + onSelect, +}: { + readonly member: StackMember; + readonly onSelect: (focus: FleetFocus) => void; +}) { + const gt = useGT(); + const { worst } = member; + const attention = worst !== null && linkNeedsAttention(worst.health); + return ( + + ); +} + function LinkAnother({ node, onLinkFrom, @@ -448,7 +622,7 @@ function NodeDetails({ renderSavedEnvironment, renderConnectMachine, onAddEnvironment, -}: Omit & { +}: Omit & { readonly node: FleetNode; readonly links: ReadonlyArray; readonly onSelect: (focus: FleetFocus) => void; diff --git a/apps/web/src/components/settings/LinkSeveralEnvironments.tsx b/apps/web/src/components/settings/LinkSeveralEnvironments.tsx index 5cafb7e909c2a..6103a72623e4c 100644 --- a/apps/web/src/components/settings/LinkSeveralEnvironments.tsx +++ b/apps/web/src/components/settings/LinkSeveralEnvironments.tsx @@ -17,6 +17,7 @@ import * as Result from "effect/Result"; import { T, useGT, useMessages } from "gt-react"; import { useId, useRef, useState } from "react"; +import { useEnvironments } from "~/state/environments"; import { mintPairingCodeOn } from "~/state/peerPairingCode"; import { peerLinkEnvironment, useLinkableMachines } from "~/state/peerLinks"; import { useEnvironmentQuery } from "~/state/query"; @@ -34,27 +35,55 @@ import { DialogPanel, DialogPopup, DialogTitle, - DialogTrigger, } from "../ui/dialog"; import { LinkAccessPicker } from "./LinkAccessPicker"; const NO_MACHINES: ReadonlySet = new Set(); const NO_OUTCOMES: ReadonlyMap = new Map(); +export function LinkSeveralEnvironmentsAction({ + environmentId, +}: { + readonly environmentId: EnvironmentId; +}) { + const [open, setOpen] = useState(false); + return ( + <> + + + + ); +} + /** * Links the machines this app already reaches in one go. Each pairing code is * minted on its machine and passed straight to the linking environment; none * is ever held in state, shown, or logged. */ -export function LinkSeveralEnvironmentsAction({ +export function LinkSeveralEnvironmentsDialog({ environmentId, + open, + onOpenChange, + preset, }: { readonly environmentId: EnvironmentId; + readonly open: boolean; + readonly onOpenChange: (open: boolean) => void; + /** Machines picked before the dialog opened. Those a batch cannot link stay unticked. */ + readonly preset?: ReadonlyArray; }) { const gt = useGT(); const m = useMessages(); const formId = useId(); - const [open, setOpen] = useState(false); + const sourceLabel = useEnvironments().environments.find( + (environment) => environment.environmentId === environmentId, + )?.label; const machines = useLinkableMachines(environmentId, open); // The same shared list `useLinkableMachines` reads `linked` from. const links = useEnvironmentQuery( @@ -62,7 +91,7 @@ export function LinkSeveralEnvironmentsAction({ ); const linksState = linkListState(links); const writable = useEnvironmentsWithScope(machines, AuthAccessWriteScope); - const [selected, setSelected] = useState(NO_MACHINES); + const [selected, setSelected] = useState>(() => new Set(preset)); const [access, setAccess] = useState("approval-required"); const [outcomes, setOutcomes] = useState(NO_OUTCOMES); const [linking, setLinking] = useState(NO_MACHINES); @@ -81,9 +110,13 @@ export function LinkSeveralEnvironmentsAction({ const chosen = selectable.filter((machine) => selected.has(machine.environmentId)); const busy = linking.size > 0; const summary = linkBatchSummary(outcomes); + // Picked on the map, but only another machine's link names them: this app has no session there. + const unlisted = (preset ?? []).filter( + (id) => !candidates.some(({ machine }) => machine.environmentId === id), + ).length; const handleOpenChange = (next: boolean) => { - setOpen(next); + onOpenChange(next); if (!next) { setSelected(NO_MACHINES); setOutcomes(NO_OUTCOMES); @@ -135,17 +168,12 @@ export function LinkSeveralEnvironmentsAction({ handleOpenChange(next); }} > - - Link several… - - } - /> - Link several environments + {sourceLabel === undefined + ? gt("Link several environments") + : gt("Link several machines from {source}", { source: sourceLabel })} @@ -272,6 +300,14 @@ export function LinkSeveralEnvironmentsAction({
    )} + {unlisted > 0 ? ( +

    + {gt( + "{count, plural, one {# machine you picked is known only through a link, so it needs a pairing code. Link it on its own.} other {# machines you picked are known only through a link, so they need a pairing code. Link them one at a time.}}", + { count: unlisted }, + )} +

    + ) : null} {outcomes.size > 0 && !busy ? (

    {summary.failed.length === 0 diff --git a/apps/web/src/components/settings/environmentsMap.logic.test.ts b/apps/web/src/components/settings/environmentsMap.logic.test.ts index 567e7eee9a315..114b3b2769b22 100644 --- a/apps/web/src/components/settings/environmentsMap.logic.test.ts +++ b/apps/web/src/components/settings/environmentsMap.logic.test.ts @@ -8,9 +8,16 @@ import { fleetCanvasHeight, FLEET_CLIENT_NODE_ID, fleetEnvironmentNodeId, + FLEET_FOLD_ENVIRONMENTS_OVER, + FLEET_LANE_PITCH, + FLEET_STACK_SHOWN_MAX, fleetFocusRects, + fleetLinkAction, fleetLinkOffer, + fleetMoreNodeId, fleetNeighborhood, + fleetNodesInBox, + fleetSearch, fleetShapeKey, fleetStacks, fleetSummary, @@ -142,6 +149,24 @@ const sharedSetup = () => ]), ]); +/** Twenty environments, five of them folding by state, and 1000 machines two hosts both link to. */ +const hugeSetup = () => + build([ + environment("nucbox", [...vms(1000, "vm", { access: "full-access" }), link("cups")]), + environment("cups", vms(1000, "vm", { access: "full-access" })), + environment("mbp", [link("nucbox", { access: "auto" })]), + ...Array.from({ length: 5 }, (_, index) => environment(`gpu-${index + 1}`)), + ...Array.from({ length: 6 }, (_, index) => + environment(`lab-${index + 1}`, "unknown", { phase: "offline" }), + ), + ...Array.from({ length: 4 }, (_, index) => + environment(`old-${index + 1}`, "unknown", { enabled: false, phase: "available" }), + ), + ...Array.from({ length: 2 }, (_, index) => + environment(`legacy-${index + 1}`, "unknown", { phase: "unsupported" }), + ), + ]); + /** Points along a path the layout wrote: absolute M, H, V, Q and C only. */ function samplePath(d: string): Array<{ x: number; y: number }> { const points: Array<{ x: number; y: number }> = []; @@ -343,7 +368,73 @@ describe("fleetStacks", () => { stack.expanded, ]), ).toEqual([[`stack:${node("nucbox")}:full-access`, 41, 40, "fs-1", "fs-41", false]]); - expect(fleetStacks(graph, new Set([stacks[0]!.id]))[0]!.expanded).toBe(true); + const [open] = fleetStacks(graph, new Set([stacks[0]!.id])); + expect(open!.expanded).toBe(true); + // An open stack draws its first machines; the rest stay in the details. + expect(open!.shownIds).toEqual(open!.memberIds.slice(0, FLEET_STACK_SHOWN_MAX)); + }); + + it("folds machines that share the exact set of links in, and keeps other sets apart", () => { + const graph = build([ + environment("nucbox", [ + ...vms(8, "vm", { access: "full-access" }), + ...vms(6, "ro", { access: "read-only" }), + ...vms(5, "solo"), + ]), + environment("cups", [ + link("vm-1", { access: "full-access", status: "unreachable" }), + ...vms(8, "vm", { access: "full-access" }).slice(1), + // The same two hosts, but one at another access level: a set of its own. + ...vms(6, "ro", { access: "full-access" }), + ]), + ]); + const stacks = fleetStacks(graph, new Set()); + expect( + stacks.map((stack) => [ + stack.sources.map((source) => `${source.sourceId}:${source.access}`), + stack.memberIds.length, + stack.edgeIds.length, + stack.reachable, + ]), + ).toEqual([ + [[`${node("nucbox")}:full-access`, `${node("cups")}:full-access`], 8, 16, 7], + [[`${node("nucbox")}:read-only`, `${node("cups")}:full-access`], 6, 12, 6], + [[`${node("nucbox")}:approval-required`], 5, 5, 5], + ]); + }); + + it("folds unlinked environments by state once there are many, and never a linked or connected one", () => { + const few = build( + Array.from({ length: FLEET_FOLD_ENVIRONMENTS_OVER }, (_, index) => + environment(`lab-${index}`, "unknown", { phase: "offline" }), + ), + ); + expect(fleetStacks(few, new Set())).toEqual([]); + const graph = build( + [ + environment("nucbox", [link("linked-offline")]), + environment("linked-offline", "unknown", { phase: "offline" }), + environment("idle"), + environment("dialling", "unknown", { phase: "connecting" }), + ...Array.from({ length: 4 }, (_, index) => + environment(`lab-${index + 1}`, "unknown", { phase: index === 0 ? "error" : "offline" }), + ), + ...Array.from({ length: 3 }, (_, index) => + environment(`old-${index + 1}`, "unknown", { enabled: false, phase: "available" }), + ), + // Two is too few to be worth a stack. + environment("legacy-1", "unknown", { phase: "unsupported" }), + environment("legacy-2", "unknown", { phase: "unsupported" }), + ], + ["gpu-1", "gpu-2", "gpu-3"].map(connectMachine), + ); + expect( + fleetStacks(graph, new Set()).map((stack) => [stack.kind, stack.group, stack.memberIds]), + ).toEqual([ + ["environments", "offline", ["lab-1", "lab-2", "lab-3", "lab-4"].map(node)], + ["environments", "off", ["old-1", "old-2", "old-3"].map(node)], + ["environments", "not-added", ["gpu-1", "gpu-2", "gpu-3"].map(node)], + ]); }); it("leaves out a machine a second host links to, and a machine the client knows", () => { @@ -413,6 +504,83 @@ describe("fleetLinkOffer", () => { }); }); +describe("fleetLinkAction", () => { + const graph = build([ + environment("nucbox", [...vms(6, "fs")]), + environment("cups"), + environment("mbp", "unknown", { phase: "offline" }), + environment("vps", [], { canWriteAccess: false }), + ]); + const stacks = fleetStacks(graph, new Set()); + const batch = (environmentIds: ReadonlyArray) => ({ + kind: "batch", + sourceEnvironmentId: id("nucbox"), + environmentIds: environmentIds.map(id), + }); + + it("links to the selection when the drop lands on it, or the handle is pressed with one", () => { + const selected = new Set([node("cups"), node("mbp"), node("nucbox"), FLEET_CLIENT_NODE_ID]); + // The source and the client are never among the machines to link. + expect(fleetLinkAction(graph, stacks, selected, node("nucbox"), node("cups"))).toEqual( + batch(["cups", "mbp"]), + ); + expect(fleetLinkAction(graph, stacks, selected, node("nucbox"), null)).toEqual( + batch(["cups", "mbp"]), + ); + }); + + it("links one machine when the drop lands outside the selection, or nothing is selected", () => { + const selected = new Set([node("mbp")]); + expect(fleetLinkAction(graph, stacks, selected, node("nucbox"), node("cups"))).toMatchObject({ + kind: "single", + offer: { path: "code-less", target: { environmentId: id("cups") } }, + }); + expect(fleetLinkAction(graph, stacks, new Set(), node("nucbox"), null)).toEqual({ + kind: "single", + sourceEnvironmentId: id("nucbox"), + offer: null, + }); + // A selection of only the source is no batch. + expect( + fleetLinkAction(graph, stacks, new Set([node("nucbox")]), node("nucbox"), null), + ).toMatchObject({ kind: "single" }); + }); + + it("links to every machine of a stack dropped on, and offers nothing from a host that cannot link", () => { + expect(fleetLinkAction(graph, stacks, new Set(), node("cups"), stacks[0]!.id)).toEqual({ + ...batch(["fs-1", "fs-2", "fs-3", "fs-4", "fs-5", "fs-6"]), + sourceEnvironmentId: id("cups"), + }); + for (const source of ["mbp", "vps"]) { + expect(fleetLinkAction(graph, stacks, new Set(), node(source), stacks[0]!.id)).toBeNull(); + expect(fleetLinkAction(graph, stacks, new Set(), node(source), null)).toBeNull(); + } + expect(fleetLinkAction(graph, stacks, new Set(), node("nucbox"), node("nucbox"))).toBeNull(); + }); +}); + +describe("selecting and finding machines", () => { + it("selects the machines a box touches, and never the client or a stack", () => { + const graph = largeSetup(); + const layout = layoutFleetGraph(graph, fleetStacks(graph, new Set())); + const everything = { x: 0, y: 0, width: layout.width, height: layout.height }; + expect(fleetNodesInBox(layout, everything).toSorted()).toEqual( + [...layout.nodes.keys()].filter((key) => key !== FLEET_CLIENT_NODE_ID).toSorted(), + ); + const cups = layout.nodes.get(node("cups"))!; + expect(fleetNodesInBox(layout, { x: cups.x + 4, y: cups.y + 4, width: 2, height: 2 })).toEqual([ + node("cups"), + ]); + }); + + it("finds machines by name wherever they are drawn, in name order", () => { + const graph = largeSetup(); + expect(fleetSearch(graph, " FS-1 ").slice(0, 3)).toEqual(["fs-1", "fs-10", "fs-11"].map(node)); + expect(fleetSearch(graph, "")).toEqual([]); + expect(fleetSearch(graph, "this browser")).toEqual([]); + }); +}); + describe("fleetNeighborhood", () => { const graph = build([ environment("a", [link("b"), ...vms(5)]), @@ -468,10 +636,12 @@ describe("layoutFleetGraph", () => { const open = fleetStacks(large, new Set([stackId])); const layout = layoutFleetGraph(large, open); expectNoOverlap(layout, membersOf(open)); - expect(layout.nodes.size).toBe(53); + // Forty machines open to the first 24 and one card for the other 16, never forty cards. + expect(layout.nodes.size).toBe(13 + FLEET_STACK_SHOWN_MAX); const frame = layout.stacks.get(stackId)!.rect; - for (const member of open[0]!.memberIds) { - const rect = layout.nodes.get(member)!; + const more = fleetFocusRects(layout).get(fleetMoreNodeId(stackId))!; + expect(layout.nodes.has(open[0]!.memberIds[FLEET_STACK_SHOWN_MAX]!)).toBe(false); + for (const rect of [more, ...open[0]!.shownIds.map((member) => layout.nodes.get(member)!)]) { expect(rect.x).toBeGreaterThanOrEqual(frame.x); expect(rect.y).toBeGreaterThanOrEqual(frame.y); expect(rect.x + rect.width).toBeLessThanOrEqual(frame.x + frame.width); @@ -549,7 +719,7 @@ describe("layoutFleetGraph", () => { }); it("keeps two hosts' links into one machine apart, and every link clear of other boxes", () => { - for (const graph of [sharedSetup(), largeSetup()]) { + for (const graph of [sharedSetup(), largeSetup(), hugeSetup()]) { for (const expanded of [false, true]) { const closed = fleetStacks(graph, new Set()); const stacks = expanded @@ -560,7 +730,9 @@ describe("layoutFleetGraph", () => { const boxes = solidRects(layout); const drawn = [ ...[...layout.links].map(([key, geometry]) => ({ key, d: geometry.d })), - ...[...layout.stacks].map(([key, geometry]) => ({ key, d: geometry.d })), + ...[...layout.stacks].flatMap(([key, geometry]) => + geometry.lines.map((line) => ({ key, d: line.d })), + ), ]; for (const { key, d } of drawn) { for (const point of samplePath(d)) { @@ -584,6 +756,16 @@ describe("layoutFleetGraph", () => { expect(last!.y).toBe(geometry.arrow.y); arrivals.set(edge.to, [...(arrivals.get(edge.to) ?? []), geometry.arrow.y]); } + // A stack several hosts link to takes one line from each, each with its own entry. + for (const [stackId, geometry] of layout.stacks) { + for (const line of geometry.lines) { + if (line.arrow === null) continue; + if (geometry.lines.length > 1) { + expect(samplePath(line.d).at(-2)!.y).toBeCloseTo(line.arrow.y, 0); + } + arrivals.set(stackId, [...(arrivals.get(stackId) ?? []), line.arrow.y]); + } + } for (const [target, heights] of arrivals) { const sorted = heights.toSorted((left, right) => left - right); for (const [index, height] of sorted.entries()) { @@ -596,6 +778,105 @@ describe("layoutFleetGraph", () => { } }); + it("draws 1000 shared machines and 20 environments as a few stacks, open or closed", () => { + const graph = hugeSetup(); + const closed = fleetStacks(graph, new Set()); + expect(closed.map((stack) => [stack.kind, stack.memberIds.length])).toEqual([ + ["targets", 1000], + ["environments", 6], + ["environments", 4], + ]); + const layout = layoutFleetGraph(graph, closed); + expectNoOverlap(layout, membersOf(closed)); + // The client and the ten environments that stay cards: nothing per folded machine. + expect(layout.nodes.size).toBe(11); + expect(layout.links.size).toBe(2); + expect(layout.routes.size).toBe(10); + expect(layout.stacks.get(closed[0]!.id)!.lines.map((line) => line.sourceId)).toEqual([ + node("nucbox"), + node("cups"), + ]); + const open = fleetStacks(graph, new Set(closed.map((stack) => stack.id))); + const opened = layoutFleetGraph(graph, open); + expectNoOverlap(opened, membersOf(open)); + expect(opened.nodes.size).toBe(11 + FLEET_STACK_SHOWN_MAX + 6 + 4); + expect(layoutFleetGraph(graph, open)).toEqual(opened); + }); + + it("keeps every link into a card a full lane apart, and grows the card to hold them", () => { + const fan = build([ + ...["a", "b", "c", "d"].map((name) => environment(name, [link("e")])), + environment("e"), + ]); + const names = ["a", "b", "c", "d", "e"]; + const mesh = build( + names.map((name) => + environment( + name, + names.filter((other) => other !== name).map((other) => link(other)), + ), + ), + ); + for (const graph of [fan, mesh]) { + const layout = layoutFleetGraph(graph); + expectNoOverlap(layout, new Map()); + const ports = new Map(); + for (const edge of graph.edges) { + const geometry = edge.kind === "link" ? layout.links.get(edge.id) : undefined; + if (edge.kind !== "link" || geometry === undefined) continue; + const points = samplePath(geometry.d); + ports.set(edge.from, [...(ports.get(edge.from) ?? []), points[0]!.y]); + ports.set(edge.to, [...(ports.get(edge.to) ?? []), geometry.arrow.y]); + } + for (const [id, heights] of ports) { + const card = layout.nodes.get(id)!; + const sorted = heights.toSorted((left, right) => left - right); + expect(sorted[0]!).toBeGreaterThan(card.y); + expect(sorted.at(-1)!).toBeLessThan(card.y + card.height); + for (const [index, height] of sorted.entries()) { + if (index > 0) { + expect(height - sorted[index - 1]!, `at ${id}`).toBeGreaterThanOrEqual( + FLEET_LANE_PITCH, + ); + } + } + } + } + }); + + it("shows a link's name only on demand where it has no clear place", () => { + const names = ["a", "b", "c", "d", "e"]; + const graph = build( + names.map((name) => + environment( + name, + names.filter((other) => other !== name).map((other) => link(other)), + ), + ), + ); + const layout = layoutFleetGraph(graph); + const between = [...layout.links.values()]; + const always = between.flatMap(({ badge }) => (badge && !badge.onDemand ? [badge] : [])); + // Every link keeps a name; the ones always drawn sit on no other link's lane and no other name. + expect(between.every(({ badge }) => badge !== null)).toBe(true); + expect(always.length).toBeGreaterThan(0); + expect(always.length).toBeLessThan(between.length); + for (const [index, badge] of always.entries()) { + for (const other of always.slice(index + 1)) expect(overlaps(badge, other)).toBe(false); + const crossing = between.filter(({ badge: own, d }) => { + if (own === badge) return false; + return samplePath(d).some( + (point) => + point.x > badge.x + 0.5 && + point.x < badge.x + badge.width - 0.5 && + point.y > badge.y + 0.5 && + point.y < badge.y + badge.height - 0.5, + ); + }); + expect(crossing).toEqual([]); + } + }); + it("puts a machine several hosts link to between them, and one host's machines beside it", () => { const layout = layoutFleetGraph(sharedSetup()); const center = (name: string) => { @@ -629,6 +910,14 @@ describe("layoutFleetGraph", () => { expect(fleetShapeKey(before, fleetStacks(before, new Set([stacks[0]!.id])))).not.toBe( key(before), ); + // An environment that comes back leaves its folded group, with the group's id unchanged. + const labs = (firstPhase: FleetEnvironmentInput["phase"]) => + build( + Array.from({ length: 14 }, (_, index) => + environment(`lab-${index}`, "unknown", { phase: index === 0 ? firstPhase : "offline" }), + ), + ); + expect(key(labs("connecting"))).not.toBe(key(labs("offline"))); }); }); diff --git a/apps/web/src/components/settings/environmentsMap.logic.ts b/apps/web/src/components/settings/environmentsMap.logic.ts index cdc118ed66496..d60c47bcf5c06 100644 --- a/apps/web/src/components/settings/environmentsMap.logic.ts +++ b/apps/web/src/components/settings/environmentsMap.logic.ts @@ -302,59 +302,156 @@ export const linkNeedsAttention = (health: PeerLinkHealth) => health.kind !== "reachable" || health.expiresInDays !== null; const ACCESS_ORDER = AuthMcpClientAccess.literals; +/** The least distance between two lines entering one card: an arrowhead plus the heaviest line. */ +export const FLEET_LANE_PITCH = 12; const labelOrder = new Intl.Collator("en", { numeric: true, sensitivity: "base" }); +/** Why an environment with no links is folded away: what the client knows of it, never a probe. */ +export type FleetFoldGroup = "offline" | "off" | "update" | "not-added"; + /** - * Machines only one environment links to, at one access level, drawn as a single node. Forty - * VMs under one host cost one node and one line, and each link stays listed in the details. + * Machines drawn as a single node, each still listed in the details. `targets` are machines + * known only through links, all linked from the same environments at the same access levels: + * a thousand VMs under two hosts cost one node and two lines. `environments` are ones this app + * is not connected to and that take part in no link, grouped by why. */ export interface FleetStack { readonly id: string; - readonly sourceId: string; - readonly access: AuthMcpClientAccess; + readonly kind: "targets" | "environments"; + /** The environments linking to every member, uppermost first. Empty for `environments`. */ + readonly sources: ReadonlyArray<{ + readonly sourceId: string; + readonly access: AuthMcpClientAccess; + }>; + readonly group: FleetFoldGroup | null; /** In name order, so the first and last name the range. */ readonly memberIds: ReadonlyArray; readonly edgeIds: ReadonlyArray; + /** Members every one of whose links answers. */ readonly reachable: number; readonly firstLabel: string; readonly lastLabel: string; readonly expanded: boolean; + /** The members an open stack draws on the map; the rest are in the details only. */ + readonly shownIds: ReadonlyArray; } -/** Below this many machines a group is clearer drawn one by one. */ +/** Below this many machines a group of link targets is clearer drawn one by one. */ const FLEET_STACK_MIN = 5; +/** Environments fold only once the client knows more than this many. */ +export const FLEET_FOLD_ENVIRONMENTS_OVER = 12; +/** A folded group of environments needs at least this many; fewer stay as cards. */ +const FLEET_FOLD_MIN = 3; +/** An open stack draws this many machines at most, then one card for the rest. */ +export const FLEET_STACK_SHOWN_MAX = 24; + +export const fleetMoreNodeId = (stackId: string) => `more:${stackId}`; + +function foldGroup(node: FleetNode): FleetFoldGroup | null { + if (node.kind === "connect") return "not-added"; + if (node.kind !== "environment") return null; + if (node.phase === "unsupported") return "update"; + if (!node.enabled) return "off"; + // One still dialling stays a card: it is about to change, and the user is watching it. + return node.phase === "offline" || node.phase === "error" || node.phase === "available" + ? "offline" + : null; +} + +const FOLD_ORDER: ReadonlyArray = ["offline", "off", "update", "not-added"]; export function fleetStacks(graph: FleetGraph, expanded: ReadonlySet): FleetStack[] { const byId = new Map(graph.nodes.map((node) => [node.id, node])); + const order = new Map(graph.nodes.map((node, index) => [node.id, index])); + const label = (id: string) => byId.get(id)?.label ?? ""; + const byLabel = (left: string, right: string) => + labelOrder.compare(label(left), label(right)) || (left < right ? -1 : 1); const links = graph.edges.filter(isLinkEdge); - const incoming = new Map(); - for (const link of links) incoming.set(link.to, (incoming.get(link.to) ?? 0) + 1); - const groups = new Map(); + const incoming = new Map(); for (const link of links) { - if (byId.get(link.to)?.kind !== "target" || incoming.get(link.to) !== 1) continue; - const id = `stack:${link.from}:${link.link.access}`; - groups.set(id, [...(groups.get(id) ?? []), link]); + if (byId.get(link.to)?.kind !== "target") continue; + const into = incoming.get(link.to); + if (into === undefined) incoming.set(link.to, [link]); + else into.push(link); } - const label = (link: FleetLinkEdge) => byId.get(link.to)?.label ?? ""; - return [...groups] - .filter(([, members]) => members.length >= FLEET_STACK_MIN) - .map(([id, unsorted]) => { - const members = unsorted.toSorted( - (left, right) => - labelOrder.compare(label(left), label(right)) || (left.to < right.to ? -1 : 1), - ); - return { + // Keyed by the exact set of (host, access) links in, so every member is drawn by the same lines. + const groups = new Map>(); + for (const [id, unsorted] of incoming) { + const into = unsorted.toSorted((a, b) => order.get(a.from)! - order.get(b.from)!); + const key = `stack:${into.map((link) => `${link.from}:${link.link.access}`).join("|")}`; + const group = groups.get(key); + if (group === undefined) groups.set(key, [{ id, links: into }]); + else group.push({ id, links: into }); + } + const make = ( + id: string, + kind: FleetStack["kind"], + memberIds: ReadonlyArray, + rest: Pick, + ): FleetStack => ({ + id, + kind, + ...rest, + memberIds, + firstLabel: label(memberIds[0]!), + lastLabel: label(memberIds.at(-1)!), + expanded: expanded.has(id), + shownIds: + memberIds.length > FLEET_STACK_SHOWN_MAX + ? memberIds.slice(0, FLEET_STACK_SHOWN_MAX) + : memberIds, + }); + const stacks: FleetStack[] = []; + for (const [id, unsorted] of groups) { + if (unsorted.length < FLEET_STACK_MIN) continue; + const members = unsorted.toSorted((left, right) => byLabel(left.id, right.id)); + stacks.push( + make( id, - sourceId: members[0]!.from, - access: members[0]!.link.access, - memberIds: members.map((link) => link.to), - edgeIds: members.map((link) => link.id), - reachable: members.filter((link) => link.health.kind === "reachable").length, - firstLabel: label(members[0]!), - lastLabel: label(members.at(-1)!), - expanded: expanded.has(id), - }; - }); + "targets", + members.map((member) => member.id), + { + sources: members[0]!.links.map((link) => ({ + sourceId: link.from, + access: link.link.access, + })), + group: null, + edgeIds: members.flatMap((member) => member.links.map((link) => link.id)), + reachable: members.filter((member) => + member.links.every((link) => link.health.kind === "reachable"), + ).length, + }, + ), + ); + } + const hosts = graph.nodes.filter( + (node) => node.kind === "environment" || node.kind === "connect", + ); + if (hosts.length <= FLEET_FOLD_ENVIRONMENTS_OVER) return stacks; + const linked = new Set(links.flatMap((link) => [link.from, link.to])); + const routesOf = new Map(); + for (const edge of graph.edges) { + if (edge.kind !== "route") continue; + const routes = routesOf.get(edge.to); + if (routes === undefined) routesOf.set(edge.to, [edge.id]); + else routes.push(edge.id); + } + for (const group of FOLD_ORDER) { + const memberIds = hosts + .filter((host) => !linked.has(host.id) && foldGroup(host) === group) + .map((host) => host.id) + .toSorted(byLabel); + if (memberIds.length < FLEET_FOLD_MIN) continue; + stacks.push( + make(`fold:${group}`, "environments", memberIds, { + sources: [], + group, + edgeIds: memberIds.flatMap((id) => routesOf.get(id) ?? []), + reachable: 0, + }), + ); + } + return stacks; } export type FleetFocus = @@ -478,7 +575,11 @@ export function fleetShapeKey(graph: FleetGraph, stacks: ReadonlyArray edge.kind === "link" ? `${edge.id}\u0000${edge.link.access}` : edge.id, ), - ...stacks.map((stack) => `${stack.id}\u0000${stack.expanded}`), + // Which environments fold follows their state, which nothing above carries. + ...stacks.map( + (stack) => + `${stack.id}\u0000${stack.expanded}\u0000${stack.kind === "environments" ? stack.memberIds.join() : ""}`, + ), ].join("\n"); } @@ -500,27 +601,36 @@ export interface FleetRouteGeometry { readonly pill: FleetRect; } -/** Room for a link's access in words. `side` is the way it grows from the lane it sits on. */ -export type FleetLinkBadge = FleetRect & { readonly side: 1 | -1 }; +/** + * Room for a link's access in words. `side` is the way it grows from the lane it sits on. + * `onDemand` names one with no clear place: shown only while its link is in focus. + */ +export type FleetLinkBadge = FleetRect & { readonly side: 1 | -1; readonly onDemand: boolean }; export interface FleetLinkGeometry { readonly d: string; /** Arrowhead tip and the horizontal direction it points. */ readonly arrow: { readonly x: number; readonly y: number; readonly dir: 1 | -1 }; - /** - * Where a link between two environments names its access; a target's card shows its own. - * Null too where so many links pass that a name would sit on another's. - */ + /** Where a link between two environments names its access; a target's card shows its own. */ readonly badge: FleetLinkBadge | null; } +/** A line a stack draws for all its machines: one environment's links, or the client's routes. */ +export interface FleetStackLine { + readonly sourceId: string | null; + readonly access: AuthMcpClientAccess | null; + readonly d: string; + readonly arrow: FleetPoint | null; +} + export interface FleetStackGeometry { /** The whole footprint: the sheets of a closed stack, or the frame of an open one. */ readonly rect: FleetRect; /** The part that is the stack's control: the front sheet, or an open stack's header. */ readonly face: FleetRect; - readonly d: string; - readonly arrow: FleetPoint; + readonly lines: ReadonlyArray; + /** In an open stack, the card standing for the machines it does not draw. */ + readonly more: FleetRect | null; } export type FleetColumn = "client" | "environments" | "targets"; @@ -553,6 +663,8 @@ const CHIP = { width: 124, height: 26 }; const CHIP_GAP = 6; const FRAME_PAD = 8; const FRAME_HEADER = 30; +/** An open group of environments is two machines wide, and the column widens to hold it. */ +const FOLD_COLUMNS = 2; const GROUP_GAP = 28; const BAY_GAP = 12; const LANE_FIRST = 24; @@ -564,8 +676,11 @@ const ARROW_LENGTH = 6; const ENTRY_PITCH = 14; /** The channel left of the cards that links between environments keep to themselves. */ const BETWEEN = { first: 16, step: 14, last: 10 }; -/** Where those links meet a card's left edge: past its routes, the outermost lane innermost. */ -const LINK_PORT = { first: 4, pitch: 8, margin: 8 }; +/** + * Where those links meet a card's left edge: past its routes, the outermost lane innermost. + * The pitch clears an arrowhead and the heaviest line; a card grows to hold its ports. + */ +const LINK_PORT = { first: 6, pitch: FLEET_LANE_PITCH, margin: 8 }; const CORNER = 8; const BADGE = { width: 120, height: 20, overhang: 5, gap: 4 }; @@ -596,14 +711,41 @@ const sCurve = (x0: number, y0: number, x1: number, y1: number, fanX = x0) => { const frameColumns = (count: number) => Math.max(2, Math.min(4, Math.ceil(Math.sqrt(count / 2.2)))); +/** What an open stack draws: its shown machines, and one more card when some are left out. */ +const frameCells = (stack: FleetStack) => + stack.shownIds.length + Number(stack.memberIds.length > stack.shownIds.length); + +const frameHeight = (stack: FleetStack, columns: number, header: number) => + header + Math.ceil(frameCells(stack) / columns) * (CHIP.height + CHIP_GAP) - CHIP_GAP + FRAME_PAD; + +/** One line into a machine or a stack, from the environment holding the link. */ +interface BayEntry { + readonly key: string; + readonly from: string; +} + type BayItem = - | { readonly kind: "target"; readonly targetId: string; readonly incoming: FleetLinkEdge[] } - | { readonly kind: "stack"; readonly stack: FleetStack }; + | { + readonly kind: "target"; + readonly targetId: string; + readonly label: string; + readonly access: AuthMcpClientAccess; + readonly entries: ReadonlyArray; + } + | { + readonly kind: "stack"; + readonly stack: FleetStack; + readonly label: string; + readonly access: AuthMcpClientAccess; + readonly entries: ReadonlyArray; + }; + +type ColumnEntry = + | { readonly kind: "host"; readonly id: string; readonly host: FleetNode } + | { readonly kind: "fold"; readonly id: string; readonly stack: FleetStack }; interface FleetRow { - /** The host whose own machines these are; a row of shared machines has none. */ - readonly hostId: string | null; - readonly hosts: FleetNode[]; + readonly entries: ColumnEntry[]; readonly items: ReadonlyArray; } @@ -617,11 +759,18 @@ interface FleetLane { index: number; } +const stackLineKey = (stackId: string, sourceId: string) => `${stackId}<${sourceId}`; + +const pushTo = (into: Map, key: K, value: V) => { + const list = into.get(key); + if (list === undefined) into.set(key, [value]); + else list.push(value); +}; + /** - * This client, the machines it knows, and those seen only through a link: beside the one host - * linking to them, or in a row between the several that do. Links to those run right of the - * environments and links between two environments run left of them, each on its own lane with - * its own entry, so two hosts' links never share a stretch. Deterministic. + * Links to machines seen only through a link run right of the environments, links between two + * environments left of them, each on its own lane with its own entry. A stack takes one place + * whatever it holds, so the cost follows what is drawn. Deterministic. */ export function layoutFleetGraph( graph: FleetGraph, @@ -633,57 +782,72 @@ export function layoutFleetGraph( const linkGeometry = new Map(); const handles = new Map(); const links = graph.edges.filter(isLinkEdge); - const routeEdges = graph.edges.filter(isRouteEdge); const byId = new Map(graph.nodes.map((node) => [node.id, node])); + const folds = stacks.filter((stack) => stack.kind === "environments"); + const folded = new Set(folds.flatMap((stack) => stack.memberIds)); const hosts = graph.nodes.filter( - (node) => node.kind === "environment" || node.kind === "connect", + (node) => (node.kind === "environment" || node.kind === "connect") && !folded.has(node.id), ); const hostIndex = new Map(hosts.map((host, index) => [host.id, index])); const indexOf = (hostId: string) => hostIndex.get(hostId) ?? 0; + const routesOf = new Map(); + for (const edge of graph.edges) if (edge.kind === "route") pushTo(routesOf, edge.to, edge); const accessRank = (access: AuthMcpClientAccess) => -ACCESS_ORDER.indexOf(access); const labelOf = (id: string) => byId.get(id)?.label ?? ""; - const byLabel = (left: string, right: string) => - labelOrder.compare(labelOf(left), labelOf(right)) || (left < right ? -1 : 1); const stacked = new Set(stacks.flatMap((stack) => stack.edgeIds)); const incomingOf = new Map(); for (const link of links) { if (byId.get(link.to)?.kind !== "target" || stacked.has(link.id)) continue; - incomingOf.set(link.to, [...(incomingOf.get(link.to) ?? []), link]); + pushTo(incomingOf, link.to, link); } - const bayOf = new Map(); - const bandOf = new Map(); - const push = (into: Map, hostId: string, item: BayItem) => - into.set(hostId, [...(into.get(hostId) ?? []), item]); - for (const stack of stacks.toSorted((a, b) => accessRank(a.access) - accessRank(b.access))) { - push(bayOf, stack.sourceId, { kind: "stack", stack }); + const items: BayItem[] = []; + for (const stack of stacks) { + if (stack.kind !== "targets") continue; + items.push({ + kind: "stack", + stack, + label: stack.firstLabel, + access: stack.sources[0]!.access, + entries: stack.sources.map((source) => ({ + key: stackLineKey(stack.id, source.sourceId), + from: source.sourceId, + })), + }); } - const targets = [...incomingOf].map(([targetId, unsorted]) => ({ - targetId, + for (const [targetId, unsorted] of incomingOf) { // Top to bottom in the order of the hosts, so the upper line is the upper host's. - incoming: unsorted.toSorted((left, right) => indexOf(left.from) - indexOf(right.from)), - })); - for (const { targetId, incoming } of targets - .filter((target) => target.incoming.length === 1) + const incoming = unsorted.toSorted((left, right) => indexOf(left.from) - indexOf(right.from)); + items.push({ + kind: "target", + targetId, + label: labelOf(targetId), + access: incoming[0]!.link.access, + entries: incoming.map((link) => ({ key: link.id, from: link.from })), + }); + } + const itemId = (item: BayItem) => (item.kind === "stack" ? item.stack.id : item.targetId); + const byName = (left: BayItem, right: BayItem) => + labelOrder.compare(left.label, right.label) || (itemId(left) < itemId(right) ? -1 : 1); + const bayOf = new Map(); + const bandOf = new Map(); + for (const item of items + .filter((entry) => entry.entries.length === 1) .toSorted( (left, right) => - accessRank(left.incoming[0]!.link.access) - accessRank(right.incoming[0]!.link.access) || - byLabel(left.targetId, right.targetId), + Number(right.kind === "stack") - Number(left.kind === "stack") || + accessRank(left.access) - accessRank(right.access) || + byName(left, right), )) { - push(bayOf, incoming[0]!.from, { kind: "target", targetId, incoming }); + pushTo(bayOf, item.entries[0]!.from, item); } // Below the middle host of those linking to it: the shortest total reach, with ties going up. - const meanSource = (incoming: ReadonlyArray) => - incoming.reduce((sum, link) => sum + indexOf(link.from), 0) / incoming.length; - for (const { targetId, incoming } of targets - .filter((target) => target.incoming.length > 1) - .toSorted( - (left, right) => - meanSource(left.incoming) - meanSource(right.incoming) || - byLabel(left.targetId, right.targetId), - )) { - const anchor = incoming[Math.floor((incoming.length - 1) / 2)]!.from; - push(bandOf, anchor, { kind: "target", targetId, incoming }); + const meanSource = (item: BayItem) => + item.entries.reduce((sum, entry) => sum + indexOf(entry.from), 0) / item.entries.length; + for (const item of items + .filter((entry) => entry.entries.length > 1) + .toSorted((left, right) => meanSource(left) - meanSource(right) || byName(left, right))) { + pushTo(bandOf, item.entries[Math.floor((item.entries.length - 1) / 2)]!.from, item); } // A machine with no links rides beside a shared row instead of pushing the hosts further apart. @@ -691,15 +855,21 @@ export function layoutFleetGraph( const rows: FleetRow[] = []; let shared: FleetRow | null = null; for (const host of hosts) { + const entry: ColumnEntry = { kind: "host", id: host.id, host }; if (shared !== null && !linked.has(host.id)) { - shared.hosts.push(host); + shared.entries.push(entry); continue; } - rows.push({ hostId: host.id, hosts: [host], items: bayOf.get(host.id) ?? [] }); + rows.push({ entries: [entry], items: bayOf.get(host.id) ?? [] }); const band = bandOf.get(host.id); - shared = band === undefined ? null : { hostId: null, hosts: [], items: band }; + shared = band === undefined ? null : { entries: [], items: band }; if (shared !== null) rows.push(shared); } + for (const stack of folds) { + const entry: ColumnEntry = { kind: "fold", id: stack.id, stack }; + if (shared !== null) shared.entries.push(entry); + else rows.push({ entries: [entry], items: [] }); + } // Links between environments: shorter ones take the lanes nearer the cards, and two share a // lane when no host lies between both pairs, so a chain of links reads as one line. @@ -729,53 +899,78 @@ export function layoutFleetGraph( const portsOf = new Map(); for (const link of between) { const down = Math.sign(indexOf(link.to) - indexOf(link.from)); - for (const key of [`${link.from}:${down}`, `${link.to}:${-down}`]) { - portsOf.set(key, [...(portsOf.get(key) ?? []), link]); - } + pushTo(portsOf, `${link.from}:${down}`, link); + pushTo(portsOf, `${link.to}:${-down}`, link); } for (const ports of portsOf.values()) { ports.sort((left, right) => betweenLane.get(right.id)! - betweenLane.get(left.id)!); } - const routesInto = (hostId: string) => routeEdges.filter((edge) => edge.to === hostId).length; + const routesInto = (hostId: string) => routesOf.get(hostId)?.length ?? 0; const routesExtent = (hostId: string) => ((Math.max(1, routesInto(hostId)) - 1) * PORT_PITCH + PILL.height) / 2; - const cardHeight = (host: FleetNode) => { - const ports = Math.max( - portsOf.get(`${host.id}:-1`)?.length ?? 0, - portsOf.get(`${host.id}:1`)?.length ?? 0, - ); + // A card is as tall above and below its routes as the ports on that side need, so one with + // many links from one direction does not grow an empty half on the other. + const cardExtent = (host: FleetNode, side: 1 | -1) => { + const ports = portsOf.get(`${host.id}:${side}`)?.length ?? 0; const plain = host.kind === "connect" - ? OFFER.height - : Math.max(CARD.height, (routesInto(host.id) - 1) * PORT_PITCH + PILL.height + 20); + ? OFFER.height / 2 + : Math.max(CARD.height, (routesInto(host.id) - 1) * PORT_PITCH + PILL.height + 20) / 2; return ports === 0 ? plain : Math.max( plain, - 2 * - (routesExtent(host.id) + - LINK_PORT.first + - (ports - 1) * LINK_PORT.pitch + - LINK_PORT.margin), + routesExtent(host.id) + + LINK_PORT.first + + (ports - 1) * LINK_PORT.pitch + + LINK_PORT.margin, ); }; + const hostWidth = folds.some((stack) => stack.expanded) + ? FRAME_PAD * 2 + FOLD_COLUMNS * (CHIP.width + CHIP_GAP) - CHIP_GAP + : CARD.width; + const entryHeight = (entry: ColumnEntry) => + entry.kind === "host" + ? cardExtent(entry.host, -1) + cardExtent(entry.host, 1) + : entry.stack.expanded + ? frameHeight(entry.stack, FOLD_COLUMNS, FRAME_HEADER) + : STACK.height + STACK.lift; + /** Tall enough that each line in keeps its own entry. */ + const faceHeight = (item: BayItem, least: number) => + Math.max(least, 20 + (item.entries.length - 1) * ENTRY_PITCH); const itemSize = (item: BayItem) => { if (item.kind === "target") { - return { - width: TARGET.width, - height: Math.max(TARGET.height, 20 + (item.incoming.length - 1) * ENTRY_PITCH), - }; + return { width: TARGET.width, height: faceHeight(item, TARGET.height) }; } if (!item.stack.expanded) { - return { width: TARGET.width + STACK.lift, height: STACK.height + STACK.lift }; + return { + width: TARGET.width + STACK.lift, + height: faceHeight(item, STACK.height) + STACK.lift, + }; } - const columns = frameColumns(item.stack.memberIds.length); - const stackRows = Math.ceil(item.stack.memberIds.length / columns); + const columns = frameColumns(frameCells(item.stack)); return { width: FRAME_PAD * 2 + columns * (CHIP.width + CHIP_GAP) - CHIP_GAP, - height: FRAME_HEADER + stackRows * (CHIP.height + CHIP_GAP) - CHIP_GAP + FRAME_PAD, + height: frameHeight(item.stack, columns, faceHeight(item, FRAME_HEADER)), }; }; + /** Places an open stack's machines in its frame, and returns the card for the rest. */ + const fillFrame = ( + stack: FleetStack, + x: number, + top: number, + columns: number, + chipWidth: number, + ): FleetRect | null => { + const cell = (index: number): FleetRect => ({ + x: x + FRAME_PAD + (index % columns) * (chipWidth + CHIP_GAP), + y: top + Math.floor(index / columns) * (CHIP.height + CHIP_GAP), + width: chipWidth, + height: CHIP.height, + }); + stack.shownIds.forEach((memberId, index) => nodes.set(memberId, cell(index))); + return stack.memberIds.length > stack.shownIds.length ? cell(stack.shownIds.length) : null; + }; const pillX = CLIENT.width + WIRE; const cardX = @@ -784,54 +979,92 @@ export function layoutFleetGraph( (betweenLanes.length === 0 ? PILL_GAP : BETWEEN.last + (betweenLanes.length - 1) * BETWEEN.step + BETWEEN.first); - const cardRight = cardX + CARD.width; + const cardRight = cardX + hostWidth; // Heights first: which lanes the channel needs, and so how wide it is, follows from them. const placed: Array<{ readonly item: BayItem; readonly y: number; readonly size: { readonly width: number; readonly height: number }; - readonly hostId: string | null; }> = []; + const column: Array<{ readonly entry: ColumnEntry; readonly center: number }> = []; + /** Where a card's routes arrive and its links leave: its middle, unless one side grew. */ + const anchors = new Map(); let y = HEADER; for (const row of rows) { - const heights = row.hosts.map(cardHeight); + const heights = row.entries.map(entryHeight); const cardsHeight = heights.reduce((sum, height) => sum + height + GROUP_GAP, -GROUP_GAP); const sizes = row.items.map(itemSize); const bayHeight = sizes.reduce((sum, size) => sum + size.height + BAY_GAP, -BAY_GAP); const rowHeight = Math.max(cardsHeight, bayHeight); let cardY = y + (rowHeight - cardsHeight) / 2; - row.hosts.forEach((host, index) => { + row.entries.forEach((entry, index) => { const height = heights[index]!; - nodes.set(host.id, { x: cardX, y: cardY, width: CARD.width, height }); - if (host.kind === "environment") { - handles.set(host.id, { x: cardRight, y: cardY + height / 2 }); + if (entry.kind === "host") { + const anchor = cardY + cardExtent(entry.host, -1); + nodes.set(entry.id, { x: cardX, y: cardY, width: hostWidth, height }); + anchors.set(entry.id, anchor); + if (entry.host.kind === "environment") handles.set(entry.id, { x: cardRight, y: anchor }); + column.push({ entry, center: anchor }); + } else if (entry.stack.expanded) { + const more = fillFrame( + entry.stack, + cardX, + cardY + FRAME_HEADER, + FOLD_COLUMNS, + (hostWidth - FRAME_PAD * 2 - (FOLD_COLUMNS - 1) * CHIP_GAP) / FOLD_COLUMNS, + ); + stackGeometry.set(entry.id, { + rect: { x: cardX, y: cardY, width: hostWidth, height }, + face: { x: cardX, y: cardY, width: hostWidth, height: FRAME_HEADER }, + lines: [], + more, + }); + column.push({ entry, center: cardY + FRAME_HEADER / 2 }); + } else { + const face = { + x: cardX, + y: cardY + STACK.lift, + width: hostWidth - STACK.lift, + height: STACK.height, + }; + stackGeometry.set(entry.id, { + rect: { x: cardX, y: cardY, width: hostWidth, height }, + face, + lines: [], + more: null, + }); + column.push({ entry, center: face.y + face.height / 2 }); } cardY += height + GROUP_GAP; }); let itemY = y + (rowHeight - bayHeight) / 2; row.items.forEach((item, index) => { const size = sizes[index]!; - placed.push({ item, y: itemY, size, hostId: row.hostId }); + placed.push({ item, y: itemY, size }); itemY += size.height + BAY_GAP; }); y += rowHeight + GROUP_GAP; } const height = Math.max(HEADER + CLIENT.height, y - GROUP_GAP); - const centerOf = (id: string) => { - const rect = nodes.get(id)!; - return rect.y + rect.height / 2; - }; + const centerOf = (id: string) => anchors.get(id)!; - /** Where each link into a machine several hosts link to arrives. */ + /** The middle of what a line into the item points at: the machine, or the stack's control. */ + const faceOf = (item: BayItem, itemY: number, size: { readonly height: number }) => { + if (item.kind === "target") return { top: itemY, height: size.height }; + return item.stack.expanded + ? { top: itemY, height: faceHeight(item, FRAME_HEADER) } + : { top: itemY + STACK.lift, height: size.height - STACK.lift }; + }; + /** Where each line into the item arrives. */ const entryY = new Map(); - for (const { item, y: itemY, size, hostId } of placed) { - if (item.kind !== "target" || hostId !== null) continue; - item.incoming.forEach((link, index) => { + for (const { item, y: itemY, size } of placed) { + const face = faceOf(item, itemY, size); + item.entries.forEach((entry, index) => { entryY.set( - link.id, - itemY + size.height / 2 + (index - (item.incoming.length - 1) / 2) * ENTRY_PITCH, + entry.key, + face.top + face.height / 2 + (index - (item.entries.length - 1) / 2) * ENTRY_PITCH, ); }); } @@ -847,19 +1080,19 @@ export function layoutFleetGraph( const trunkOf = new Map(); const lanes: FleetLane[] = []; for (const [anchor, band] of bandOf) { - const incoming = band.flatMap((item) => (item.kind === "target" ? item.incoming : [])); - for (const hostId of new Set(incoming.map((link) => link.from))) { + const byHost = new Map(); + for (const item of band) for (const entry of item.entries) pushTo(byHost, entry.from, entry); + for (const [hostId, mine] of byHost) { const from = centerOf(hostId); - const mine = incoming.filter((link) => link.from === hostId); - const branches = mine.map((link) => entryY.get(link.id)!); + const branches = mine.map((entry) => entryY.get(entry.key)!); const lane: FleetLane = { id: `${hostId}>${anchor}`, from, - to: branches.reduce((far, y) => (Math.abs(y - from) > Math.abs(far - from) ? y : far)), + to: branches.reduce((far, at) => (Math.abs(at - from) > Math.abs(far - from) ? at : far)), branches, index: 0, }; - for (const link of mine) trunkOf.set(link.id, lane); + for (const entry of mine) trunkOf.set(entry.key, lane); lanes.push(lane); } } @@ -893,86 +1126,112 @@ export function layoutFleetGraph( const fanX = taken.length === 0 ? cardRight : cardRight + LANE_FIRST + taken.length * LANE_STEP; const bayX = fanX + LINK_RUN; const endX = bayX - ARROW_LENGTH; + const lineInto = (entry: BayEntry) => { + const trunk = trunkOf.get(entry.key); + const targetY = entryY.get(entry.key)!; + return { + d: + trunk === undefined + ? sCurve(cardRight, centerOf(entry.from), endX, targetY, fanX) + : elbowPath(cardRight, trunk.from, laneX(trunk), endX, targetY), + arrow: { x: bayX, y: targetY }, + }; + }; let width = fanX; - for (const { item, y: itemY, size, hostId } of placed) { + for (const { item, y: itemY, size } of placed) { width = Math.max(width, bayX + size.width); if (item.kind === "target") { nodes.set(item.targetId, { x: bayX, y: itemY, ...size }); - for (const link of item.incoming) { - const trunk = trunkOf.get(link.id); - const targetY = entryY.get(link.id) ?? itemY + size.height / 2; - linkGeometry.set(link.id, { - d: - trunk === undefined - ? sCurve(cardRight, centerOf(link.from), endX, targetY, fanX) - : elbowPath(cardRight, trunk.from, laneX(trunk), endX, targetY), - arrow: { x: bayX, y: targetY, dir: 1 }, + for (const entry of item.entries) { + const line = lineInto(entry); + linkGeometry.set(entry.key, { + d: line.d, + arrow: { ...line.arrow, dir: 1 }, badge: null, }); } continue; } - const originY = centerOf(hostId ?? item.stack.sourceId); - if (!item.stack.expanded) { - const face = { x: bayX, y: itemY + STACK.lift, width: TARGET.width, height: STACK.height }; - const faceY = face.y + face.height / 2; - stackGeometry.set(item.stack.id, { + const { stack } = item; + const face = faceOf(item, itemY, size); + const lines = item.entries.map((entry, index) => ({ + sourceId: entry.from, + access: stack.sources[index]!.access, + ...lineInto(entry), + })); + if (!stack.expanded) { + stackGeometry.set(stack.id, { rect: { x: bayX, y: itemY, ...size }, - face, - d: sCurve(cardRight, originY, endX, faceY, fanX), - arrow: { x: bayX, y: faceY }, + face: { x: bayX, y: face.top, width: TARGET.width, height: face.height }, + lines, + more: null, }); continue; } - const columns = frameColumns(item.stack.memberIds.length); - item.stack.memberIds.forEach((memberId, member) => { - nodes.set(memberId, { - x: bayX + FRAME_PAD + (member % columns) * (CHIP.width + CHIP_GAP), - y: itemY + FRAME_HEADER + Math.floor(member / columns) * (CHIP.height + CHIP_GAP), - ...CHIP, - }); - }); - const headerY = itemY + FRAME_HEADER / 2; - stackGeometry.set(item.stack.id, { + stackGeometry.set(stack.id, { rect: { x: bayX, y: itemY, ...size }, - face: { x: bayX, y: itemY, width: size.width, height: FRAME_HEADER }, - d: sCurve(cardRight, originY, endX, headerY, fanX), - arrow: { x: bayX, y: headerY }, + face: { x: bayX, y: itemY, width: size.width, height: face.height }, + lines, + more: fillFrame( + stack, + bayX, + itemY + face.height, + frameColumns(frameCells(stack)), + CHIP.width, + ), }); } - const hostCenters = hosts.map((host) => centerOf(host.id)); const clientCenterY = - hostCenters.length === 0 + column.length === 0 ? HEADER + CLIENT.height / 2 - : (hostCenters[0]! + hostCenters.at(-1)!) / 2; + : (column[0]!.center + column.at(-1)!.center) / 2; nodes.set(FLEET_CLIENT_NODE_ID, { x: 0, y: clientCenterY - CLIENT.height / 2, ...CLIENT, }); - // Wires leave the client a little apart, in the order they arrive, so they never cross. - const fan = Math.min(CLIENT.height - 20, (routeEdges.length - 1) * 4); - let wire = 0; - for (const host of hosts) { - const hostRoutes = routeEdges.filter((edge) => edge.to === host.id); - hostRoutes.forEach((edge, index) => { - const portY = centerOf(host.id) + (index - (hostRoutes.length - 1) / 2) * PORT_PITCH; - const startY = - clientCenterY + (routeEdges.length < 2 ? 0 : (wire / (routeEdges.length - 1) - 0.5) * fan); - wire += 1; - routes.set(edge.id, { - d: `${sCurve(CLIENT.width, startY, pillX, portY)}H${cardX}`, - pill: { x: pillX, y: portY - PILL.height / 2, ...PILL }, + // Wires leave the client a little apart, in the order they arrive, so they never cross. A + // folded group of environments gets one wire, whatever its machines' routes are. + const wires = column.flatMap( + ({ + entry, + center, + }): Array<{ entry: ColumnEntry; edge: FleetRouteEdge | null; portY: number }> => { + if (entry.kind === "fold") return [{ entry, edge: null, portY: center }]; + const hostRoutes = routesOf.get(entry.id) ?? []; + return hostRoutes.map((edge, index) => ({ + entry, + edge, + portY: center + (index - (hostRoutes.length - 1) / 2) * PORT_PITCH, + })); + }, + ); + const fan = Math.min(CLIENT.height - 20, (wires.length - 1) * 4); + wires.forEach((wire, index) => { + const startY = + clientCenterY + (wires.length < 2 ? 0 : (index / (wires.length - 1) - 0.5) * fan); + const d = `${sCurve(CLIENT.width, startY, pillX, wire.portY)}H${cardX}`; + if (wire.edge === null) { + const geometry = stackGeometry.get(wire.entry.id)!; + stackGeometry.set(wire.entry.id, { + ...geometry, + lines: [{ sourceId: null, access: null, d, arrow: null }], }); + return; + } + routes.set(wire.edge.id, { + d, + pill: { x: pillX, y: wire.portY - PILL.height / 2, ...PILL }, }); - } + }); // A link between environments names its access on its own lane, in a gap between two cards: // the one just past the environment it leaves, or the next one free. It grows away from the - // other lanes passing there; where it cannot, it may cover one, but never another name. + // other lanes passing there. Where no place is clear of every lane and every other name, the + // name is shown only while its link is in focus, so it never covers a line that is being read. const runs = between.map((link) => ({ link, x: cardX - BETWEEN.first - betweenLane.get(link.id)! * BETWEEN.step, @@ -990,12 +1249,13 @@ export function layoutFleetGraph( gaps.push(above.y + above.height + GROUP_GAP / 2, below.y - GROUP_GAP / 2); } if (!down) gaps.reverse(); - const place = (y: number, side: 1 | -1): FleetLinkBadge => ({ + const place = (at: number, side: 1 | -1): FleetLinkBadge => ({ x: side === 1 ? x - BADGE.overhang : x + BADGE.overhang - BADGE.width, - y: y - BADGE.height / 2, + y: at - BADGE.height / 2, width: BADGE.width, height: BADGE.height, side, + onDemand: false, }); const clearOfLanes = (badge: FleetLinkBadge) => !runs.some( @@ -1014,13 +1274,13 @@ export function layoutFleetGraph( other.y < badge.y + badge.height + BADGE.gap && badge.y < other.y + other.height + BADGE.gap, ); - const options = gaps.flatMap((y) => [place(y, 1), place(y, -1)]).filter(clearOfNames); - const badge = options.find(clearOfLanes) ?? options[0] ?? null; - if (badge !== null) badges.push(badge); + const options = gaps.flatMap((at) => [place(at, 1), place(at, -1)]); + const clear = options.find((option) => clearOfNames(option) && clearOfLanes(option)); + if (clear !== undefined) badges.push(clear); linkGeometry.set(link.id, { d: elbowPath(cardX, run.from, x, cardX - ARROW_LENGTH, run.to), arrow: { x: cardX, y: run.to, dir: 1 }, - badge, + badge: clear ?? { ...options[0]!, onDemand: true }, }); } @@ -1032,7 +1292,7 @@ export function layoutFleetGraph( handles, columns: [ { id: "client", x: 0 }, - ...(hosts.length > 0 ? [{ id: "environments" as const, x: cardX }] : []), + ...(column.length > 0 ? [{ id: "environments" as const, x: cardX }] : []), ...(placed.length > 0 ? [{ id: "targets" as const, x: bayX }] : []), ], width, @@ -1040,12 +1300,93 @@ export function layoutFleetGraph( }; } -/** What the arrow keys move between: every machine drawn, and each stack's control. */ +/** What the arrow keys move between: every machine drawn, and each stack's controls. */ export function fleetFocusRects(layout: FleetLayout): ReadonlyMap { - return new Map([ - ...layout.nodes, - ...[...layout.stacks].map(([id, geometry]) => [id, geometry.face] as const), - ]); + const rects = new Map(layout.nodes); + for (const [id, geometry] of layout.stacks) { + rects.set(id, geometry.face); + if (geometry.more !== null) rects.set(fleetMoreNodeId(id), geometry.more); + } + return rects; +} + +/** The machines drawn on their own that a selection box touches. */ +export function fleetNodesInBox(layout: FleetLayout, box: FleetRect): string[] { + const inside: string[] = []; + for (const [id, rect] of layout.nodes) { + if ( + id !== FLEET_CLIENT_NODE_ID && + rect.x < box.x + box.width && + box.x < rect.x + rect.width && + rect.y < box.y + box.height && + box.y < rect.y + rect.height + ) { + inside.push(id); + } + } + return inside; +} + +/** What pressing or dropping an environment's link handle starts. */ +export type FleetLinkAction = + /** The batch flow, opened on these machines. Which of them it can link is its own to say. */ + | { + readonly kind: "batch"; + readonly sourceEnvironmentId: EnvironmentId; + readonly environmentIds: ReadonlyArray; + } + /** The single link flow; `offer` is null when no machine was named. */ + | { + readonly kind: "single"; + readonly sourceEnvironmentId: EnvironmentId; + readonly offer: Extract | null; + }; + +/** + * A drop on a stack links to its machines; a drop on a selected machine, or a press of the + * handle while others are selected, links to the selection. Anything else is one link. + */ +export function fleetLinkAction( + graph: FleetGraph, + stacks: ReadonlyArray, + selected: ReadonlySet, + sourceId: string, + targetId: string | null, +): FleetLinkAction | null { + const byId = new Map(graph.nodes.map((node) => [node.id, node])); + const source = byId.get(sourceId); + if (source?.kind !== "environment" || source.linking !== "ready") return null; + const sourceEnvironmentId = source.environmentId; + const batch = (picked: Iterable): FleetLinkAction | null => { + const environmentIds = new Set(); + for (const id of picked) { + const node = byId.get(id); + if (node === undefined || node.kind === "client" || node.id === source.id) continue; + environmentIds.add(node.environmentId); + } + return environmentIds.size === 0 + ? null + : { kind: "batch", sourceEnvironmentId, environmentIds: [...environmentIds] }; + }; + const stack = targetId === null ? undefined : stacks.find((entry) => entry.id === targetId); + if (stack !== undefined) return batch(stack.memberIds); + if (targetId === null || selected.has(targetId)) { + const picked = batch(selected); + if (picked !== null) return picked; + } + if (targetId === null) return { kind: "single", sourceEnvironmentId, offer: null }; + const offer = fleetLinkOffer(graph, sourceId, targetId); + return offer.kind === "link" ? { kind: "single", sourceEnvironmentId, offer } : null; +} + +/** Machines whose name holds the query, drawn or folded, in name order. */ +export function fleetSearch(graph: FleetGraph, query: string): string[] { + const needle = query.trim().toLocaleLowerCase(); + if (needle === "") return []; + return graph.nodes + .filter((node) => node.kind !== "client" && node.label.toLocaleLowerCase().includes(needle)) + .toSorted((left, right) => labelOrder.compare(left.label, right.label)) + .map((node) => node.id); } export type FleetDirection = "up" | "down" | "left" | "right"; diff --git a/apps/web/src/i18n/translations/de.json b/apps/web/src/i18n/translations/de.json index 113e5451965e8..564d0c9a2f353 100644 --- a/apps/web/src/i18n/translations/de.json +++ b/apps/web/src/i18n/translations/de.json @@ -5781,14 +5781,13 @@ "b6a29fff7c7c0808": "Niemand", "54420465784bb1bd": "Ältere Kommentare laden", "9d82ebf35bfb4043": "Hier ist noch nichts passiert.", - "1cf216566c1ee064": "Projekt nicht verfügbar", "b5ddadeb0810688c": "Status", "93c1fc19d9bf1db0": "Beteiligung", "d5a8b335d88b65bc": "{hidden} ausgeblendet", "2160067266a61dd8": "Beliebig", "cd4ec4acf33c65b9": "{count, plural, one {{count} Label} other {{count} Labels}}", "bfd20acb8b7dee6b": "Beliebig", - "ad208e3e32c85029": "Alle ausblenden", + "aead644e2cf1233f": "Alle anzeigen", "77ce79d865716719": "Keine passenden Projekte.", "af7eb4f9c7f0f575": "Filter", "08247dd39b0c85ff": "Zugewiesene Person", @@ -6463,7 +6462,6 @@ "64d0189be492147c": "Check-Details können nicht geöffnet werden", "600347ca50400a54": "Checks werden geladen…", "1b381201aba745c2": "Keine Checks gemeldet", - "aead644e2cf1233f": "Alle anzeigen", "a6d75a4380173c60": "Checks öffnen: {summary}", "be3d1766bad18693": "Checks: {summary}", "425e4a3d6c5c2867": "{count, plural, one {{count} fehlgeschlagen} other {{count} fehlgeschlagen}}", @@ -8353,6 +8351,15 @@ "219bc3612d646a01": "Route entfernen", "b2877341429675aa": "über {route}", "537e7cf4df7a0af1": "Dieser Browser", + "692153ec34a9a7bd": "Einen Rechner auf der Karte finden", + "288ab5c45a9539a3": "Rechner finden", + "c263859f8bcc7b1c": "Kein Rechner mit diesem Namen", + "1bcc5f963ef39c7b": "{count, plural, one {# Treffer. Enter springt dorthin} other {# Treffer. Enter springt zum ersten}}", + "2bb44d78cb85c097": "{count, plural, one {# ausgewählt} other {# ausgewählt}}", + "bcf01a26153f6425": "Auswahl aufheben", + "d18ad97175bd2028": "Umschalt-Klick oder Umschalt-Ziehen wählt mehrere aus", + "d9665bd69e7fd4f4": "Mehrere verknüpfen…", + "8d5882faf1e5fb96": "Von {source}", "601e0c9e6a45a54f": "Karte einpassen", "feec58f6653f5673": "So liest man die Linien", "e459bd5c53a993e2": "Route in Verwendung", @@ -8363,8 +8370,9 @@ "235b3e270162f18b": "Verknüpfung, kräftiger bei mehr Zugriff", "c326a7e66bab5da0": "Deine Umgebungen", "86222507d918084b": "Über eine Verknüpfung erreicht", + "afc01d2ee8048b4b": "{label}, ausgewählt", "aa34f7bc5aaf6bb0": "Karte deiner Rechner", - "3b61cc529ae01681": "Mit den Pfeiltasten wechselst du zwischen Rechnern. Die Eingabetaste öffnet die Details eines Rechners mit seinen Routen und Verknüpfungen. Tab führt von einer Umgebung zu ihrer Verknüpfen-Schaltfläche. Plus und Minus zoomen, Null passt die Karte ein.", + "edb6cb27ff7f446b": "Mit den Pfeiltasten wechselst du zwischen Rechnern. Die Eingabetaste öffnet die Details eines Rechners mit seinen Routen und Verknüpfungen. Die Leertaste wählt einen Rechner aus, um mehrere auf einmal zu verknüpfen. Tab führt von einer Umgebung zu ihrer Verknüpfen-Schaltfläche. Plus und Minus zoomen, Null passt die Karte ein.", "753b4a8ec5521c98": "Verknüpfung von {source} zu {target}: {summary}", "bb6a74a47a3852c7": "Abgelaufen", "3076117d81a9c1c0": "Antwortet nicht", @@ -8372,15 +8380,21 @@ "8971602c42718d72": "Erreichbar", "1b256867b95ee022": "{days, plural, one {Läuft in {days} Tag ab} other {Läuft in {days} Tagen ab}}", "aae31cf2017dab5b": "Öffentlich", + "b4f6c341033a3c91": "Ausgeschaltet", + "960255d19109dcd9": "Update nötig", "19f6a3505837907d": "{access}. {reachable} von {count} erreichbar", - "325f85fe7ade4efd": "{first} bis {last}, {count} Rechner, verknüpft von {source}. {summary}", + "6f8f71c20ba546af": "{reachable} von {count} erreichbar, von {sources} Umgebungen", + "0d731c951986fac8": "{group}: {count} Umgebungen ohne Verknüpfungen, {range}", + "5feb96736385be01": "{range}, {count} Rechner, verknüpft von {sources}. {summary}", "35b783cfc817cb6f": "Diese Rechner einklappen", + "14dcd5c89fd0f67f": "Die ersten {shown} Rechner auf der Karte zeigen", "b8f2d917d3a592df": "Jeden Rechner auf der Karte zeigen", + "ddc2106217bbde2d": "und {count} weitere", "b0d81579d80fb94a": "nur über eine Verknüpfung bekannt", "2d3dc930fd1cdd55": "von {source}: {summary}", "911bc3bcde1aba3b": "{count, plural, one {# eingehende Verknüpfung} other {# eingehende Verknüpfungen}}", - "0fecb34fd1ae531f": "{label}, in deinem T3-Connect-Konto, dieser App nicht hinzugefügt. {status}", "930f9e01fc4591b4": "Aus", + "0fecb34fd1ae531f": "{label}, in deinem T3-Connect-Konto, dieser App nicht hinzugefügt. {status}", "4a84ad9b7f8e4909": "Verknüpfungen werden geladen…", "9c88c8e716354091": "Verknüpfungen konnten nicht geladen werden", "f9733c7b64c6f5d9": "Verknüpfte Umgebungen sind aus", @@ -8389,6 +8403,7 @@ "5d252c8bbc3b24d0": "{status}. Verknüpfungen unbekannt", "ec2c609c028d63b4": "{label} mit einem anderen Rechner verknüpfen", "0a72d33781010657": "Damit ist keine Verknüpfung möglich", + "22d1944bbd4d00b4": "{count, plural, one {Mit # Rechner verknüpfen. Auswahl im nächsten Schritt} other {Mit # Rechnern verknüpfen. Auswahl im nächsten Schritt}}", "4f10f6354f38106e": "Verknüpfung zu {target} erneuern. Kein Kopplungscode nötig", "5a25bfd7c3a8e4b4": "Mit {target} verknüpfen. Kein Kopplungscode nötig", "b4b893b9c210e0ba": "Verknüpfung zu {target} erneuern. Benötigt einen Kopplungscode von dort", @@ -8397,13 +8412,20 @@ "7f045c3477f783cc": "{count, plural, one {# Verknüpfung braucht Aufmerksamkeit.} other {# Verknüpfungen brauchen Aufmerksamkeit.}}", "d53ada50331e6041": "{machines, plural, one {# Rechner} other {# Rechner}}, {links, plural, =0 {keine Verknüpfungen} one {# Verknüpfung} other {# Verknüpfungen}}", "706ac721bf99036c": "{machines, plural, one {# Rechner} other {# Rechner}}", - "61287d7320b20cad": "Wähle einen Rechner aus, um ihn zu verwalten. Um zwei Rechner zu verknüpfen, ziehe das Plus einer Umgebung auf einen anderen Rechner oder drücke es, um einen auszuwählen.", + "8cb29b21fc19a505": "Wähle einen Rechner aus, um ihn zu verwalten. Um zwei Rechner zu verknüpfen, ziehe das Plus einer Umgebung auf einen anderen Rechner oder drücke es, um einen auszuwählen. Um mehrere auf einmal zu verknüpfen, klicke Rechner mit gedrückter Umschalttaste an oder ziehe mit Umschalt einen Rahmen um sie und ziehe dann das Plus auf einen davon.", "743b93767ec7ebf8": "Wähle einen Rechner aus, um ihn zu verwalten.", "718e9f7ff8f48497": "Eine Verknüpfung erreicht einen Rechner und endet dort. Sie reicht nicht weiter zu den Rechnern, mit denen dieser verknüpft ist.", "3e8441af6148878f": "Läuft am {date} ab", + "4daaa2288b63a801": "{count, plural, one {# eingehende Verknüpfung} other {# eingehende Verknüpfungen}}", + "5e7ed49a9fbfbcb4": "{count, plural, one {# Umgebung} other {# Umgebungen}} ohne Verknüpfungen, nicht verbunden", "786d62572ebcebdf": "{count, plural, one {# Rechner} other {# Rechner}}, verknüpft von {source}, {access}, {reachable} erreichbar", + "7762644204376a63": "{count, plural, one {# Rechner} other {# Rechner}}, jeweils verknüpft von {sources}, {reachable} erreichbar", "166aac696c3ec460": "Auf der Karte einklappen", + "d4e68210142d6734": "Die ersten {shown} auf der Karte zeigen", "069d8ba658617f30": "Jeden auf der Karte zeigen", + "c7e1635b229d7249": "Diese Rechner nach Namen filtern", + "52a07016be1bea99": "Nach Namen filtern", + "a7061489aec79ba8": "{shown} von {count}", "eefe994332120d82": "Verknüpfen", "9aca4025e20bef31": "Mit {connected} von {total} Umgebungen verbunden", "7f3ea6eba251a165": "Jede Linie von hier ist eine gespeicherte Route zu einer Umgebung. Die Karte zeigt die Verknüpfungen der Umgebungen, mit denen diese App verbunden ist; eine nicht erreichbare Umgebung kann Verknüpfungen haben, die nicht eingezeichnet sind.", @@ -8752,15 +8774,17 @@ "03ce9bea5f88ddbd": "Diese App kann nicht bestätigen, dass es einer deiner Rechner ist. Der eingefügte Kopplungscode wird dorthin gesendet.", "30b696434167411f": "Verknüpft", "80bbda74ee500b82": "Rechner", + "4e7b0a3ced2d0f97": "Mehrere Umgebungen verknüpfen", + "0f3a6d9b3350d800": "Mehrere Rechner von {source} aus verknüpfen", "e5ac7abeaeb78750": "Nichts auswählen", "ab520df47bca22d2": "Alles auswählen", "3a57c9bbcd12529f": "Es konnte nicht geprüft werden, welche Rechner bereits verknüpft sind, daher kann keiner ausgewählt werden: {error}", "78ccf685018ef797": "Verknüpft", + "e82fad1c68674065": "{count, plural, one {# ausgewählter Rechner ist nur über eine Verknüpfung bekannt und braucht daher einen Kopplungscode. Verknüpfe ihn einzeln.} other {# ausgewählte Rechner sind nur über eine Verknüpfung bekannt und brauchen daher einen Kopplungscode. Verknüpfe sie einzeln.}}", "87433cf138dc3e2c": "{linked, plural, one {# Rechner verknüpft.} other {# Rechner verknüpft.}}", "d044bb95248da10c": "{linked} von {total} verknüpft. Die fehlgeschlagenen bleiben ausgewählt, damit du es erneut versuchen kannst.", "d2fbaffe08b6cf60": "{count, plural, one {# Rechner verknüpfen} other {# Rechner verknüpfen}}", "8e3378b526d615f4": "Mehrere verknüpfen…", - "7f8d6d1af69829d8": "Mehrere Umgebungen verknüpfen", "b550d04490078bda": "Agenten hier können dann auf jedem ausgewählten Rechner Threads starten, ihnen Nachrichten senden und auf sie warten. Jede Verknüpfung erscheint unter „Autorisierte Clients“ in „Freigabe & Zugriff“ des jeweiligen Rechners und kann dort widerrufen werden.", "c2553b323479499a": "Diese App kennt keine anderen Rechner. Füge sie zuerst unter „Umgebungen“ hinzu.", "18b1d4d42b945b34": "Rechner", @@ -9817,6 +9841,7 @@ "51497bd401292062": "Gedrückt halten", "9d6cc6ac23312071": "Doppelt drücken", "f001fa7b329c8fbf": "Erfolgreiche ausblenden", + "ad208e3e32c85029": "Alle ausblenden", "c80e4bb3201efd71": "Zen", "0cb9ffcd1fb46b0c": "Nur Status", "cf0f7fc3df26fa75": "Status und Nachrichten", @@ -10026,6 +10051,7 @@ "573ea5fdf293a9d6": "Alle Checkouts", "470ad8c54049d1e1": "Checkouts durchsuchen", "7e2dfdd9f97fc027": "Projektbereich", + "1cf216566c1ee064": "Projekt nicht verfügbar", "c1b8c351aa90f319": [ { "t": "span", diff --git a/apps/web/src/i18n/translations/en.json b/apps/web/src/i18n/translations/en.json index 3fb9be66826b5..76e1964503b36 100644 --- a/apps/web/src/i18n/translations/en.json +++ b/apps/web/src/i18n/translations/en.json @@ -5782,14 +5782,13 @@ "b6a29fff7c7c0808": "None", "54420465784bb1bd": "Load older comments", "9d82ebf35bfb4043": "Nothing has happened here yet.", - "1cf216566c1ee064": "Unavailable project", "b5ddadeb0810688c": "State", "93c1fc19d9bf1db0": "Involvement", "d5a8b335d88b65bc": "{hidden} hidden", "2160067266a61dd8": "Any", "cd4ec4acf33c65b9": "{count, plural, one {{count} label} other {{count} labels}}", "bfd20acb8b7dee6b": "Anyone", - "ad208e3e32c85029": "Hide all", + "aead644e2cf1233f": "Show all", "77ce79d865716719": "No matching projects.", "af7eb4f9c7f0f575": "Filters", "08247dd39b0c85ff": "Assignee", @@ -6470,7 +6469,6 @@ "64d0189be492147c": "Unable to open check details", "600347ca50400a54": "Loading checks…", "1b381201aba745c2": "No checks reported", - "aead644e2cf1233f": "Show all", "a6d75a4380173c60": "Open checks: {summary}", "be3d1766bad18693": "Checks: {summary}", "425e4a3d6c5c2867": "{count, plural, one {{count} failed} other {{count} failed}}", @@ -8361,6 +8359,15 @@ "219bc3612d646a01": "Remove route", "b2877341429675aa": "via {route}", "537e7cf4df7a0af1": "This browser", + "692153ec34a9a7bd": "Find a machine on the map", + "288ab5c45a9539a3": "Find a machine", + "c263859f8bcc7b1c": "No machine by that name", + "1bcc5f963ef39c7b": "{count, plural, one {# match. Enter goes to it} other {# matches. Enter goes to the first}}", + "2bb44d78cb85c097": "{count, plural, one {# selected} other {# selected}}", + "bcf01a26153f6425": "Clear", + "d18ad97175bd2028": "Shift-click or Shift-drag to select several", + "d9665bd69e7fd4f4": "Link several…", + "8d5882faf1e5fb96": "From {source}", "601e0c9e6a45a54f": "Fit the map to view", "feec58f6653f5673": "How to read the lines", "e459bd5c53a993e2": "Route in use", @@ -8371,8 +8378,9 @@ "235b3e270162f18b": "Link, heavier with more access", "c326a7e66bab5da0": "Your environments", "86222507d918084b": "Reached through a link", + "afc01d2ee8048b4b": "{label}, selected", "aa34f7bc5aaf6bb0": "Map of your machines", - "3b61cc529ae01681": "Arrow keys move between machines. Enter opens a machine's details, with its routes and links. Tab from an environment reaches its link button. Plus and minus zoom, zero fits the map.", + "edb6cb27ff7f446b": "Arrow keys move between machines. Enter opens a machine's details, with its routes and links. Space selects a machine for linking several at once. Tab from an environment reaches its link button. Plus and minus zoom, zero fits the map.", "753b4a8ec5521c98": "Link from {source} to {target}: {summary}", "bb6a74a47a3852c7": "Expired", "3076117d81a9c1c0": "Not answering", @@ -8380,15 +8388,21 @@ "8971602c42718d72": "Reachable", "1b256867b95ee022": "{days, plural, one {Expires in {days} day} other {Expires in {days} days}}", "aae31cf2017dab5b": "Public", + "b4f6c341033a3c91": "Switched off", + "960255d19109dcd9": "Need an update", "19f6a3505837907d": "{access}. {reachable} of {count} reachable", - "325f85fe7ade4efd": "{first} to {last}, {count} machines linked from {source}. {summary}", + "6f8f71c20ba546af": "{reachable} of {count} reachable, from {sources} environments", + "0d731c951986fac8": "{group}: {count} environments with no links, {range}", + "5feb96736385be01": "{range}, {count} machines linked from {sources}. {summary}", "35b783cfc817cb6f": "Collapse these machines", + "14dcd5c89fd0f67f": "Show the first {shown} machines on the map", "b8f2d917d3a592df": "Show each machine on the map", + "ddc2106217bbde2d": "and {count} more", "b0d81579d80fb94a": "known only through a link", "2d3dc930fd1cdd55": "from {source}: {summary}", "911bc3bcde1aba3b": "{count, plural, one {# link in} other {# links in}}", - "0fecb34fd1ae531f": "{label}, on your T3 Connect account, not added to this app. {status}", "930f9e01fc4591b4": "Off", + "0fecb34fd1ae531f": "{label}, on your T3 Connect account, not added to this app. {status}", "4a84ad9b7f8e4909": "Loading links…", "9c88c8e716354091": "Links could not be loaded", "f9733c7b64c6f5d9": "Linked environments is off", @@ -8397,6 +8411,7 @@ "5d252c8bbc3b24d0": "{status}. Links unknown", "ec2c609c028d63b4": "Link {label} to another machine", "0a72d33781010657": "Cannot link to this", + "22d1944bbd4d00b4": "{count, plural, one {Link to # machine. Pick which in the next step} other {Link to # machines. Pick which in the next step}}", "4f10f6354f38106e": "Renew the link to {target}. No pairing code needed", "5a25bfd7c3a8e4b4": "Link to {target}. No pairing code needed", "b4b893b9c210e0ba": "Renew the link to {target}. Needs a pairing code from it", @@ -8405,13 +8420,20 @@ "7f045c3477f783cc": "{count, plural, one {# link needs attention.} other {# links need attention.}}", "d53ada50331e6041": "{machines, plural, one {# machine} other {# machines}}, {links, plural, =0 {no links} one {# link} other {# links}}", "706ac721bf99036c": "{machines, plural, one {# machine} other {# machines}}", - "61287d7320b20cad": "Select a machine to manage it. To link two machines, drag the plus on an environment onto another machine, or press it to pick one.", + "8cb29b21fc19a505": "Select a machine to manage it. To link two machines, drag the plus on an environment onto another machine, or press it to pick one. To link several at once, Shift-click machines or Shift-drag a box around them, then drag the plus onto one of them.", "743b93767ec7ebf8": "Select a machine to manage it.", "718e9f7ff8f48497": "A link reaches one machine and stops there. It does not pass on to the machines that one links to.", "3e8441af6148878f": "Expires {date}", + "4daaa2288b63a801": "{count, plural, one {# link in} other {# links in}}", + "5e7ed49a9fbfbcb4": "{count, plural, one {# environment} other {# environments}} with no links, not connected", "786d62572ebcebdf": "{count, plural, one {# machine} other {# machines}} linked from {source}, {access}, {reachable} reachable", + "7762644204376a63": "{count, plural, one {# machine} other {# machines}} each linked from {sources}, {reachable} reachable", "166aac696c3ec460": "Collapse on the map", + "d4e68210142d6734": "Show the first {shown} on the map", "069d8ba658617f30": "Show each on the map", + "c7e1635b229d7249": "Filter these machines by name", + "52a07016be1bea99": "Filter by name", + "a7061489aec79ba8": "{shown} of {count}", "eefe994332120d82": "Link", "9aca4025e20bef31": "Connected to {connected} of {total} environments", "7f3ea6eba251a165": "Each line from here is a saved route to an environment. The map shows the links of the environments this app is connected to; one it cannot reach may hold links that are not drawn.", @@ -8760,15 +8782,17 @@ "03ce9bea5f88ddbd": "This app cannot confirm it is one of your machines. The pairing code you paste is sent there.", "30b696434167411f": "Linked", "80bbda74ee500b82": "Machine", + "4e7b0a3ced2d0f97": "Link several environments", + "0f3a6d9b3350d800": "Link several machines from {source}", "e5ac7abeaeb78750": "Select none", "ab520df47bca22d2": "Select all", "3a57c9bbcd12529f": "Could not check which machines are already linked, so none can be picked: {error}", "78ccf685018ef797": "Linked", + "e82fad1c68674065": "{count, plural, one {# machine you picked is known only through a link, so it needs a pairing code. Link it on its own.} other {# machines you picked are known only through a link, so they need a pairing code. Link them one at a time.}}", "87433cf138dc3e2c": "{linked, plural, one {Linked # machine.} other {Linked # machines.}}", "d044bb95248da10c": "Linked {linked} of {total}. The ones that failed stay selected, so you can try them again.", "d2fbaffe08b6cf60": "{count, plural, one {Link # machine} other {Link # machines}}", "8e3378b526d615f4": "Link several…", - "7f8d6d1af69829d8": "Link several environments", "b550d04490078bda": "Agents here can then launch, message and wait on threads on each machine you pick. Each appears under Authorized clients in that machine's Sharing & access, where it can be revoked.", "c2553b323479499a": "This app knows no other machines. Add them under Environments first.", "18b1d4d42b945b34": "Machines", @@ -9826,6 +9850,7 @@ "51497bd401292062": "Hold", "9d6cc6ac23312071": "Double press", "f001fa7b329c8fbf": "Hide successful", + "ad208e3e32c85029": "Hide all", "c80e4bb3201efd71": "Zen", "0cb9ffcd1fb46b0c": "Status only", "cf0f7fc3df26fa75": "Status and messages", @@ -10035,6 +10060,7 @@ "573ea5fdf293a9d6": "All checkouts", "470ad8c54049d1e1": "Search checkouts", "7e2dfdd9f97fc027": "Project scope", + "1cf216566c1ee064": "Unavailable project", "c1b8c351aa90f319": [ { "t": "span", diff --git a/apps/web/src/i18n/translations/es.json b/apps/web/src/i18n/translations/es.json index 47dae4f585679..14905423f445e 100644 --- a/apps/web/src/i18n/translations/es.json +++ b/apps/web/src/i18n/translations/es.json @@ -5780,14 +5780,13 @@ "b6a29fff7c7c0808": "Nadie", "54420465784bb1bd": "Cargar comentarios anteriores", "9d82ebf35bfb4043": "Aquí no ha pasado nada todavía.", - "1cf216566c1ee064": "Proyecto no disponible", "b5ddadeb0810688c": "Estado", "93c1fc19d9bf1db0": "Participación", "d5a8b335d88b65bc": "{hidden} ocultos", "2160067266a61dd8": "Cualquiera", "cd4ec4acf33c65b9": "{count, plural, one {{count} etiqueta} other {{count} etiquetas}}", "bfd20acb8b7dee6b": "Cualquiera", - "ad208e3e32c85029": "Ocultar todo", + "aead644e2cf1233f": "Mostrar todo", "77ce79d865716719": "No hay proyectos que coincidan.", "af7eb4f9c7f0f575": "Filtros", "08247dd39b0c85ff": "Asignado", @@ -6463,7 +6462,6 @@ "64d0189be492147c": "No se pueden abrir los detalles de la comprobación", "600347ca50400a54": "Cargando comprobaciones…", "1b381201aba745c2": "No se informó de ninguna comprobación", - "aead644e2cf1233f": "Mostrar todo", "a6d75a4380173c60": "Abrir comprobaciones: {summary}", "be3d1766bad18693": "Comprobaciones: {summary}", "425e4a3d6c5c2867": "{count, plural, one {{count} con errores} other {{count} con errores}}", @@ -8351,6 +8349,15 @@ "219bc3612d646a01": "Quitar ruta", "b2877341429675aa": "vía {route}", "537e7cf4df7a0af1": "Este navegador", + "692153ec34a9a7bd": "Buscar una máquina en el mapa", + "288ab5c45a9539a3": "Buscar una máquina", + "c263859f8bcc7b1c": "Ninguna máquina con ese nombre", + "1bcc5f963ef39c7b": "{count, plural, one {# coincidencia. Intro va a ella} other {# coincidencias. Intro va a la primera}}", + "2bb44d78cb85c097": "{count, plural, one {# seleccionada} other {# seleccionadas}}", + "bcf01a26153f6425": "Borrar", + "d18ad97175bd2028": "Mayús-clic o Mayús-arrastrar para seleccionar varias", + "d9665bd69e7fd4f4": "Vincular varias…", + "8d5882faf1e5fb96": "Desde {source}", "601e0c9e6a45a54f": "Ajustar el mapa a la vista", "feec58f6653f5673": "Cómo leer las líneas", "e459bd5c53a993e2": "Ruta en uso", @@ -8361,8 +8368,9 @@ "235b3e270162f18b": "Vínculo, más grueso cuanto más acceso", "c326a7e66bab5da0": "Tus entornos", "86222507d918084b": "Alcanzadas mediante un vínculo", + "afc01d2ee8048b4b": "{label}, seleccionada", "aa34f7bc5aaf6bb0": "Mapa de tus máquinas", - "3b61cc529ae01681": "Las flechas mueven entre máquinas. Intro abre los detalles de una máquina, con sus rutas y vínculos. Tab desde un entorno lleva a su botón de vincular. Más y menos hacen zoom, cero ajusta el mapa.", + "edb6cb27ff7f446b": "Las flechas mueven entre máquinas. Intro abre los detalles de una máquina, con sus rutas y vínculos. Espacio selecciona una máquina para vincular varias a la vez. Tab desde un entorno llega a su botón de vincular. Más y menos hacen zoom, cero ajusta el mapa.", "753b4a8ec5521c98": "Vínculo de {source} a {target}: {summary}", "bb6a74a47a3852c7": "Caducado", "3076117d81a9c1c0": "No responde", @@ -8370,15 +8378,21 @@ "8971602c42718d72": "Accesible", "1b256867b95ee022": "{days, plural, one {Caduca en {days} día} other {Caduca en {days} días}}", "aae31cf2017dab5b": "Pública", + "b4f6c341033a3c91": "Apagados", + "960255d19109dcd9": "Necesitan actualización", "19f6a3505837907d": "{access}. {reachable} de {count} accesibles", - "325f85fe7ade4efd": "De {first} a {last}, {count} máquinas vinculadas desde {source}. {summary}", + "6f8f71c20ba546af": "{reachable} de {count} accesibles, desde {sources} entornos", + "0d731c951986fac8": "{group}: {count} entornos sin vínculos, {range}", + "5feb96736385be01": "{range}, {count} máquinas vinculadas desde {sources}. {summary}", "35b783cfc817cb6f": "Contraer estas máquinas", + "14dcd5c89fd0f67f": "Mostrar las primeras {shown} máquinas en el mapa", "b8f2d917d3a592df": "Mostrar cada máquina en el mapa", + "ddc2106217bbde2d": "y {count} más", "b0d81579d80fb94a": "conocida solo por un vínculo", "2d3dc930fd1cdd55": "desde {source}: {summary}", "911bc3bcde1aba3b": "{count, plural, one {# vínculo entrante} other {# vínculos entrantes}}", - "0fecb34fd1ae531f": "{label}, en tu cuenta de T3 Connect, no añadida a esta app. {status}", "930f9e01fc4591b4": "Desactivado", + "0fecb34fd1ae531f": "{label}, en tu cuenta de T3 Connect, no añadida a esta app. {status}", "4a84ad9b7f8e4909": "Cargando vínculos…", "9c88c8e716354091": "No se pudieron cargar los vínculos", "f9733c7b64c6f5d9": "Entornos vinculados está desactivado", @@ -8387,6 +8401,7 @@ "5d252c8bbc3b24d0": "{status}. Vínculos desconocidos", "ec2c609c028d63b4": "Vincular {label} con otra máquina", "0a72d33781010657": "No se puede vincular con esto", + "22d1944bbd4d00b4": "{count, plural, one {Vincular a # máquina. Elige cuál en el siguiente paso} other {Vincular a # máquinas. Elige cuáles en el siguiente paso}}", "4f10f6354f38106e": "Renovar el vínculo con {target}. No hace falta código de emparejamiento", "5a25bfd7c3a8e4b4": "Vincular con {target}. No hace falta código de emparejamiento", "b4b893b9c210e0ba": "Renovar el vínculo con {target}. Necesita un código de emparejamiento de esa máquina", @@ -8395,13 +8410,20 @@ "7f045c3477f783cc": "{count, plural, one {# vínculo requiere atención.} other {# vínculos requieren atención.}}", "d53ada50331e6041": "{machines, plural, one {# máquina} other {# máquinas}}, {links, plural, =0 {sin vínculos} one {# vínculo} other {# vínculos}}", "706ac721bf99036c": "{machines, plural, one {# máquina} other {# máquinas}}", - "61287d7320b20cad": "Selecciona una máquina para gestionarla. Para vincular dos máquinas, arrastra el signo más de un entorno hasta otra máquina, o púlsalo para elegir una.", + "8cb29b21fc19a505": "Selecciona una máquina para gestionarla. Para vincular dos máquinas, arrastra el más de un entorno sobre otra máquina, o púlsalo para elegir una. Para vincular varias a la vez, haz Mayús-clic en las máquinas o arrastra un recuadro con Mayús alrededor de ellas, y luego arrastra el más sobre una de ellas.", "743b93767ec7ebf8": "Selecciona una máquina para gestionarla.", "718e9f7ff8f48497": "Un vínculo llega a una máquina y termina ahí. No continúa hacia las máquinas con las que esa está vinculada.", "3e8441af6148878f": "Caduca el {date}", + "4daaa2288b63a801": "{count, plural, one {# vínculo entrante} other {# vínculos entrantes}}", + "5e7ed49a9fbfbcb4": "{count, plural, one {# entorno} other {# entornos}} sin vínculos, no conectados", "786d62572ebcebdf": "{count, plural, one {# máquina vinculada} other {# máquinas vinculadas}} desde {source}, {access}, {reachable} accesibles", + "7762644204376a63": "{count, plural, one {# máquina} other {# máquinas}}, cada una vinculada desde {sources}, {reachable} accesibles", "166aac696c3ec460": "Contraer en el mapa", + "d4e68210142d6734": "Mostrar las primeras {shown} en el mapa", "069d8ba658617f30": "Mostrar cada una en el mapa", + "c7e1635b229d7249": "Filtrar estas máquinas por nombre", + "52a07016be1bea99": "Filtrar por nombre", + "a7061489aec79ba8": "{shown} de {count}", "eefe994332120d82": "Vincular", "9aca4025e20bef31": "Conectado a {connected} de {total} entornos", "7f3ea6eba251a165": "Cada línea que sale de aquí es una ruta guardada hacia un entorno. El mapa muestra los vínculos de los entornos a los que esta app está conectada; uno al que no llega puede tener vínculos que no se dibujan.", @@ -8750,15 +8772,17 @@ "03ce9bea5f88ddbd": "Esta app no puede confirmar que sea una de tus máquinas. El código de emparejamiento que pegues se envía allí.", "30b696434167411f": "Vinculado", "80bbda74ee500b82": "Máquina", + "4e7b0a3ced2d0f97": "Vincular varios entornos", + "0f3a6d9b3350d800": "Vincular varias máquinas desde {source}", "e5ac7abeaeb78750": "No seleccionar nada", "ab520df47bca22d2": "Seleccionar todo", "3a57c9bbcd12529f": "No se pudo comprobar qué máquinas ya están vinculadas, así que no se puede elegir ninguna: {error}", "78ccf685018ef797": "Vinculada", + "e82fad1c68674065": "{count, plural, one {# máquina que elegiste solo se conoce a través de un vínculo, así que necesita un código de emparejamiento. Vincúlala por separado.} other {# máquinas que elegiste solo se conocen a través de un vínculo, así que necesitan un código de emparejamiento. Vincúlalas una a una.}}", "87433cf138dc3e2c": "{linked, plural, one {Se vinculó # máquina.} other {Se vincularon # máquinas.}}", "d044bb95248da10c": "Se vincularon {linked} de {total}. Las que fallaron siguen seleccionadas para que puedas reintentarlas.", "d2fbaffe08b6cf60": "{count, plural, one {Vincular # máquina} other {Vincular # máquinas}}", "8e3378b526d615f4": "Vincular varios…", - "7f8d6d1af69829d8": "Vincular varios entornos", "b550d04490078bda": "Así los agentes de aquí podrán iniciar hilos en cada máquina que elijas, enviarles mensajes y esperarlos. Cada vínculo aparece en Clientes autorizados, en Compartir y acceso de esa máquina, donde se puede revocar.", "c2553b323479499a": "Esta app no conoce otras máquinas. Añádelas primero en Entornos.", "18b1d4d42b945b34": "Máquinas", @@ -9814,6 +9838,7 @@ "51497bd401292062": "Mantener pulsado", "9d6cc6ac23312071": "Doble pulsación", "f001fa7b329c8fbf": "Ocultar las correctas", + "ad208e3e32c85029": "Ocultar todo", "c80e4bb3201efd71": "Zen", "0cb9ffcd1fb46b0c": "Solo el estado", "cf0f7fc3df26fa75": "Estado y mensajes", @@ -10023,6 +10048,7 @@ "573ea5fdf293a9d6": "Todos los checkouts", "470ad8c54049d1e1": "Buscar checkouts", "7e2dfdd9f97fc027": "Ámbito de proyectos", + "1cf216566c1ee064": "Proyecto no disponible", "c1b8c351aa90f319": [ { "t": "span", diff --git a/apps/web/src/i18n/translations/fr.json b/apps/web/src/i18n/translations/fr.json index e9192b65d2287..01135b417f105 100644 --- a/apps/web/src/i18n/translations/fr.json +++ b/apps/web/src/i18n/translations/fr.json @@ -5781,14 +5781,13 @@ "b6a29fff7c7c0808": "Personne", "54420465784bb1bd": "Charger les commentaires plus anciens", "9d82ebf35bfb4043": "Rien ne s’est encore passé ici.", - "1cf216566c1ee064": "Projet indisponible", "b5ddadeb0810688c": "État", "93c1fc19d9bf1db0": "Participation", "d5a8b335d88b65bc": "{hidden} masqués", "2160067266a61dd8": "Tous", "cd4ec4acf33c65b9": "{count, plural, one {{count} libellé} other {{count} libellés}}", "bfd20acb8b7dee6b": "N’importe qui", - "ad208e3e32c85029": "Tout masquer", + "aead644e2cf1233f": "Tout afficher", "77ce79d865716719": "Aucun projet correspondant.", "af7eb4f9c7f0f575": "Filtres", "08247dd39b0c85ff": "Assigné", @@ -6464,7 +6463,6 @@ "64d0189be492147c": "Impossible d’ouvrir les détails du check", "600347ca50400a54": "Chargement des checks…", "1b381201aba745c2": "Aucun check signalé", - "aead644e2cf1233f": "Tout afficher", "a6d75a4380173c60": "Ouvrir les checks : {summary}", "be3d1766bad18693": "Checks : {summary}", "425e4a3d6c5c2867": "{count, plural, one {{count} en échec} other {{count} en échec}}", @@ -8352,6 +8350,15 @@ "219bc3612d646a01": "Supprimer la route", "b2877341429675aa": "via {route}", "537e7cf4df7a0af1": "Ce navigateur", + "692153ec34a9a7bd": "Trouver une machine sur la carte", + "288ab5c45a9539a3": "Trouver une machine", + "c263859f8bcc7b1c": "Aucune machine de ce nom", + "1bcc5f963ef39c7b": "{count, plural, one {# résultat. Entrée y mène} other {# résultats. Entrée mène au premier}}", + "2bb44d78cb85c097": "{count, plural, one {# sélectionnée} other {# sélectionnées}}", + "bcf01a26153f6425": "Effacer", + "d18ad97175bd2028": "Maj-clic ou Maj-glisser pour en sélectionner plusieurs", + "d9665bd69e7fd4f4": "Lier plusieurs…", + "8d5882faf1e5fb96": "Depuis {source}", "601e0c9e6a45a54f": "Ajuster la carte à la vue", "feec58f6653f5673": "Comment lire les lignes", "e459bd5c53a993e2": "Route utilisée", @@ -8362,8 +8369,9 @@ "235b3e270162f18b": "Association, plus épaisse avec plus d’accès", "c326a7e66bab5da0": "Vos environnements", "86222507d918084b": "Atteintes par une association", + "afc01d2ee8048b4b": "{label}, sélectionnée", "aa34f7bc5aaf6bb0": "Carte de vos machines", - "3b61cc529ae01681": "Les flèches passent d’une machine à l’autre. Entrée ouvre les détails d’une machine, avec ses routes et ses associations. Tab depuis un environnement mène à son bouton d’association. Plus et moins zooment, zéro ajuste la carte.", + "edb6cb27ff7f446b": "Les flèches déplacent entre les machines. Entrée ouvre les détails d'une machine, avec ses routes et ses liens. Espace sélectionne une machine pour en lier plusieurs à la fois. Tab depuis un environnement atteint son bouton de lien. Plus et moins zooment, zéro ajuste la carte.", "753b4a8ec5521c98": "Association de {source} vers {target} : {summary}", "bb6a74a47a3852c7": "Expirée", "3076117d81a9c1c0": "Ne répond pas", @@ -8371,15 +8379,21 @@ "8971602c42718d72": "Joignable", "1b256867b95ee022": "{days, plural, one {Expire dans {days} jour} other {Expire dans {days} jours}}", "aae31cf2017dab5b": "Publique", + "b4f6c341033a3c91": "Désactivés", + "960255d19109dcd9": "Mise à jour requise", "19f6a3505837907d": "{access}. {reachable} sur {count} joignables", - "325f85fe7ade4efd": "De {first} à {last}, {count} machines associées depuis {source}. {summary}", + "6f8f71c20ba546af": "{reachable} sur {count} joignables, depuis {sources} environnements", + "0d731c951986fac8": "{group} : {count} environnements sans lien, {range}", + "5feb96736385be01": "{range}, {count} machines liées depuis {sources}. {summary}", "35b783cfc817cb6f": "Replier ces machines", + "14dcd5c89fd0f67f": "Afficher les {shown} premières machines sur la carte", "b8f2d917d3a592df": "Afficher chaque machine sur la carte", + "ddc2106217bbde2d": "et {count} de plus", "b0d81579d80fb94a": "connue uniquement par une association", "2d3dc930fd1cdd55": "depuis {source} : {summary}", "911bc3bcde1aba3b": "{count, plural, one {# association entrante} other {# associations entrantes}}", - "0fecb34fd1ae531f": "{label}, sur votre compte T3 Connect, non ajoutée à cette app. {status}", "930f9e01fc4591b4": "Éteint", + "0fecb34fd1ae531f": "{label}, sur votre compte T3 Connect, non ajoutée à cette app. {status}", "4a84ad9b7f8e4909": "Chargement des associations…", "9c88c8e716354091": "Impossible de charger les associations", "f9733c7b64c6f5d9": "Environnements associés est désactivé", @@ -8388,6 +8402,7 @@ "5d252c8bbc3b24d0": "{status}. Associations inconnues", "ec2c609c028d63b4": "Associer {label} à une autre machine", "0a72d33781010657": "Association impossible avec cet élément", + "22d1944bbd4d00b4": "{count, plural, one {Lier à # machine. Choisissez laquelle à l'étape suivante} other {Lier à # machines. Choisissez lesquelles à l'étape suivante}}", "4f10f6354f38106e": "Renouveler l’association avec {target}. Aucun code d’appairage requis", "5a25bfd7c3a8e4b4": "Associer à {target}. Aucun code d’appairage requis", "b4b893b9c210e0ba": "Renouveler l’association avec {target}. Nécessite un code d’appairage de cette machine", @@ -8396,13 +8411,20 @@ "7f045c3477f783cc": "{count, plural, one {# association demande votre attention.} other {# associations demandent votre attention.}}", "d53ada50331e6041": "{machines, plural, one {# machine} other {# machines}}, {links, plural, =0 {aucune association} one {# association} other {# associations}}", "706ac721bf99036c": "{machines, plural, one {# machine} other {# machines}}", - "61287d7320b20cad": "Sélectionnez une machine pour la gérer. Pour associer deux machines, faites glisser le plus d’un environnement sur une autre machine, ou appuyez dessus pour en choisir une.", + "8cb29b21fc19a505": "Sélectionnez une machine pour la gérer. Pour lier deux machines, faites glisser le plus d'un environnement sur une autre machine, ou appuyez dessus pour en choisir une. Pour en lier plusieurs à la fois, cliquez sur les machines avec Maj ou tracez un cadre autour d'elles avec Maj, puis faites glisser le plus sur l'une d'elles.", "743b93767ec7ebf8": "Sélectionnez une machine pour la gérer.", "718e9f7ff8f48497": "Une association atteint une machine et s’arrête là. Elle ne se prolonge pas vers les machines auxquelles celle-ci est associée.", "3e8441af6148878f": "Expire le {date}", + "4daaa2288b63a801": "{count, plural, one {# lien entrant} other {# liens entrants}}", + "5e7ed49a9fbfbcb4": "{count, plural, one {# environnement} other {# environnements}} sans lien, non connectés", "786d62572ebcebdf": "{count, plural, one {# machine associée} other {# machines associées}} depuis {source}, {access}, {reachable} joignables", + "7762644204376a63": "{count, plural, one {# machine} other {# machines}}, chacune liée depuis {sources}, {reachable} joignables", "166aac696c3ec460": "Replier sur la carte", + "d4e68210142d6734": "Afficher les {shown} premières sur la carte", "069d8ba658617f30": "Afficher chacune sur la carte", + "c7e1635b229d7249": "Filtrer ces machines par nom", + "52a07016be1bea99": "Filtrer par nom", + "a7061489aec79ba8": "{shown} sur {count}", "eefe994332120d82": "Associer", "9aca4025e20bef31": "Connecté à {connected} environnements sur {total}", "7f3ea6eba251a165": "Chaque ligne partant d’ici est une route enregistrée vers un environnement. La carte montre les associations des environnements auxquels cette app est connectée ; un environnement injoignable peut avoir des associations qui ne sont pas dessinées.", @@ -8752,15 +8774,17 @@ "03ce9bea5f88ddbd": "Cette app ne peut pas confirmer qu’il s’agit de l’une de vos machines. Le code d’appairage que vous collez y est envoyé.", "30b696434167411f": "Associé", "80bbda74ee500b82": "Machine", + "4e7b0a3ced2d0f97": "Associer plusieurs environnements", + "0f3a6d9b3350d800": "Lier plusieurs machines depuis {source}", "e5ac7abeaeb78750": "Tout désélectionner", "ab520df47bca22d2": "Tout sélectionner", "3a57c9bbcd12529f": "Impossible de vérifier quelles machines sont déjà associées ; aucune ne peut donc être choisie : {error}", "78ccf685018ef797": "Associée", + "e82fad1c68674065": "{count, plural, one {# machine choisie n'est connue que par un lien : il lui faut un code d'appairage. Liez-la séparément.} other {# machines choisies ne sont connues que par un lien : il leur faut un code d'appairage. Liez-les une par une.}}", "87433cf138dc3e2c": "{linked, plural, one {# machine associée.} other {# machines associées.}}", "d044bb95248da10c": "{linked} sur {total} associées. Celles qui ont échoué restent sélectionnées pour que vous puissiez réessayer.", "d2fbaffe08b6cf60": "{count, plural, one {Associer # machine} other {Associer # machines}}", "8e3378b526d615f4": "Associer plusieurs…", - "7f8d6d1af69829d8": "Associer plusieurs environnements", "b550d04490078bda": "Les agents d’ici pourront alors lancer des fils sur chaque machine choisie, leur envoyer des messages et les attendre. Chaque association apparaît sous Clients autorisés dans Partage et accès de la machine concernée, où elle peut être révoquée.", "c2553b323479499a": "Cette app ne connaît aucune autre machine. Ajoutez-les d’abord dans Environnements.", "18b1d4d42b945b34": "Machines", @@ -9816,6 +9840,7 @@ "51497bd401292062": "Appui long", "9d6cc6ac23312071": "Double appui", "f001fa7b329c8fbf": "Masquer les réussis", + "ad208e3e32c85029": "Tout masquer", "c80e4bb3201efd71": "Zen", "0cb9ffcd1fb46b0c": "Statut uniquement", "cf0f7fc3df26fa75": "Statut et messages", @@ -10025,6 +10050,7 @@ "573ea5fdf293a9d6": "Tous les checkouts", "470ad8c54049d1e1": "Rechercher des checkouts", "7e2dfdd9f97fc027": "Portée des projets", + "1cf216566c1ee064": "Projet indisponible", "c1b8c351aa90f319": [ { "t": "span", diff --git a/apps/web/src/i18n/translations/ja.json b/apps/web/src/i18n/translations/ja.json index b12035d52d118..1c8dc862f08ea 100644 --- a/apps/web/src/i18n/translations/ja.json +++ b/apps/web/src/i18n/translations/ja.json @@ -5763,14 +5763,13 @@ "b6a29fff7c7c0808": "なし", "54420465784bb1bd": "以前のコメントを読み込む", "9d82ebf35bfb4043": "まだアクティビティはありません。", - "1cf216566c1ee064": "利用できないプロジェクト", "b5ddadeb0810688c": "状態", "93c1fc19d9bf1db0": "関与", "d5a8b335d88b65bc": "{hidden} 件非表示", "2160067266a61dd8": "すべて", "cd4ec4acf33c65b9": "{count, plural, other {{count} 個のラベル}}", "bfd20acb8b7dee6b": "すべてのユーザー", - "ad208e3e32c85029": "すべて非表示", + "aead644e2cf1233f": "すべて表示", "77ce79d865716719": "一致するプロジェクトはありません。", "af7eb4f9c7f0f575": "フィルター", "08247dd39b0c85ff": "担当者", @@ -6433,7 +6432,6 @@ "64d0189be492147c": "チェックの詳細を開けません", "600347ca50400a54": "チェックを読み込んでいます…", "1b381201aba745c2": "報告されたチェックはありません", - "aead644e2cf1233f": "すべて表示", "a6d75a4380173c60": "チェックを開く: {summary}", "be3d1766bad18693": "チェック: {summary}", "425e4a3d6c5c2867": "{count, plural, other {{count} 件失敗}}", @@ -8309,6 +8307,15 @@ "219bc3612d646a01": "ルートを削除", "b2877341429675aa": "{route} 経由", "537e7cf4df7a0af1": "このブラウザ", + "692153ec34a9a7bd": "マップでマシンを検索", + "288ab5c45a9539a3": "マシンを検索", + "c263859f8bcc7b1c": "その名前のマシンはありません", + "1bcc5f963ef39c7b": "{count, plural, other {#件一致。Enterで最初の項目へ移動}}", + "2bb44d78cb85c097": "{count, plural, other {#件選択中}}", + "bcf01a26153f6425": "クリア", + "d18ad97175bd2028": "Shift+クリックまたはShift+ドラッグで複数選択", + "d9665bd69e7fd4f4": "複数をリンク…", + "8d5882faf1e5fb96": "{source} から", "601e0c9e6a45a54f": "マップ全体を表示", "feec58f6653f5673": "線の見方", "e459bd5c53a993e2": "使用中のルート", @@ -8319,8 +8326,9 @@ "235b3e270162f18b": "リンク(アクセスが広いほど太い)", "c326a7e66bab5da0": "あなたの環境", "86222507d918084b": "リンク経由で到達", + "afc01d2ee8048b4b": "{label}、選択中", "aa34f7bc5aaf6bb0": "マシンのマップ", - "3b61cc529ae01681": "矢印キーでマシン間を移動します。Enter でマシンの詳細(ルートとリンク)を開きます。環境から Tab でリンクボタンに移動します。プラスとマイナスでズーム、ゼロでマップ全体を表示します。", + "edb6cb27ff7f446b": "矢印キーでマシン間を移動します。Enterでマシンの詳細(ルートとリンク)を開きます。Spaceで複数を一度にリンクするためにマシンを選択します。環境からTabでリンクボタンに移動します。プラスとマイナスでズーム、ゼロでマップ全体を表示します。", "753b4a8ec5521c98": "{source} から {target} へのリンク: {summary}", "bb6a74a47a3852c7": "期限切れ", "3076117d81a9c1c0": "応答なし", @@ -8328,15 +8336,21 @@ "8971602c42718d72": "到達可能", "1b256867b95ee022": "{days, plural, other {{days} 日後に期限切れ}}", "aae31cf2017dab5b": "パブリック", + "b4f6c341033a3c91": "オフ", + "960255d19109dcd9": "アップデートが必要", "19f6a3505837907d": "{access}。{count} 台中 {reachable} 台が到達可能", - "325f85fe7ade4efd": "{first} から {last}、{source} からリンクされた {count} 台のマシン。{summary}", + "6f8f71c20ba546af": "{count}台中{reachable}台に到達可能、{sources}個の環境から", + "0d731c951986fac8": "{group}: リンクのない環境 {count} 個、{range}", + "5feb96736385be01": "{range}、{sources} からリンクされた {count} 台のマシン。{summary}", "35b783cfc817cb6f": "これらのマシンを折りたたむ", + "14dcd5c89fd0f67f": "最初の {shown} 台をマップに表示", "b8f2d917d3a592df": "各マシンをマップに表示", + "ddc2106217bbde2d": "ほか {count} 台", "b0d81579d80fb94a": "リンク経由でのみ把握", "2d3dc930fd1cdd55": "{source} から: {summary}", "911bc3bcde1aba3b": "{count, plural, other {内向きのリンク # 件}}", - "0fecb34fd1ae531f": "{label}、T3 Connect アカウントにあり、このアプリには未追加。{status}", "930f9e01fc4591b4": "オフ", + "0fecb34fd1ae531f": "{label}、T3 Connect アカウントにあり、このアプリには未追加。{status}", "4a84ad9b7f8e4909": "リンクを読み込んでいます…", "9c88c8e716354091": "リンクを読み込めませんでした", "f9733c7b64c6f5d9": "リンクされた環境はオフです", @@ -8345,6 +8359,7 @@ "5d252c8bbc3b24d0": "{status}。リンクは不明", "ec2c609c028d63b4": "{label} を別のマシンにリンク", "0a72d33781010657": "これにはリンクできません", + "22d1944bbd4d00b4": "{count, plural, other {#台のマシンにリンク。次のステップで選択します}}", "4f10f6354f38106e": "{target} へのリンクを更新。ペアリングコードは不要", "5a25bfd7c3a8e4b4": "{target} にリンク。ペアリングコードは不要", "b4b893b9c210e0ba": "{target} へのリンクを更新。そのマシンのペアリングコードが必要", @@ -8353,13 +8368,20 @@ "7f045c3477f783cc": "{count, plural, other {# 件のリンクに対応が必要です。}}", "d53ada50331e6041": "{machines, plural, other {マシン # 台}}、{links, plural, =0 {リンクなし} other {リンク # 件}}", "706ac721bf99036c": "{machines, plural, other {# 台のマシン}}", - "61287d7320b20cad": "マシンを選択すると管理できます。2 台のマシンをリンクするには、環境のプラスを別のマシンにドラッグするか、押して選択します。", + "8cb29b21fc19a505": "マシンを選択して管理します。2台のマシンをリンクするには、環境のプラスを別のマシンにドラッグするか、押して選択します。複数を一度にリンクするには、マシンをShift+クリックするかShift+ドラッグで囲み、プラスをそのいずれかにドラッグします。", "743b93767ec7ebf8": "マシンを選択すると管理できます。", "718e9f7ff8f48497": "リンクは 1 台のマシンに届き、そこで止まります。そのマシンがリンクしている先のマシンには及びません。", "3e8441af6148878f": "{date} に期限切れ", + "4daaa2288b63a801": "{count, plural, other {受信リンク #件}}", + "5e7ed49a9fbfbcb4": "{count, plural, other {#個の環境}}、リンクなし、未接続", "786d62572ebcebdf": "{count, plural, other {{source} からリンクされた # 台のマシン}}、{access}、{reachable} 台が到達可能", + "7762644204376a63": "{count, plural, other {#台のマシン}}、それぞれ {sources} からリンク、{reachable} 台に到達可能", "166aac696c3ec460": "マップ上で折りたたむ", + "d4e68210142d6734": "最初の {shown} 台をマップに表示", "069d8ba658617f30": "それぞれをマップに表示", + "c7e1635b229d7249": "これらのマシンを名前で絞り込む", + "52a07016be1bea99": "名前で絞り込む", + "a7061489aec79ba8": "{count} 件中 {shown} 件", "eefe994332120d82": "リンク", "9aca4025e20bef31": "{total} 個中 {connected} 個の環境に接続済み", "7f3ea6eba251a165": "ここから出る線はそれぞれ、環境への保存済みルートです。マップには、このアプリが接続している環境のリンクが表示されます。到達できない環境には、描かれていないリンクがあるかもしれません。", @@ -8708,15 +8730,17 @@ "03ce9bea5f88ddbd": "このアプリでは、これがあなたのマシンかどうかを確認できません。貼り付けたペアリングコードはそのアドレスに送信されます。", "30b696434167411f": "リンク済み", "80bbda74ee500b82": "マシン", + "4e7b0a3ced2d0f97": "複数の環境をリンク", + "0f3a6d9b3350d800": "{source} から複数のマシンをリンク", "e5ac7abeaeb78750": "選択を解除", "ab520df47bca22d2": "すべて選択", "3a57c9bbcd12529f": "どのマシンがリンク済みかを確認できなかったため、選択できません: {error}", "78ccf685018ef797": "リンク済み", + "e82fad1c68674065": "{count, plural, other {選択した#台のマシンはリンク経由でのみ認識されているため、ペアリングコードが必要です。1台ずつリンクしてください。}}", "87433cf138dc3e2c": "{linked, plural, other {# 台のマシンをリンクしました。}}", "d044bb95248da10c": "{total} 台中 {linked} 台をリンクしました。失敗したマシンは選択されたままなので、もう一度試せます。", "d2fbaffe08b6cf60": "{count, plural, other {# 台のマシンをリンク}}", "8e3378b526d615f4": "複数をリンク…", - "7f8d6d1af69829d8": "複数の環境をリンク", "b550d04490078bda": "これで、ここのエージェントが選択した各マシンでスレッドを起動し、メッセージを送り、完了を待てるようになります。各リンクはそのマシンの「共有とアクセス」の「承認済みクライアント」に表示され、そこで取り消せます。", "c2553b323479499a": "このアプリは他のマシンを認識していません。先に「環境」で追加してください。", "18b1d4d42b945b34": "マシン", @@ -9768,6 +9792,7 @@ "51497bd401292062": "長押し", "9d6cc6ac23312071": "2 回押し", "f001fa7b329c8fbf": "成功したものを非表示", + "ad208e3e32c85029": "すべて非表示", "c80e4bb3201efd71": "Zen", "0cb9ffcd1fb46b0c": "ステータスのみ", "cf0f7fc3df26fa75": "ステータスとメッセージ", @@ -9977,6 +10002,7 @@ "573ea5fdf293a9d6": "すべてのチェックアウト", "470ad8c54049d1e1": "チェックアウトを検索", "7e2dfdd9f97fc027": "プロジェクトの範囲", + "1cf216566c1ee064": "利用できないプロジェクト", "c1b8c351aa90f319": [ { "t": "span", diff --git a/apps/web/src/i18n/translations/ko.json b/apps/web/src/i18n/translations/ko.json index 9127f380671e0..0162c40cfda9c 100644 --- a/apps/web/src/i18n/translations/ko.json +++ b/apps/web/src/i18n/translations/ko.json @@ -5761,14 +5761,13 @@ "b6a29fff7c7c0808": "없음", "54420465784bb1bd": "이전 댓글 불러오기", "9d82ebf35bfb4043": "아직 활동이 없습니다.", - "1cf216566c1ee064": "사용할 수 없는 프로젝트", "b5ddadeb0810688c": "상태", "93c1fc19d9bf1db0": "참여", "d5a8b335d88b65bc": "{hidden}개 숨김", "2160067266a61dd8": "전체", "cd4ec4acf33c65b9": "{count, plural, other {레이블 {count}개}}", "bfd20acb8b7dee6b": "모든 사람", - "ad208e3e32c85029": "모두 숨기기", + "aead644e2cf1233f": "모두 표시", "77ce79d865716719": "일치하는 프로젝트가 없습니다.", "af7eb4f9c7f0f575": "필터", "08247dd39b0c85ff": "담당자", @@ -6435,7 +6434,6 @@ "64d0189be492147c": "검사 세부 정보를 열 수 없습니다", "600347ca50400a54": "검사를 불러오는 중…", "1b381201aba745c2": "보고된 검사 없음", - "aead644e2cf1233f": "모두 표시", "a6d75a4380173c60": "검사 열기: {summary}", "be3d1766bad18693": "검사: {summary}", "425e4a3d6c5c2867": "{count, plural, other {{count}개 실패}}", @@ -8312,6 +8310,15 @@ "219bc3612d646a01": "경로 제거", "b2877341429675aa": "{route} 경유", "537e7cf4df7a0af1": "이 브라우저", + "692153ec34a9a7bd": "지도에서 머신 찾기", + "288ab5c45a9539a3": "머신 찾기", + "c263859f8bcc7b1c": "그 이름의 머신이 없습니다", + "1bcc5f963ef39c7b": "{count, plural, other {#개 일치. Enter로 첫 항목으로 이동}}", + "2bb44d78cb85c097": "{count, plural, other {#개 선택됨}}", + "bcf01a26153f6425": "지우기", + "d18ad97175bd2028": "Shift+클릭 또는 Shift+드래그로 여러 개 선택", + "d9665bd69e7fd4f4": "여러 개 연결…", + "8d5882faf1e5fb96": "{source}에서", "601e0c9e6a45a54f": "지도를 화면에 맞추기", "feec58f6653f5673": "선 읽는 법", "e459bd5c53a993e2": "사용 중인 경로", @@ -8322,8 +8329,9 @@ "235b3e270162f18b": "링크, 권한이 클수록 굵게", "c326a7e66bab5da0": "내 환경", "86222507d918084b": "링크를 통해 도달", + "afc01d2ee8048b4b": "{label}, 선택됨", "aa34f7bc5aaf6bb0": "내 머신 지도", - "3b61cc529ae01681": "화살표 키로 머신 사이를 이동합니다. Enter는 머신의 세부 정보와 경로, 링크를 엽니다. 환경에서 Tab을 누르면 연결 버튼으로 이동합니다. 더하기와 빼기로 확대/축소하고, 0으로 지도를 맞춥니다.", + "edb6cb27ff7f446b": "화살표 키로 머신 사이를 이동합니다. Enter는 머신의 세부 정보(경로와 연결)를 엽니다. Space는 여러 개를 한 번에 연결할 머신을 선택합니다. 환경에서 Tab을 누르면 연결 버튼으로 이동합니다. 더하기와 빼기로 확대/축소하고 0으로 지도를 맞춥니다.", "753b4a8ec5521c98": "{source}에서 {target}(으)로의 링크: {summary}", "bb6a74a47a3852c7": "만료됨", "3076117d81a9c1c0": "응답 없음", @@ -8331,15 +8339,21 @@ "8971602c42718d72": "연결 가능", "1b256867b95ee022": "{days, plural, other {{days}일 후 만료}}", "aae31cf2017dab5b": "공개", + "b4f6c341033a3c91": "꺼짐", + "960255d19109dcd9": "업데이트 필요", "19f6a3505837907d": "{access}. {count}대 중 {reachable}대 연결 가능", - "325f85fe7ade4efd": "{first}부터 {last}까지, {source}에서 연결된 머신 {count}대. {summary}", + "6f8f71c20ba546af": "{count}개 중 {reachable}개 연결 가능, 환경 {sources}개에서", + "0d731c951986fac8": "{group}: 연결 없는 환경 {count}개, {range}", + "5feb96736385be01": "{range}, {sources}에서 연결된 머신 {count}개. {summary}", "35b783cfc817cb6f": "이 머신들 접기", + "14dcd5c89fd0f67f": "처음 {shown}개 머신을 지도에 표시", "b8f2d917d3a592df": "각 머신을 지도에 표시", + "ddc2106217bbde2d": "외 {count}개", "b0d81579d80fb94a": "링크를 통해서만 알려짐", "2d3dc930fd1cdd55": "{source}에서: {summary}", "911bc3bcde1aba3b": "{count, plural, other {들어오는 링크 #개}}", - "0fecb34fd1ae531f": "{label}, T3 Connect 계정에 있으며 이 앱에 추가되지 않음. {status}", "930f9e01fc4591b4": "꺼짐", + "0fecb34fd1ae531f": "{label}, T3 Connect 계정에 있으며 이 앱에 추가되지 않음. {status}", "4a84ad9b7f8e4909": "링크 불러오는 중…", "9c88c8e716354091": "링크를 불러올 수 없습니다", "f9733c7b64c6f5d9": "연결된 환경이 꺼져 있음", @@ -8348,6 +8362,7 @@ "5d252c8bbc3b24d0": "{status}. 링크 알 수 없음", "ec2c609c028d63b4": "{label}을(를) 다른 머신에 연결", "0a72d33781010657": "여기에는 연결할 수 없음", + "22d1944bbd4d00b4": "{count, plural, other {머신 #개에 연결. 다음 단계에서 선택합니다}}", "4f10f6354f38106e": "{target} 링크 갱신. 페어링 코드 필요 없음", "5a25bfd7c3a8e4b4": "{target}에 연결. 페어링 코드 필요 없음", "b4b893b9c210e0ba": "{target} 링크 갱신. 해당 머신의 페어링 코드 필요", @@ -8356,13 +8371,20 @@ "7f045c3477f783cc": "{count, plural, other {링크 #개에 조치가 필요합니다.}}", "d53ada50331e6041": "{machines, plural, other {머신 #대}}, {links, plural, =0 {링크 없음} other {링크 #개}}", "706ac721bf99036c": "{machines, plural, other {머신 #대}}", - "61287d7320b20cad": "머신을 선택해 관리하세요. 두 머신을 연결하려면 환경의 더하기를 다른 머신으로 끌어다 놓거나, 눌러서 선택하세요.", + "8cb29b21fc19a505": "머신을 선택해 관리하세요. 두 머신을 연결하려면 환경의 더하기를 다른 머신으로 드래그하거나 눌러서 선택하세요. 여러 개를 한 번에 연결하려면 머신을 Shift+클릭하거나 Shift+드래그로 상자를 그린 다음, 더하기를 그중 하나로 드래그하세요.", "743b93767ec7ebf8": "머신을 선택해 관리하세요.", "718e9f7ff8f48497": "링크는 머신 한 대까지만 닿습니다. 그 머신이 링크한 다른 머신으로는 이어지지 않습니다.", "3e8441af6148878f": "{date}에 만료", + "4daaa2288b63a801": "{count, plural, other {들어오는 연결 #개}}", + "5e7ed49a9fbfbcb4": "{count, plural, other {환경 #개}}, 연결 없음, 연결되지 않음", "786d62572ebcebdf": "{count, plural, other {{source}에서 연결된 머신 #대}}, {access}, {reachable}대 연결 가능", + "7762644204376a63": "{count, plural, other {머신 #개}}, 각각 {sources}에서 연결됨, {reachable}개 연결 가능", "166aac696c3ec460": "지도에서 접기", + "d4e68210142d6734": "처음 {shown}개를 지도에 표시", "069d8ba658617f30": "각각 지도에 표시", + "c7e1635b229d7249": "이 머신들을 이름으로 필터링", + "52a07016be1bea99": "이름으로 필터링", + "a7061489aec79ba8": "{count}개 중 {shown}개", "eefe994332120d82": "연결", "9aca4025e20bef31": "환경 {total}개 중 {connected}개에 연결됨", "7f3ea6eba251a165": "여기서 나가는 각 선은 환경으로 가는 저장된 경로입니다. 지도에는 이 앱이 연결된 환경의 링크가 표시되며, 도달할 수 없는 환경에는 그려지지 않은 링크가 있을 수 있습니다.", @@ -8711,15 +8733,17 @@ "03ce9bea5f88ddbd": "이 앱은 이 머신이 사용자의 머신인지 확인할 수 없습니다. 붙여 넣은 페어링 코드는 해당 주소로 전송됩니다.", "30b696434167411f": "연결됨", "80bbda74ee500b82": "머신", + "4e7b0a3ced2d0f97": "여러 환경 연결", + "0f3a6d9b3350d800": "{source}에서 여러 머신 연결", "e5ac7abeaeb78750": "선택 해제", "ab520df47bca22d2": "모두 선택", "3a57c9bbcd12529f": "어떤 머신이 이미 연결되어 있는지 확인하지 못해 선택할 수 없습니다: {error}", "78ccf685018ef797": "연결됨", + "e82fad1c68674065": "{count, plural, other {선택한 머신 #개는 연결을 통해서만 알려져 있어 페어링 코드가 필요합니다. 하나씩 연결하세요.}}", "87433cf138dc3e2c": "{linked, plural, other {머신 #대를 연결했습니다.}}", "d044bb95248da10c": "{total}대 중 {linked}대를 연결했습니다. 실패한 머신은 선택된 상태로 남아 있어 다시 시도할 수 있습니다.", "d2fbaffe08b6cf60": "{count, plural, other {머신 #대 연결}}", "8e3378b526d615f4": "여러 개 연결…", - "7f8d6d1af69829d8": "여러 환경 연결", "b550d04490078bda": "그러면 이곳의 에이전트가 선택한 각 머신에서 스레드를 시작하고, 메시지를 보내고, 기다릴 수 있습니다. 각 연결은 해당 머신의 공유 및 액세스에서 승인된 클라이언트에 표시되며 그곳에서 취소할 수 있습니다.", "c2553b323479499a": "이 앱이 아는 다른 머신이 없습니다. 먼저 환경에서 추가하세요.", "18b1d4d42b945b34": "머신", @@ -9771,6 +9795,7 @@ "51497bd401292062": "길게 누르기", "9d6cc6ac23312071": "두 번 누르기", "f001fa7b329c8fbf": "성공한 항목 숨기기", + "ad208e3e32c85029": "모두 숨기기", "c80e4bb3201efd71": "Zen", "0cb9ffcd1fb46b0c": "상태만", "cf0f7fc3df26fa75": "상태 및 메시지", @@ -9980,6 +10005,7 @@ "573ea5fdf293a9d6": "모든 체크아웃", "470ad8c54049d1e1": "체크아웃 검색", "7e2dfdd9f97fc027": "프로젝트 범위", + "1cf216566c1ee064": "사용할 수 없는 프로젝트", "c1b8c351aa90f319": [ { "t": "span", diff --git a/apps/web/src/i18n/translations/pt-BR.json b/apps/web/src/i18n/translations/pt-BR.json index 91fed20a1f941..b422eb9de5112 100644 --- a/apps/web/src/i18n/translations/pt-BR.json +++ b/apps/web/src/i18n/translations/pt-BR.json @@ -5780,14 +5780,13 @@ "b6a29fff7c7c0808": "Ninguém", "54420465784bb1bd": "Carregar comentários mais antigos", "9d82ebf35bfb4043": "Nada aconteceu aqui ainda.", - "1cf216566c1ee064": "Projeto indisponível", "b5ddadeb0810688c": "Estado", "93c1fc19d9bf1db0": "Envolvimento", "d5a8b335d88b65bc": "{hidden} ocultos", "2160067266a61dd8": "Qualquer", "cd4ec4acf33c65b9": "{count, plural, one {{count} rótulo} other {{count} rótulos}}", "bfd20acb8b7dee6b": "Qualquer pessoa", - "ad208e3e32c85029": "Ocultar todas", + "aead644e2cf1233f": "Mostrar tudo", "77ce79d865716719": "Nenhum projeto correspondente.", "af7eb4f9c7f0f575": "Filtros", "08247dd39b0c85ff": "Responsável", @@ -6463,7 +6462,6 @@ "64d0189be492147c": "Não foi possível abrir os detalhes da verificação", "600347ca50400a54": "Carregando as verificações…", "1b381201aba745c2": "Nenhuma verificação informada", - "aead644e2cf1233f": "Mostrar tudo", "a6d75a4380173c60": "Abrir verificações: {summary}", "be3d1766bad18693": "Verificações: {summary}", "425e4a3d6c5c2867": "{count, plural, one {{count} com falha} other {{count} com falha}}", @@ -8351,6 +8349,15 @@ "219bc3612d646a01": "Remover rota", "b2877341429675aa": "via {route}", "537e7cf4df7a0af1": "Este navegador", + "692153ec34a9a7bd": "Encontrar uma máquina no mapa", + "288ab5c45a9539a3": "Encontrar uma máquina", + "c263859f8bcc7b1c": "Nenhuma máquina com esse nome", + "1bcc5f963ef39c7b": "{count, plural, one {# resultado. Enter vai até ele} other {# resultados. Enter vai ao primeiro}}", + "2bb44d78cb85c097": "{count, plural, one {# selecionada} other {# selecionadas}}", + "bcf01a26153f6425": "Limpar", + "d18ad97175bd2028": "Shift-clique ou Shift-arraste para selecionar várias", + "d9665bd69e7fd4f4": "Vincular várias…", + "8d5882faf1e5fb96": "A partir de {source}", "601e0c9e6a45a54f": "Ajustar o mapa à tela", "feec58f6653f5673": "Como ler as linhas", "e459bd5c53a993e2": "Rota em uso", @@ -8361,8 +8368,9 @@ "235b3e270162f18b": "Vínculo, mais grosso com mais acesso", "c326a7e66bab5da0": "Seus ambientes", "86222507d918084b": "Alcançadas por um vínculo", + "afc01d2ee8048b4b": "{label}, selecionada", "aa34f7bc5aaf6bb0": "Mapa das suas máquinas", - "3b61cc529ae01681": "As setas movem entre máquinas. Enter abre os detalhes de uma máquina, com suas rotas e vínculos. Tab a partir de um ambiente leva ao botão de vincular. Mais e menos dão zoom, zero ajusta o mapa.", + "edb6cb27ff7f446b": "As setas movem entre máquinas. Enter abre os detalhes de uma máquina, com suas rotas e vínculos. Espaço seleciona uma máquina para vincular várias de uma vez. Tab a partir de um ambiente chega ao botão de vincular. Mais e menos dão zoom, zero ajusta o mapa.", "753b4a8ec5521c98": "Vínculo de {source} para {target}: {summary}", "bb6a74a47a3852c7": "Expirado", "3076117d81a9c1c0": "Sem resposta", @@ -8370,15 +8378,21 @@ "8971602c42718d72": "Acessível", "1b256867b95ee022": "{days, plural, one {Expira em {days} dia} other {Expira em {days} dias}}", "aae31cf2017dab5b": "Pública", + "b4f6c341033a3c91": "Desligados", + "960255d19109dcd9": "Precisam de atualização", "19f6a3505837907d": "{access}. {reachable} de {count} acessíveis", - "325f85fe7ade4efd": "De {first} a {last}, {count} máquinas vinculadas a partir de {source}. {summary}", + "6f8f71c20ba546af": "{reachable} de {count} acessíveis, a partir de {sources} ambientes", + "0d731c951986fac8": "{group}: {count} ambientes sem vínculos, {range}", + "5feb96736385be01": "{range}, {count} máquinas vinculadas a partir de {sources}. {summary}", "35b783cfc817cb6f": "Recolher estas máquinas", + "14dcd5c89fd0f67f": "Mostrar as primeiras {shown} máquinas no mapa", "b8f2d917d3a592df": "Mostrar cada máquina no mapa", + "ddc2106217bbde2d": "e mais {count}", "b0d81579d80fb94a": "conhecida apenas por um vínculo", "2d3dc930fd1cdd55": "de {source}: {summary}", "911bc3bcde1aba3b": "{count, plural, one {# vínculo de entrada} other {# vínculos de entrada}}", - "0fecb34fd1ae531f": "{label}, na sua conta do T3 Connect, não adicionada a este app. {status}", "930f9e01fc4591b4": "Desligado", + "0fecb34fd1ae531f": "{label}, na sua conta do T3 Connect, não adicionada a este app. {status}", "4a84ad9b7f8e4909": "Carregando vínculos…", "9c88c8e716354091": "Não foi possível carregar os vínculos", "f9733c7b64c6f5d9": "Ambientes vinculados está desativado", @@ -8387,6 +8401,7 @@ "5d252c8bbc3b24d0": "{status}. Vínculos desconhecidos", "ec2c609c028d63b4": "Vincular {label} a outra máquina", "0a72d33781010657": "Não é possível vincular a isto", + "22d1944bbd4d00b4": "{count, plural, one {Vincular a # máquina. Escolha qual na próxima etapa} other {Vincular a # máquinas. Escolha quais na próxima etapa}}", "4f10f6354f38106e": "Renovar o vínculo com {target}. Sem código de pareamento", "5a25bfd7c3a8e4b4": "Vincular a {target}. Sem código de pareamento", "b4b893b9c210e0ba": "Renovar o vínculo com {target}. Precisa de um código de pareamento dessa máquina", @@ -8395,13 +8410,20 @@ "7f045c3477f783cc": "{count, plural, one {# vínculo precisa de atenção.} other {# vínculos precisam de atenção.}}", "d53ada50331e6041": "{machines, plural, one {# máquina} other {# máquinas}}, {links, plural, =0 {sem vínculos} one {# vínculo} other {# vínculos}}", "706ac721bf99036c": "{machines, plural, one {# máquina} other {# máquinas}}", - "61287d7320b20cad": "Selecione uma máquina para gerenciá-la. Para vincular duas máquinas, arraste o sinal de mais de um ambiente até outra máquina, ou pressione-o para escolher uma.", + "8cb29b21fc19a505": "Selecione uma máquina para gerenciá-la. Para vincular duas máquinas, arraste o mais de um ambiente até outra máquina, ou pressione-o para escolher uma. Para vincular várias de uma vez, use Shift-clique nas máquinas ou Shift-arraste uma caixa ao redor delas e depois arraste o mais até uma delas.", "743b93767ec7ebf8": "Selecione uma máquina para gerenciá-la.", "718e9f7ff8f48497": "Um vínculo chega a uma máquina e termina ali. Ele não segue para as máquinas às quais ela está vinculada.", "3e8441af6148878f": "Expira em {date}", + "4daaa2288b63a801": "{count, plural, one {# vínculo de entrada} other {# vínculos de entrada}}", + "5e7ed49a9fbfbcb4": "{count, plural, one {# ambiente} other {# ambientes}} sem vínculos, não conectados", "786d62572ebcebdf": "{count, plural, one {# máquina vinculada} other {# máquinas vinculadas}} a partir de {source}, {access}, {reachable} acessíveis", + "7762644204376a63": "{count, plural, one {# máquina} other {# máquinas}}, cada uma vinculada a partir de {sources}, {reachable} acessíveis", "166aac696c3ec460": "Recolher no mapa", + "d4e68210142d6734": "Mostrar as primeiras {shown} no mapa", "069d8ba658617f30": "Mostrar cada uma no mapa", + "c7e1635b229d7249": "Filtrar estas máquinas por nome", + "52a07016be1bea99": "Filtrar por nome", + "a7061489aec79ba8": "{shown} de {count}", "eefe994332120d82": "Vincular", "9aca4025e20bef31": "Conectado a {connected} de {total} ambientes", "7f3ea6eba251a165": "Cada linha que sai daqui é uma rota salva para um ambiente. O mapa mostra os vínculos dos ambientes aos quais este app está conectado; um que ele não alcança pode ter vínculos que não são desenhados.", @@ -8751,15 +8773,17 @@ "03ce9bea5f88ddbd": "Este app não pode confirmar que esta é uma das suas máquinas. O código de pareamento que você colar será enviado para lá.", "30b696434167411f": "Vinculado", "80bbda74ee500b82": "Máquina", + "4e7b0a3ced2d0f97": "Vincular vários ambientes", + "0f3a6d9b3350d800": "Vincular várias máquinas a partir de {source}", "e5ac7abeaeb78750": "Desmarcar tudo", "ab520df47bca22d2": "Selecionar tudo", "3a57c9bbcd12529f": "Não foi possível verificar quais máquinas já estão vinculadas, então nenhuma pode ser escolhida: {error}", "78ccf685018ef797": "Vinculada", + "e82fad1c68674065": "{count, plural, one {# máquina escolhida só é conhecida por um vínculo, então precisa de um código de pareamento. Vincule-a separadamente.} other {# máquinas escolhidas só são conhecidas por um vínculo, então precisam de um código de pareamento. Vincule-as uma de cada vez.}}", "87433cf138dc3e2c": "{linked, plural, one {# máquina vinculada.} other {# máquinas vinculadas.}}", "d044bb95248da10c": "{linked} de {total} vinculadas. As que falharam continuam selecionadas para você tentar de novo.", "d2fbaffe08b6cf60": "{count, plural, one {Vincular # máquina} other {Vincular # máquinas}}", "8e3378b526d615f4": "Vincular vários…", - "7f8d6d1af69829d8": "Vincular vários ambientes", "b550d04490078bda": "Os agentes daqui poderão então iniciar threads em cada máquina escolhida, enviar mensagens e aguardá-las. Cada vínculo aparece em Clientes autorizados em Compartilhamento e acesso da respectiva máquina, onde pode ser revogado.", "c2553b323479499a": "Este app não conhece outras máquinas. Adicione-as primeiro em Ambientes.", "18b1d4d42b945b34": "Máquinas", @@ -9815,6 +9839,7 @@ "51497bd401292062": "Manter pressionado", "9d6cc6ac23312071": "Pressionar duas vezes", "f001fa7b329c8fbf": "Ocultar bem-sucedidas", + "ad208e3e32c85029": "Ocultar todas", "c80e4bb3201efd71": "Zen", "0cb9ffcd1fb46b0c": "Só status", "cf0f7fc3df26fa75": "Status e mensagens", @@ -10024,6 +10049,7 @@ "573ea5fdf293a9d6": "Todos os checkouts", "470ad8c54049d1e1": "Pesquisar checkouts", "7e2dfdd9f97fc027": "Escopo de projeto", + "1cf216566c1ee064": "Projeto indisponível", "c1b8c351aa90f319": [ { "t": "span", diff --git a/apps/web/src/i18n/translations/ru.json b/apps/web/src/i18n/translations/ru.json index 8ab143c760858..c05fe68df1450 100644 --- a/apps/web/src/i18n/translations/ru.json +++ b/apps/web/src/i18n/translations/ru.json @@ -5780,14 +5780,13 @@ "b6a29fff7c7c0808": "Нет", "54420465784bb1bd": "Загрузить старые комментарии", "9d82ebf35bfb4043": "Здесь пока ничего не происходило.", - "1cf216566c1ee064": "Проект недоступен", "b5ddadeb0810688c": "Состояние", "93c1fc19d9bf1db0": "Участие", "d5a8b335d88b65bc": "Скрыто: {hidden}", "2160067266a61dd8": "Любая", "cd4ec4acf33c65b9": "{count, plural, one {{count} метка} few {{count} метки} many {{count} меток} other {{count} метки}}", "bfd20acb8b7dee6b": "Любой", - "ad208e3e32c85029": "Скрывать все", + "aead644e2cf1233f": "Показать все", "77ce79d865716719": "Нет подходящих проектов.", "af7eb4f9c7f0f575": "Фильтры", "08247dd39b0c85ff": "Исполнитель", @@ -6463,7 +6462,6 @@ "64d0189be492147c": "Не удалось открыть подробности проверки", "600347ca50400a54": "Загрузка проверок…", "1b381201aba745c2": "Нет проверок", - "aead644e2cf1233f": "Показать все", "a6d75a4380173c60": "Открыть проверки: {summary}", "be3d1766bad18693": "Проверки: {summary}", "425e4a3d6c5c2867": "{count, plural, one {Ошибок: {count}} few {Ошибок: {count}} many {Ошибок: {count}} other {Ошибок: {count}}}", @@ -8353,6 +8351,15 @@ "219bc3612d646a01": "Удалить маршрут", "b2877341429675aa": "через {route}", "537e7cf4df7a0af1": "Этот браузер", + "692153ec34a9a7bd": "Найти машину на карте", + "288ab5c45a9539a3": "Найти машину", + "c263859f8bcc7b1c": "Нет машины с таким именем", + "1bcc5f963ef39c7b": "{count, plural, one {# совпадение. Enter — перейти к первому} few {# совпадения. Enter — перейти к первому} many {# совпадений. Enter — перейти к первому} other {# совпадения. Enter — перейти к первому}}", + "2bb44d78cb85c097": "{count, plural, one {Выбрана #} few {Выбрано #} many {Выбрано #} other {Выбрано #}}", + "bcf01a26153f6425": "Сбросить", + "d18ad97175bd2028": "Shift-щелчок или Shift-перетаскивание выбирает несколько", + "d9665bd69e7fd4f4": "Связать несколько…", + "8d5882faf1e5fb96": "С {source}", "601e0c9e6a45a54f": "Вместить карту в окно", "feec58f6653f5673": "Как читать линии", "e459bd5c53a993e2": "Используемый маршрут", @@ -8363,8 +8370,9 @@ "235b3e270162f18b": "Привязка: чем больше доступ, тем толще", "c326a7e66bab5da0": "Ваши окружения", "86222507d918084b": "Доступны через привязку", + "afc01d2ee8048b4b": "{label}, выбрано", "aa34f7bc5aaf6bb0": "Карта ваших машин", - "3b61cc529ae01681": "Стрелки перемещают между машинами. Enter открывает сведения о машине с её маршрутами и привязками. Tab с окружения ведёт к его кнопке привязки. Плюс и минус меняют масштаб, ноль вписывает карту.", + "edb6cb27ff7f446b": "Стрелки перемещают между машинами. Enter открывает сведения о машине с её маршрутами и связями. Пробел выбирает машину, чтобы связать несколько сразу. Tab из окружения ведёт к его кнопке связывания. Плюс и минус меняют масштаб, ноль вписывает карту.", "753b4a8ec5521c98": "Привязка от {source} к {target}: {summary}", "bb6a74a47a3852c7": "Срок истёк", "3076117d81a9c1c0": "Не отвечает", @@ -8372,15 +8380,21 @@ "8971602c42718d72": "Доступно", "1b256867b95ee022": "{days, plural, one {Истекает через {days} день} few {Истекает через {days} дня} many {Истекает через {days} дней} other {Истекает через {days} дня}}", "aae31cf2017dab5b": "Публичный", + "b4f6c341033a3c91": "Выключены", + "960255d19109dcd9": "Требуют обновления", "19f6a3505837907d": "{access}. Доступно {reachable} из {count}", - "325f85fe7ade4efd": "От {first} до {last}, машин: {count}, привязаны из {source}. {summary}", + "6f8f71c20ba546af": "Доступно {reachable} из {count}, из {sources} окружений", + "0d731c951986fac8": "{group}: окружений без связей — {count}, {range}", + "5feb96736385be01": "{range}, машин: {count}, связаны с {sources}. {summary}", "35b783cfc817cb6f": "Свернуть эти машины", + "14dcd5c89fd0f67f": "Показать первые {shown} машин на карте", "b8f2d917d3a592df": "Показать каждую машину на карте", + "ddc2106217bbde2d": "и ещё {count}", "b0d81579d80fb94a": "известна только по привязке", "2d3dc930fd1cdd55": "от {source}: {summary}", "911bc3bcde1aba3b": "{count, plural, one {# входящая привязка} few {# входящие привязки} many {# входящих привязок} other {# входящей привязки}}", - "0fecb34fd1ae531f": "{label}, в вашей учётной записи T3 Connect, не добавлена в это приложение. {status}", "930f9e01fc4591b4": "Выкл.", + "0fecb34fd1ae531f": "{label}, в вашей учётной записи T3 Connect, не добавлена в это приложение. {status}", "4a84ad9b7f8e4909": "Загрузка привязок…", "9c88c8e716354091": "Не удалось загрузить привязки", "f9733c7b64c6f5d9": "Привязанные окружения выключены", @@ -8389,6 +8403,7 @@ "5d252c8bbc3b24d0": "{status}. Привязки неизвестны", "ec2c609c028d63b4": "Привязать {label} к другой машине", "0a72d33781010657": "К этому нельзя привязать", + "22d1944bbd4d00b4": "{count, plural, one {Связать с # машиной. Выбор на следующем шаге} few {Связать с # машинами. Выбор на следующем шаге} many {Связать с # машинами. Выбор на следующем шаге} other {Связать с # машины. Выбор на следующем шаге}}", "4f10f6354f38106e": "Обновить привязку к {target}. Код сопряжения не нужен", "5a25bfd7c3a8e4b4": "Привязать к {target}. Код сопряжения не нужен", "b4b893b9c210e0ba": "Обновить привязку к {target}. Нужен код сопряжения с той машины", @@ -8397,13 +8412,20 @@ "7f045c3477f783cc": "{count, plural, one {# привязка требует внимания.} few {# привязки требуют внимания.} many {# привязок требуют внимания.} other {# привязки требуют внимания.}}", "d53ada50331e6041": "{machines, plural, one {# машина} few {# машины} many {# машин} other {# машины}}, {links, plural, =0 {нет привязок} one {# привязка} few {# привязки} many {# привязок} other {# привязки}}", "706ac721bf99036c": "{machines, plural, one {# машина} few {# машины} many {# машин} other {# машины}}", - "61287d7320b20cad": "Выберите машину, чтобы управлять ею. Чтобы привязать две машины, перетащите плюс окружения на другую машину или нажмите его, чтобы выбрать.", + "8cb29b21fc19a505": "Выберите машину, чтобы управлять ею. Чтобы связать две машины, перетащите плюс окружения на другую машину или нажмите его, чтобы выбрать. Чтобы связать несколько сразу, щёлкайте машины с Shift или обведите их рамкой с Shift, затем перетащите плюс на одну из них.", "743b93767ec7ebf8": "Выберите машину, чтобы управлять ею.", "718e9f7ff8f48497": "Привязка ведёт к одной машине и на ней заканчивается. Она не распространяется на машины, к которым привязана та.", "3e8441af6148878f": "Истекает {date}", + "4daaa2288b63a801": "{count, plural, one {# входящая связь} few {# входящие связи} many {# входящих связей} other {# входящей связи}}", + "5e7ed49a9fbfbcb4": "{count, plural, one {# окружение} few {# окружения} many {# окружений} other {# окружения}} без связей, не подключены", "786d62572ebcebdf": "{count, plural, one {# машина} few {# машины} many {# машин} other {# машины}}, привязаны из {source}, {access}, доступно: {reachable}", + "7762644204376a63": "{count, plural, one {# машина} few {# машины} many {# машин} other {# машины}}, каждая связана с {sources}, доступно: {reachable}", "166aac696c3ec460": "Свернуть на карте", + "d4e68210142d6734": "Показать первые {shown} на карте", "069d8ba658617f30": "Показать каждую на карте", + "c7e1635b229d7249": "Фильтровать эти машины по имени", + "52a07016be1bea99": "Фильтр по имени", + "a7061489aec79ba8": "{shown} из {count}", "eefe994332120d82": "Привязать", "9aca4025e20bef31": "Подключено окружений: {connected} из {total}", "7f3ea6eba251a165": "Каждая линия отсюда — сохранённый маршрут к окружению. Карта показывает привязки окружений, к которым подключено это приложение; у недоступного окружения могут быть привязки, которые не нарисованы.", @@ -8752,15 +8774,17 @@ "03ce9bea5f88ddbd": "Приложение не может подтвердить, что это одна из ваших машин. Вставленный код сопряжения будет отправлен туда.", "30b696434167411f": "Привязано", "80bbda74ee500b82": "Машина", + "4e7b0a3ced2d0f97": "Привязать несколько окружений", + "0f3a6d9b3350d800": "Связать несколько машин с {source}", "e5ac7abeaeb78750": "Снять выделение", "ab520df47bca22d2": "Выбрать все", "3a57c9bbcd12529f": "Не удалось проверить, какие машины уже привязаны, поэтому выбрать ни одну нельзя: {error}", "78ccf685018ef797": "Привязана", + "e82fad1c68674065": "{count, plural, one {# выбранная машина известна только по связи, поэтому ей нужен код сопряжения. Свяжите её отдельно.} few {# выбранные машины известны только по связи, поэтому им нужен код сопряжения. Свяжите их по одной.} many {# выбранных машин известны только по связи, поэтому им нужен код сопряжения. Свяжите их по одной.} other {# выбранной машины известны только по связи, поэтому им нужен код сопряжения. Свяжите их по одной.}}", "87433cf138dc3e2c": "{linked, plural, one {Привязана # машина.} few {Привязаны # машины.} many {Привязано # машин.} other {Привязано # машины.}}", "d044bb95248da10c": "Привязано {linked} из {total}. Машины с ошибкой остаются выбранными, чтобы можно было повторить попытку.", "d2fbaffe08b6cf60": "{count, plural, one {Привязать # машину} few {Привязать # машины} many {Привязать # машин} other {Привязать # машины}}", "8e3378b526d615f4": "Привязать несколько…", - "7f8d6d1af69829d8": "Привязать несколько окружений", "b550d04490078bda": "После этого агенты отсюда смогут запускать треды на каждой выбранной машине, писать в них и ждать их. Каждая связь появится в разделе «Авторизованные клиенты» в «Общем доступе» соответствующей машины, где её можно отозвать.", "c2553b323479499a": "Это приложение не знает других машин. Сначала добавьте их в разделе «Окружения».", "18b1d4d42b945b34": "Машины", @@ -9818,6 +9842,7 @@ "51497bd401292062": "Удержание", "9d6cc6ac23312071": "Двойное нажатие", "f001fa7b329c8fbf": "Скрывать успешные", + "ad208e3e32c85029": "Скрывать все", "c80e4bb3201efd71": "Дзен", "0cb9ffcd1fb46b0c": "Только статус", "cf0f7fc3df26fa75": "Статус и сообщения", @@ -10027,6 +10052,7 @@ "573ea5fdf293a9d6": "Все копии", "470ad8c54049d1e1": "Поиск копий", "7e2dfdd9f97fc027": "Область проектов", + "1cf216566c1ee064": "Проект недоступен", "c1b8c351aa90f319": [ { "t": "span", diff --git a/apps/web/src/i18n/translations/sv.json b/apps/web/src/i18n/translations/sv.json index 9c5444718521e..f38f6a25dc080 100644 --- a/apps/web/src/i18n/translations/sv.json +++ b/apps/web/src/i18n/translations/sv.json @@ -5781,14 +5781,13 @@ "b6a29fff7c7c0808": "Ingen", "54420465784bb1bd": "Läs in äldre kommentarer", "9d82ebf35bfb4043": "Inget har hänt här än.", - "1cf216566c1ee064": "Projektet är inte tillgängligt", "b5ddadeb0810688c": "Status", "93c1fc19d9bf1db0": "Inblandning", "d5a8b335d88b65bc": "{hidden} dolda", "2160067266a61dd8": "Alla", "cd4ec4acf33c65b9": "{count, plural, one {{count} etikett} other {{count} etiketter}}", "bfd20acb8b7dee6b": "Vem som helst", - "ad208e3e32c85029": "Dölj alla", + "aead644e2cf1233f": "Visa alla", "77ce79d865716719": "Inga matchande projekt.", "af7eb4f9c7f0f575": "Filter", "08247dd39b0c85ff": "Tilldelad", @@ -6469,7 +6468,6 @@ "64d0189be492147c": "Det gick inte att öppna kontrolldetaljer", "600347ca50400a54": "Läser in kontroller…", "1b381201aba745c2": "Inga kontroller rapporterade", - "aead644e2cf1233f": "Visa alla", "a6d75a4380173c60": "Öppna kontroller: {summary}", "be3d1766bad18693": "Kontroller: {summary}", "425e4a3d6c5c2867": "{count, plural, one {{count} misslyckades} other {{count} misslyckades}}", @@ -8359,6 +8357,15 @@ "219bc3612d646a01": "Ta bort rutt", "b2877341429675aa": "via {route}", "537e7cf4df7a0af1": "Den här webbläsaren", + "692153ec34a9a7bd": "Hitta en maskin på kartan", + "288ab5c45a9539a3": "Hitta en maskin", + "c263859f8bcc7b1c": "Ingen maskin med det namnet", + "1bcc5f963ef39c7b": "{count, plural, one {# träff. Enter går dit} other {# träffar. Enter går till den första}}", + "2bb44d78cb85c097": "{count, plural, one {# vald} other {# valda}}", + "bcf01a26153f6425": "Rensa", + "d18ad97175bd2028": "Skift-klicka eller Skift-dra för att välja flera", + "d9665bd69e7fd4f4": "Länka flera…", + "8d5882faf1e5fb96": "Från {source}", "601e0c9e6a45a54f": "Anpassa kartan till vyn", "feec58f6653f5673": "Så läser du linjerna", "e459bd5c53a993e2": "Rutt som används", @@ -8369,8 +8376,9 @@ "235b3e270162f18b": "Länk, tjockare med mer åtkomst", "c326a7e66bab5da0": "Dina miljöer", "86222507d918084b": "Nås via en länk", + "afc01d2ee8048b4b": "{label}, vald", "aa34f7bc5aaf6bb0": "Karta över dina maskiner", - "3b61cc529ae01681": "Piltangenterna flyttar mellan maskiner. Enter öppnar en maskins detaljer, med dess rutter och länkar. Tabb från en miljö går till dess länkknapp. Plus och minus zoomar, noll anpassar kartan.", + "edb6cb27ff7f446b": "Piltangenterna flyttar mellan maskiner. Enter öppnar en maskins detaljer med dess rutter och länkar. Blanksteg väljer en maskin för att länka flera på en gång. Tabb från en miljö når dess länkknapp. Plus och minus zoomar, noll anpassar kartan.", "753b4a8ec5521c98": "Länk från {source} till {target}: {summary}", "bb6a74a47a3852c7": "Har gått ut", "3076117d81a9c1c0": "Svarar inte", @@ -8378,15 +8386,21 @@ "8971602c42718d72": "Nåbar", "1b256867b95ee022": "{days, plural, one {Går ut om {days} dag} other {Går ut om {days} dagar}}", "aae31cf2017dab5b": "Publik", + "b4f6c341033a3c91": "Avstängda", + "960255d19109dcd9": "Behöver uppdateras", "19f6a3505837907d": "{access}. {reachable} av {count} nåbara", - "325f85fe7ade4efd": "{first} till {last}, {count} maskiner länkade från {source}. {summary}", + "6f8f71c20ba546af": "{reachable} av {count} nåbara, från {sources} miljöer", + "0d731c951986fac8": "{group}: {count} miljöer utan länkar, {range}", + "5feb96736385be01": "{range}, {count} maskiner länkade från {sources}. {summary}", "35b783cfc817cb6f": "Fäll ihop de här maskinerna", + "14dcd5c89fd0f67f": "Visa de första {shown} maskinerna på kartan", "b8f2d917d3a592df": "Visa varje maskin på kartan", + "ddc2106217bbde2d": "och {count} till", "b0d81579d80fb94a": "känd endast via en länk", "2d3dc930fd1cdd55": "från {source}: {summary}", "911bc3bcde1aba3b": "{count, plural, one {# inkommande länk} other {# inkommande länkar}}", - "0fecb34fd1ae531f": "{label}, på ditt T3 Connect-konto, inte tillagd i den här appen. {status}", "930f9e01fc4591b4": "Av", + "0fecb34fd1ae531f": "{label}, på ditt T3 Connect-konto, inte tillagd i den här appen. {status}", "4a84ad9b7f8e4909": "Läser in länkar…", "9c88c8e716354091": "Länkarna kunde inte läsas in", "f9733c7b64c6f5d9": "Länkade miljöer är avstängt", @@ -8395,6 +8409,7 @@ "5d252c8bbc3b24d0": "{status}. Länkar okända", "ec2c609c028d63b4": "Länka {label} till en annan maskin", "0a72d33781010657": "Går inte att länka till detta", + "22d1944bbd4d00b4": "{count, plural, one {Länka till # maskin. Välj vilken i nästa steg} other {Länka till # maskiner. Välj vilka i nästa steg}}", "4f10f6354f38106e": "Förnya länken till {target}. Ingen parkopplingskod behövs", "5a25bfd7c3a8e4b4": "Länka till {target}. Ingen parkopplingskod behövs", "b4b893b9c210e0ba": "Förnya länken till {target}. Kräver en parkopplingskod därifrån", @@ -8403,13 +8418,20 @@ "7f045c3477f783cc": "{count, plural, one {# länk behöver åtgärdas.} other {# länkar behöver åtgärdas.}}", "d53ada50331e6041": "{machines, plural, one {# dator} other {# datorer}}, {links, plural, =0 {inga länkar} one {# länk} other {# länkar}}", "706ac721bf99036c": "{machines, plural, one {# maskin} other {# maskiner}}", - "61287d7320b20cad": "Välj en maskin för att hantera den. För att länka två maskiner drar du plustecknet på en miljö till en annan maskin, eller trycker på det för att välja en.", + "8cb29b21fc19a505": "Välj en maskin för att hantera den. För att länka två maskiner drar du plustecknet på en miljö till en annan maskin, eller trycker på det för att välja en. För att länka flera på en gång, Skift-klicka på maskiner eller Skift-dra en ruta runt dem och dra sedan plustecknet till en av dem.", "743b93767ec7ebf8": "Välj en maskin för att hantera den.", "718e9f7ff8f48497": "En länk når en dator och stannar där. Den går inte vidare till de datorer som den datorn länkar till.", "3e8441af6148878f": "Går ut {date}", + "4daaa2288b63a801": "{count, plural, one {# länk in} other {# länkar in}}", + "5e7ed49a9fbfbcb4": "{count, plural, one {# miljö} other {# miljöer}} utan länkar, inte anslutna", "786d62572ebcebdf": "{count, plural, one {# maskin länkad} other {# maskiner länkade}} från {source}, {access}, {reachable} nåbara", + "7762644204376a63": "{count, plural, one {# maskin} other {# maskiner}}, var och en länkad från {sources}, {reachable} nåbara", "166aac696c3ec460": "Fäll ihop på kartan", + "d4e68210142d6734": "Visa de första {shown} på kartan", "069d8ba658617f30": "Visa var och en på kartan", + "c7e1635b229d7249": "Filtrera dessa maskiner efter namn", + "52a07016be1bea99": "Filtrera efter namn", + "a7061489aec79ba8": "{shown} av {count}", "eefe994332120d82": "Länka", "9aca4025e20bef31": "Ansluten till {connected} av {total} miljöer", "7f3ea6eba251a165": "Varje linje härifrån är en sparad rutt till en miljö. Kartan visar länkarna för de miljöer som appen är ansluten till; en miljö den inte når kan ha länkar som inte ritas ut.", @@ -8758,15 +8780,17 @@ "03ce9bea5f88ddbd": "Appen kan inte bekräfta att det är en av dina datorer. Parkopplingskoden du klistrar in skickas dit.", "30b696434167411f": "Länkad", "80bbda74ee500b82": "Dator", + "4e7b0a3ced2d0f97": "Länka flera miljöer", + "0f3a6d9b3350d800": "Länka flera maskiner från {source}", "e5ac7abeaeb78750": "Avmarkera allt", "ab520df47bca22d2": "Markera allt", "3a57c9bbcd12529f": "Det gick inte att kontrollera vilka datorer som redan är länkade, så ingen kan väljas: {error}", "78ccf685018ef797": "Länkad", + "e82fad1c68674065": "{count, plural, one {# maskin du valde är bara känd genom en länk och behöver därför en parkopplingskod. Länka den separat.} other {# maskiner du valde är bara kända genom en länk och behöver därför en parkopplingskod. Länka dem en i taget.}}", "87433cf138dc3e2c": "{linked, plural, one {Länkade # dator.} other {Länkade # datorer.}}", "d044bb95248da10c": "Länkade {linked} av {total}. De som misslyckades är fortfarande markerade så att du kan försöka igen.", "d2fbaffe08b6cf60": "{count, plural, one {Länka # dator} other {Länka # datorer}}", "8e3378b526d615f4": "Länka flera…", - "7f8d6d1af69829d8": "Länka flera miljöer", "b550d04490078bda": "Agenter här kan sedan starta, skicka meddelanden till och vänta på trådar på varje dator du väljer. Varje länk visas under Auktoriserade klienter i den datorns Delning och åtkomst, där den kan återkallas.", "c2553b323479499a": "Den här appen känner inte till några andra datorer. Lägg först till dem under Miljöer.", "18b1d4d42b945b34": "Datorer", @@ -9824,6 +9848,7 @@ "51497bd401292062": "Håll ned", "9d6cc6ac23312071": "Dubbeltryck", "f001fa7b329c8fbf": "Dölj lyckade", + "ad208e3e32c85029": "Dölj alla", "c80e4bb3201efd71": "Zen", "0cb9ffcd1fb46b0c": "Endast status", "cf0f7fc3df26fa75": "Status och meddelanden", @@ -10033,6 +10058,7 @@ "573ea5fdf293a9d6": "Alla utcheckningar", "470ad8c54049d1e1": "Sök utcheckningar", "7e2dfdd9f97fc027": "Projektomfång", + "1cf216566c1ee064": "Projektet är inte tillgängligt", "c1b8c351aa90f319": [ { "t": "span", diff --git a/apps/web/src/i18n/translations/zh.json b/apps/web/src/i18n/translations/zh.json index 829a37430d51d..d189fb1d1471a 100644 --- a/apps/web/src/i18n/translations/zh.json +++ b/apps/web/src/i18n/translations/zh.json @@ -5787,14 +5787,13 @@ "b6a29fff7c7c0808": "无", "54420465784bb1bd": "加载较早的评论", "9d82ebf35bfb4043": "这里还没有任何动态。", - "1cf216566c1ee064": "不可用的项目", "b5ddadeb0810688c": "状态", "93c1fc19d9bf1db0": "参与方式", "d5a8b335d88b65bc": "已隐藏 {hidden} 个", "2160067266a61dd8": "任意", "cd4ec4acf33c65b9": "{count, plural, other {{count} 个标签}}", "bfd20acb8b7dee6b": "任何人", - "ad208e3e32c85029": "全部隐藏", + "aead644e2cf1233f": "全部显示", "77ce79d865716719": "没有匹配的项目。", "af7eb4f9c7f0f575": "筛选条件", "08247dd39b0c85ff": "受理人", @@ -6475,7 +6474,6 @@ "64d0189be492147c": "无法打开检查详情", "600347ca50400a54": "正在加载检查…", "1b381201aba745c2": "未报告任何检查", - "aead644e2cf1233f": "全部显示", "a6d75a4380173c60": "打开检查:{summary}", "be3d1766bad18693": "检查:{summary}", "425e4a3d6c5c2867": "{count, plural, other {{count} 个失败}}", @@ -8369,6 +8367,15 @@ "219bc3612d646a01": "移除线路", "b2877341429675aa": "通过 {route}", "537e7cf4df7a0af1": "此浏览器", + "692153ec34a9a7bd": "在地图上查找机器", + "288ab5c45a9539a3": "查找机器", + "c263859f8bcc7b1c": "没有该名称的机器", + "1bcc5f963ef39c7b": "{count, plural, other {# 个匹配项。按 Enter 前往第一个}}", + "2bb44d78cb85c097": "{count, plural, other {已选择 # 台}}", + "bcf01a26153f6425": "清除", + "d18ad97175bd2028": "按住 Shift 点击或拖动可选择多台", + "d9665bd69e7fd4f4": "链接多台…", + "8d5882faf1e5fb96": "从 {source}", "601e0c9e6a45a54f": "让地图适应视图", "feec58f6653f5673": "如何看这些线", "e459bd5c53a993e2": "使用中的线路", @@ -8379,8 +8386,9 @@ "235b3e270162f18b": "关联,权限越大线越粗", "c326a7e66bab5da0": "你的环境", "86222507d918084b": "通过关联到达", + "afc01d2ee8048b4b": "{label},已选择", "aa34f7bc5aaf6bb0": "你的机器地图", - "3b61cc529ae01681": "方向键在机器之间移动。按 Enter 打开机器的详情,包括线路和关联。在环境上按 Tab 可到达它的关联按钮。加号和减号缩放,零让地图适应视图。", + "edb6cb27ff7f446b": "方向键在机器之间移动。Enter 打开机器的详情,包括其路由和链接。空格键选择机器以便一次链接多台。在环境上按 Tab 可到达其链接按钮。加号和减号缩放,零使地图适应视图。", "753b4a8ec5521c98": "从 {source} 到 {target} 的关联:{summary}", "bb6a74a47a3852c7": "已过期", "3076117d81a9c1c0": "无响应", @@ -8388,15 +8396,21 @@ "8971602c42718d72": "可访问", "1b256867b95ee022": "{days, plural, other {{days} 天后过期}}", "aae31cf2017dab5b": "公网", + "b4f6c341033a3c91": "已关闭", + "960255d19109dcd9": "需要更新", "19f6a3505837907d": "{access}。{count} 台中 {reachable} 台可访问", - "325f85fe7ade4efd": "{first} 到 {last},从 {source} 关联的 {count} 台机器。{summary}", + "6f8f71c20ba546af": "{count} 台中 {reachable} 台可达,来自 {sources} 个环境", + "0d731c951986fac8": "{group}:{count} 个没有链接的环境,{range}", + "5feb96736385be01": "{range},{count} 台机器,由 {sources} 链接。{summary}", "35b783cfc817cb6f": "折叠这些机器", + "14dcd5c89fd0f67f": "在地图上显示前 {shown} 台机器", "b8f2d917d3a592df": "在地图上显示每台机器", + "ddc2106217bbde2d": "另有 {count} 台", "b0d81579d80fb94a": "仅通过关联得知", "2d3dc930fd1cdd55": "来自 {source}:{summary}", "911bc3bcde1aba3b": "{count, plural, other {# 个向内的关联}}", - "0fecb34fd1ae531f": "{label},在你的 T3 Connect 账户中,尚未添加到此应用。{status}", "930f9e01fc4591b4": "关闭", + "0fecb34fd1ae531f": "{label},在你的 T3 Connect 账户中,尚未添加到此应用。{status}", "4a84ad9b7f8e4909": "正在加载关联…", "9c88c8e716354091": "无法加载关联", "f9733c7b64c6f5d9": "关联环境已关闭", @@ -8405,6 +8419,7 @@ "5d252c8bbc3b24d0": "{status}。关联未知", "ec2c609c028d63b4": "将 {label} 关联到另一台机器", "0a72d33781010657": "无法关联到这里", + "22d1944bbd4d00b4": "{count, plural, other {链接到 # 台机器。在下一步选择具体哪些}}", "4f10f6354f38106e": "续期到 {target} 的关联。无需配对码", "5a25bfd7c3a8e4b4": "关联到 {target}。无需配对码", "b4b893b9c210e0ba": "续期到 {target} 的关联。需要来自它的配对码", @@ -8413,13 +8428,20 @@ "7f045c3477f783cc": "{count, plural, other {# 个关联需要处理。}}", "d53ada50331e6041": "{machines, plural, other {# 台机器}},{links, plural, =0 {没有关联} other {# 个关联}}", "706ac721bf99036c": "{machines, plural, other {# 台机器}}", - "61287d7320b20cad": "选择一台机器进行管理。要关联两台机器,请将环境上的加号拖到另一台机器上,或按下它来选择一台。", + "8cb29b21fc19a505": "选择一台机器以管理它。要链接两台机器,将环境上的加号拖到另一台机器上,或按下它来选择一台。要一次链接多台,按住 Shift 点击机器或按住 Shift 拖出一个框选中它们,然后将加号拖到其中一台上。", "743b93767ec7ebf8": "选择一台机器进行管理。", "718e9f7ff8f48497": "关联只到达一台机器并止于此,不会延伸到那台机器所关联的其他机器。", "3e8441af6148878f": "{date} 到期", + "4daaa2288b63a801": "{count, plural, other {# 个传入链接}}", + "5e7ed49a9fbfbcb4": "{count, plural, other {# 个环境}},没有链接,未连接", "786d62572ebcebdf": "{count, plural, other {从 {source} 关联的 # 台机器}},{access},{reachable} 台可访问", + "7762644204376a63": "{count, plural, other {# 台机器}},每台都由 {sources} 链接,{reachable} 台可达", "166aac696c3ec460": "在地图上折叠", + "d4e68210142d6734": "在地图上显示前 {shown} 台", "069d8ba658617f30": "在地图上逐台显示", + "c7e1635b229d7249": "按名称筛选这些机器", + "52a07016be1bea99": "按名称筛选", + "a7061489aec79ba8": "{shown} / {count}", "eefe994332120d82": "关联", "9aca4025e20bef31": "已连接 {total} 个环境中的 {connected} 个", "7f3ea6eba251a165": "从这里出发的每条线都是通往某个环境的已保存线路。地图显示此应用已连接环境的关联;无法到达的环境可能有未画出的关联。", @@ -8768,15 +8790,17 @@ "03ce9bea5f88ddbd": "此应用无法确认它是你的机器之一。你粘贴的配对码会发送到那里。", "30b696434167411f": "已关联", "80bbda74ee500b82": "机器", + "4e7b0a3ced2d0f97": "关联多个环境", + "0f3a6d9b3350d800": "从 {source} 链接多台机器", "e5ac7abeaeb78750": "取消全选", "ab520df47bca22d2": "全选", "3a57c9bbcd12529f": "无法检查哪些机器已关联,因此暂时无法选择:{error}", "78ccf685018ef797": "已关联", + "e82fad1c68674065": "{count, plural, other {你选择的 # 台机器仅通过链接得知,因此需要配对码。请逐台链接。}}", "87433cf138dc3e2c": "{linked, plural, other {已关联 # 台机器。}}", "d044bb95248da10c": "已关联 {linked}/{total} 台。失败的机器仍保持选中,你可以重试。", "d2fbaffe08b6cf60": "{count, plural, other {关联 # 台机器}}", "8e3378b526d615f4": "关联多个…", - "7f8d6d1af69829d8": "关联多个环境", "b550d04490078bda": "这里的智能体随后就能在你选择的每台机器上启动会话、发送消息并等待结果。每个连接将显示在对应机器“共享与访问”的“已授权客户端”中,可在那里撤销。", "c2553b323479499a": "此应用不知道其他机器。请先在“环境”中添加。", "18b1d4d42b945b34": "机器", @@ -9831,6 +9855,7 @@ "51497bd401292062": "长按", "9d6cc6ac23312071": "连按两次", "f001fa7b329c8fbf": "隐藏成功的调用", + "ad208e3e32c85029": "全部隐藏", "c80e4bb3201efd71": "专注模式", "0cb9ffcd1fb46b0c": "仅状态", "cf0f7fc3df26fa75": "状态和消息", @@ -10040,6 +10065,7 @@ "573ea5fdf293a9d6": "所有工作副本", "470ad8c54049d1e1": "搜索工作副本", "7e2dfdd9f97fc027": "项目范围", + "1cf216566c1ee064": "不可用的项目", "c1b8c351aa90f319": [ { "t": "span", diff --git a/docs/user/remote-access.md b/docs/user/remote-access.md index 7f5a7dad29840..4603f2c893a30 100644 --- a/docs/user/remote-access.md +++ b/docs/user/remote-access.md @@ -476,6 +476,21 @@ highlighted), and the machines an environment links to. Select a machine to manage it, or switch to **List** for the same controls as rows. To link from the map, drag the plus on an environment onto another machine, or press it and pick one. If this app is connected to both machines it needs no pairing code. + +To link one environment to several machines at once, Shift-click the machines +(or Shift-drag a box around them, or press Space on a focused machine), then +drag the environment's plus onto any of them, or use **Link several…** above +the map. Dropping the plus on a stack offers the stack's machines. The dialog +ticks the machines it can link without a pairing code and says why for the +rest. + +Large setups fold: machines known only through links that share the same +linking environments and access levels become one stack, and once this app +knows more than 12 environments, the ones that are not connected and have no +links fold by state. Select a stack to list and filter every machine in it; +opening a stack on the map draws its first 24. **Find a machine** above the map +searches by name, and Enter goes to the first match. + The map draws the links of the machines this app is connected to; a machine it is not connected to may hold links the map cannot show. A link reaches one machine and does not carry on through that machine's own links. From 1a728c72db8a32aa2f0e89767ea221611eb14c88 Mon Sep 17 00:00:00 2001 From: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com> Date: Thu, 19 Nov 2026 20:27:52 -0800 Subject: [PATCH 03/10] fix(web): environments map fits its width before it shrinks The map laid itself out at one fixed width and scaled the result to the canvas, so in a narrow settings column every label came out around 8px with empty bands above and below. The layout now takes the canvas width: gutters, wire runs and card widths tighten on a narrow canvas and open up on a wide one, and the fit only scales what is left. The canvas is as tall as the map, up to a higher cap. Environment names wrap to two lines, a stack shows its machine count and access meter, and a stack with machines that do not answer says how many do in its own band. Routes and link names out of focus stay solid and step back in colour, so no line shows through them. Co-Authored-By: Claude Fable 5.2 --- .../components/settings/EnvironmentsMap.tsx | 148 ++++++++++---- .../settings/environmentsMap.logic.test.ts | 84 +++++++- .../settings/environmentsMap.logic.ts | 191 ++++++++++++++---- apps/web/src/i18n/translations/de.json | 3 +- apps/web/src/i18n/translations/en.json | 3 +- apps/web/src/i18n/translations/es.json | 3 +- apps/web/src/i18n/translations/fr.json | 3 +- apps/web/src/i18n/translations/ja.json | 3 +- apps/web/src/i18n/translations/ko.json | 3 +- apps/web/src/i18n/translations/pt-BR.json | 3 +- apps/web/src/i18n/translations/ru.json | 3 +- apps/web/src/i18n/translations/sv.json | 3 +- apps/web/src/i18n/translations/zh.json | 3 +- 13 files changed, 366 insertions(+), 87 deletions(-) diff --git a/apps/web/src/components/settings/EnvironmentsMap.tsx b/apps/web/src/components/settings/EnvironmentsMap.tsx index 923a727979c2f..3c9773b50a5bf 100644 --- a/apps/web/src/components/settings/EnvironmentsMap.tsx +++ b/apps/web/src/components/settings/EnvironmentsMap.tsx @@ -25,6 +25,7 @@ import { MinusIcon, PlusIcon, SearchIcon, + TriangleAlertIcon, UnfoldVerticalIcon, FoldVerticalIcon, } from "lucide-react"; @@ -78,7 +79,9 @@ import { fleetNeighborhood, fleetNodesInBox, fleetSearch, + fleetLayoutWidth, fleetShapeKey, + fleetStackPartial, fleetStacks, type FleetColumn, type FleetDirection, @@ -92,6 +95,7 @@ import { type FleetLinkEdge, type FleetNode, type FleetRect, + type FleetRouteEdge, type FleetRouteState, type FleetStack, type FleetViewTransform, @@ -121,7 +125,8 @@ type Messages = ReturnType; /** One ordinal scale for access, read only to full access: a link's line gets heavier and darker. */ const ACCESS_STROKE_WIDTHS = [1.25, 1.75, 2.25, 2.75, 3.5]; const ACCESS_STROKE_OPACITIES = [0.4, 0.5, 0.62, 0.76, 0.9]; -const CANVAS_HEIGHT = { min: 260, max: 620 }; +/** Short maps get a short canvas; a tall one grows to this before the fit shrinks it. */ +const CANVAS_HEIGHT = { min: 180, max: 840 }; const ARROW_ROVE: Record = { ArrowUp: "up", ArrowDown: "down", @@ -331,12 +336,21 @@ function useFleetGraph() { return { graph, environments, connectProblem }; } -/** The layout for the graph's current shape; a health or status change reuses the last one. */ -function useFleetLayout(graph: FleetGraph, stacks: ReadonlyArray) { - const key = fleetShapeKey(graph, stacks); - const [laid, setLaid] = useState(() => ({ key, layout: layoutFleetGraph(graph, stacks) })); +/** + * The layout for the graph's current shape at the canvas's width; a health or status change + * reuses the last one. + */ +function useFleetLayout( + graph: FleetGraph, + stacks: ReadonlyArray, + shapeKey: string, + canvasWidth: number | null, +) { + const width = canvasWidth === null ? undefined : fleetLayoutWidth(canvasWidth); + const key = `${shapeKey}\n${width}`; + const [laid, setLaid] = useState(() => ({ key, layout: layoutFleetGraph(graph, stacks, width) })); if (laid.key === key) return laid; - const next = { key, layout: layoutFleetGraph(graph, stacks) }; + const next = { key, layout: layoutFleetGraph(graph, stacks, width) }; setLaid(next); return next; } @@ -368,7 +382,7 @@ export function EnvironmentsMap( const { graph, environments, connectProblem } = useFleetGraph(); const [expanded, setExpanded] = useState(NO_STACKS); const stacks = fleetStacks(graph, expanded); - const { key, layout } = useFleetLayout(graph, stacks); + const key = fleetShapeKey(graph, stacks); const [picked, setPicked] = useState(null); // Machines ticked for a batch link: apart from `picked`, which is what the details show. const [ticked, setTicked] = useState(NO_SELECTION); @@ -453,7 +467,6 @@ export function EnvironmentsMap( void; } -interface FleetCanvasProps extends FleetSceneProps { +interface FleetCanvasProps extends Omit { + /** The graph's shape. The canvas lays it out at its own width. */ readonly shapeKey: string; readonly onClearTicked: () => void; readonly onLinkSeveral: (sourceId: string) => void; @@ -532,16 +546,18 @@ interface FleetCanvasProps extends FleetSceneProps { } function FleetCanvas({ - shapeKey, + shapeKey: graphKey, onClearTicked, onLinkSeveral, onFind, ...scene }: FleetCanvasProps) { const gt = useGT(); - const { graph, stacks, layout, selection, selected, onSelect, onTick } = scene; + const { graph, stacks, selection, selected, onSelect, onTick } = scene; const [canvas, setCanvas] = useState(null); const [width, setWidth] = useState(null); + // A new width is a new layout, so a view held by hand goes with it as with any other shape. + const { key: shapeKey, layout } = useFleetLayout(graph, stacks, graphKey, width); const [query, setQuery] = useState(""); // A view the user set by hand holds until the map's shape changes; otherwise it fits itself. const [manual, setManual] = useState<{ @@ -853,7 +869,7 @@ function FleetCanvas({ ref={setCanvas} data-dragging={dragging || undefined} data-glide={glide || undefined} - className="relative min-h-65 cursor-grab touch-none overflow-clip bg-background/50 select-none data-dragging:cursor-grabbing data-glide:transition-[background-size,background-position] data-glide:duration-200 data-glide:ease-out motion-reduce:transition-none" + className="relative min-h-45 cursor-grab touch-none overflow-clip bg-background/50 select-none data-dragging:cursor-grabbing data-glide:transition-[background-size,background-position] data-glide:duration-200 data-glide:ease-out motion-reduce:transition-none" style={ view === null || size === null ? undefined @@ -881,7 +897,7 @@ function FleetCanvas({ transform: `translate(${view.x}px, ${view.y}px) scale(${view.scale})`, }} > - +

    )} {box === null ? null : ( @@ -1147,8 +1163,19 @@ const FleetScene = memo(function FleetScene({ const fadeLine = (dimmed: boolean) => cn( "transition-opacity duration-150 motion-reduce:transition-none", - dimmed && "opacity-15 forced-colors:opacity-40", + dimmed && "opacity-25 forced-colors:opacity-40", + ); + // A name on a line stays solid when out of focus, so the lines under it never show through: + // its text and outline step back instead. + const fadeName = (dimmed: boolean) => + cn( + "transition-colors duration-150 motion-reduce:transition-none", + dimmed && "border-border/50 font-normal text-muted-foreground/45", ); + const routeLit = (edge: FleetRouteEdge) => lit === null || lit.edges.has(edge.id); + // Painted last, so the routes in focus lie over the ones that are not. + const routePaintOrder = + lit === null ? routeEdges : routeEdges.toSorted((a, b) => +routeLit(a) - +routeLit(b)); const linkLit = (edge: FleetLinkEdge) => isSelected("edge", edge.id) || (lit?.edges.has(edge.id) ?? false); // Painted last, so the links in focus lie over the ones that are not. @@ -1331,7 +1358,7 @@ const FleetScene = memo(function FleetScene({ fill="none" strokeLinecap="round" > - {routeEdges.map((edge) => { + {routePaintOrder.map((edge) => { const geometry = layout.routes.get(edge.id); if (geometry === undefined) return null; const style = ROUTE_STYLES[edge.state]; @@ -1342,7 +1369,7 @@ const FleetScene = memo(function FleetScene({ stroke="currentColor" strokeWidth={style.width} strokeDasharray={style.dash} - className={cn(style.wire, fadeLine(lit !== null && !lit.edges.has(edge.id)))} + className={cn(style.wire, fadeLine(!routeLit(edge)))} /> ); })} @@ -1463,8 +1490,10 @@ const FleetScene = memo(function FleetScene({ style={{ left: pill.x, top: pill.y, width: pill.width, height: pill.height }} className={cn( "absolute flex items-center justify-center rounded-full border bg-background px-1.5 text-2xs leading-none text-muted-foreground", - ROUTE_STYLES[edge.state].pill, - fadeLine(lit !== null && !lit.edges.has(edge.id)), + routeLit(edge) && ROUTE_STYLES[edge.state].pill, + // Lit routes sit over the others, whose wires pass beside them on the way in. + routeLit(edge) && "z-1", + fadeName(!routeLit(edge)), )} > {routeKindLabel(edge.routeKind, gt)} @@ -1506,16 +1535,19 @@ const FleetScene = memo(function FleetScene({ }} className={cn( "absolute flex cursor-pointer items-center gap-1.5 rounded-full border border-border bg-card px-1.5 text-2xs leading-none outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset aria-pressed:border-primary aria-pressed:text-primary", - healthTone(edge.health), + lit === null || lit.edges.has(edge.id) ? healthTone(edge.health) : null, badge.onDemand && "z-10 shadow-sm/5", - fadeLine(lit !== null && !lit.edges.has(edge.id)), + fadeName(lit !== null && !lit.edges.has(edge.id)), )} onClick={() => onSelect(isSelected("edge", edge.id) ? null : target)} onFocus={() => setHover(target)} onBlur={() => setHover(null)} {...hoverProps(target)} > - + {m(accessConfig[edge.link.access].label)} ); @@ -1556,7 +1588,9 @@ const FleetScene = memo(function FleetScene({ .join(", "), summary, }); - const troubled = group === null && stack.reachable < count; + const partial = fleetStackPartial(stack); + // The room a closed stack's card adds below its name when some machines do not answer. + const partialBand = partial && !stack.expanded ? 20 : 0; const ToggleIcon = stack.expanded ? FoldVerticalIcon : UnfoldVerticalIcon; const hidden = count - stack.shownIds.length; return ( @@ -1589,34 +1623,65 @@ const FleetScene = memo(function FleetScene({ {...focusProps({ kind: "stack", id: stack.id }, face, spoken)} className={cn( nodeClass(stack.id), - "gap-2 px-2.5 pr-8", + "flex-col items-stretch overflow-clip", stack.expanded ? "rounded-t-xl" - : "rounded-lg border border-foreground/25 bg-card hover:border-foreground/50", + : "rounded-lg border bg-card hover:border-foreground/50", + !stack.expanded && (partial ? "border-warning/60" : "border-foreground/25"), !stack.expanded && group !== null && "border-dashed", holdsSelection(stack) && "ring-2 ring-primary ring-inset forced-colors:outline-2", )} > - + {group ?? range} - - {count} - + {group === null && !stack.expanded ? null : ( + + {count} + + )} - {stack.expanded ? null : ( - - {summary} + {stack.expanded ? null : group !== null ? ( + + {range} + + ) : ( + + {only !== undefined && stack.sources.length === 1 ? ( + + ) : null} + + {gt("{machines, plural, one {# machine} other {# machines}}", { + machines: count, + })} + )} + {partialBand === 0 ? null : ( + // The headline of a stack that is partly down: its own band, never cut short. + + + + {gt("{reachable, plural, =0 {None reachable} other {# reachable}}", { + reachable: stack.reachable, + $context: + "on a card for a group of linked machines: how many of them answer right now", + })} + + + + + + )}
    + {dropped === null ? null : ( + + )}
    {/* Below the canvas, not over it: nothing on the map can end up under the controls. */}
    - + 0} />
    + } + /> + + {machines.map((machine) => ( + onLinkOne(dropped.sourceId, machine.id)}> + {machine.label} + + ))} + + + +
    + ); +} + function actionText(action: FleetLinkAction | null, target: string, gt: GT): string { if (action === null) return gt("Cannot link to this"); + if (action.kind === "code-only") { + return gt( + "{count, plural, one {This app is not connected to # machine here. It needs a pairing code} other {This app is not connected to these # machines. Each needs a pairing code}}", + { count: action.machineIds.length }, + ); + } if (action.kind === "batch") { return gt( "{count, plural, one {Link to # machine. Pick which in the next step} other {Link to # machines. Pick which in the next step}}", @@ -1153,6 +1305,10 @@ const FleetScene = memo(function FleetScene({ ]), ); const links = graph.edges.filter(isLinkEdge); + const pairs = fleetTwoWayLinks(graph); + const labelOf = (id: string) => nodeById.get(id)?.label ?? ""; + /** The other link of the two-way link `edge` is drawn for. */ + const backOf = (edge: FleetLinkEdge) => pairs.get(edge.id)?.back; const routeEdges = graph.edges.filter(isRouteEdge); const focusRects = fleetFocusRects(layout); const tabStop = focusRects.has(roving) ? roving : FLEET_CLIENT_NODE_ID; @@ -1419,31 +1575,48 @@ const FleetScene = memo(function FleetScene({ {paintOrder.map((edge) => { const geometry = layout.links.get(edge.id); if (geometry === undefined) return null; - const { arrow } = geometry; const selected = isSelected("edge", edge.id); const level = accessLevel(edge.link.access); - const healthy = edge.health.kind === "reachable" && edge.health.expiresInDays === null; + const back = backOf(edge); + // A two-way link is drawn in halves, each leading into the machine its link reaches, + // so a direction in trouble shows at its own end. + const parts: ReadonlyArray = + geometry.twoWay !== null && back !== undefined + ? [ + [geometry.twoWay.forward, geometry.arrow, edge.health], + [geometry.twoWay.back, geometry.twoWay.backArrow, back.health], + ] + : [[geometry.d, geometry.arrow, edge.health]]; return ( - - + {parts.map(([d, arrow, health]) => ( + + + + + ))} ); })} @@ -1465,13 +1638,7 @@ const FleetScene = memo(function FleetScene({ onClick={() => onSelect(selected ? null : { kind: "edge", id: edge.id })} {...hoverProps({ kind: "edge", id: edge.id })} > - - {gt("Link from {source} to {target}: {summary}", { - source: nodeById.get(edge.from)?.label ?? "", - target: nodeById.get(edge.to)?.label ?? "", - summary: linkSummary(edge, gt, m), - })} - + {linkName(edge, backOf(edge), labelOf, gt, m)} ); })} @@ -1512,6 +1679,8 @@ const FleetScene = memo(function FleetScene({ const badge = layout.links.get(edge.id)?.badge; if (!badge) return null; const target = { kind: "edge", id: edge.id } as const; + const back = backOf(edge); + const health = back === undefined ? edge.health : worseLinkHealth(edge.health, back.health); // With no clear place of its own, the name shows only while its link is the one in focus. if ( badge.onDemand && @@ -1527,11 +1696,7 @@ const FleetScene = memo(function FleetScene({ data-fleet-item="" tabIndex={-1} aria-pressed={isSelected("edge", edge.id)} - aria-label={gt("Link from {source} to {target}: {summary}", { - source: nodeById.get(edge.from)?.label ?? "", - target: nodeById.get(edge.to)?.label ?? "", - summary: linkSummary(edge, gt, m), - })} + aria-label={linkName(edge, back, labelOf, gt, m)} // Hangs off its own lane and grows away from the lanes beside it. style={{ top: badge.y, @@ -1543,7 +1708,7 @@ const FleetScene = memo(function FleetScene({ }} className={cn( "absolute flex cursor-pointer items-center gap-1.5 rounded-full border border-border bg-card px-1.5 text-2xs leading-none outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset aria-pressed:border-primary aria-pressed:text-primary", - lit === null || lit.edges.has(edge.id) ? healthTone(edge.health) : null, + lit === null || lit.edges.has(edge.id) ? healthTone(health) : null, badge.onDemand && "z-10 shadow-sm/5", fadeName(lit !== null && !lit.edges.has(edge.id)), )} @@ -1552,6 +1717,9 @@ const FleetScene = memo(function FleetScene({ onBlur={() => setHover(null)} {...hoverProps(target)} > + {back === undefined ? null : ( + + )} void; /** Opens the link flow from an environment, with no target picked yet. */ readonly onLinkFrom: (sourceId: string) => void; + /** Opens the link flow from a one-way link's target back to its source. */ + readonly onLinkBack: (edge: FleetLinkEdge) => void; readonly onToggleStack: (stackId: string) => void; /** The list's own row for a saved environment, or null where the list has none. */ readonly renderSavedEnvironment: (environment: EnvironmentPresentation) => ReactNode; @@ -142,6 +146,7 @@ export function FleetDetails(props: FleetDetailsProps) { const stack = selection?.kind === "stack" ? stacks.find((entry) => entry.id === selection.id) : undefined; const labelOf = (id: string) => graph.nodes.find((entry) => entry.id === id)?.label ?? ""; + const pair = edge === undefined ? undefined : fleetTwoWayLinks(graph).get(edge.id); // Choosing inside the panel replaces the control that was pressed, so focus stays on the panel. const selectWithin = (focus: FleetFocus) => { onSelect(focus); @@ -168,7 +173,27 @@ export function FleetDetails(props: FleetDetailsProps) {
    ) : null} - {edge ? ( + {pair ? ( +
    +

    + {gt( + "{source} and {target} link to each other with the same access, so the map draws both links as one line. Each is its own link, and is forgotten on its own.", + { source: labelOf(pair.forward.from), target: labelOf(pair.forward.to) }, + )} +

    +
    + {[pair.forward, pair.back].map((link) => ( + + ))} +
    +
    + ) : edge ? (
    props.onLinkBack(edge) } + : {})} />
    ) : stack ? ( @@ -765,11 +793,14 @@ function LinkDetails({ sourceLabel, targetLabel, onSelect, + onLinkBack, }: { readonly edge: FleetLinkEdge; readonly sourceLabel: string; readonly targetLabel: string; readonly onSelect: (focus: FleetFocus) => void; + /** Set where this app can link the target back to the source with no pasted code. */ + readonly onLinkBack?: () => void; }) { const gt = useGT(); const m = useMessages(); @@ -807,16 +838,25 @@ function LinkDetails({ {targetLabel} - {canUnlink ? ( - - ) : null} +
    + {onLinkBack ? ( + + ) : null} + {canUnlink ? ( + + ) : null} +
    {gt("Access", { $context: "access level" })}
    diff --git a/apps/web/src/components/settings/LinkSeveralEnvironments.tsx b/apps/web/src/components/settings/LinkSeveralEnvironments.tsx index 6103a72623e4c..b270203b217d2 100644 --- a/apps/web/src/components/settings/LinkSeveralEnvironments.tsx +++ b/apps/web/src/components/settings/LinkSeveralEnvironments.tsx @@ -19,7 +19,7 @@ import { useId, useRef, useState } from "react"; import { useEnvironments } from "~/state/environments"; import { mintPairingCodeOn } from "~/state/peerPairingCode"; -import { peerLinkEnvironment, useLinkableMachines } from "~/state/peerLinks"; +import { peerLinkEnvironment, useLinkableMachines, useLinkBackOffers } from "~/state/peerLinks"; import { useEnvironmentQuery } from "~/state/query"; import { useEnvironmentsWithScope } from "~/state/session"; import { useAtomCommand } from "~/state/use-atom-command"; @@ -71,12 +71,15 @@ export function LinkSeveralEnvironmentsDialog({ open, onOpenChange, preset, + presetOnly = false, }: { readonly environmentId: EnvironmentId; readonly open: boolean; readonly onOpenChange: (open: boolean) => void; /** Machines picked before the dialog opened. Those a batch cannot link stay unticked. */ readonly preset?: ReadonlyArray; + /** Lists only the `preset` machines: they were picked for this link, not as a suggestion. */ + readonly presetOnly?: boolean; }) { const gt = useGT(); const m = useMessages(); @@ -84,7 +87,11 @@ export function LinkSeveralEnvironmentsDialog({ const sourceLabel = useEnvironments().environments.find( (environment) => environment.environmentId === environmentId, )?.label; - const machines = useLinkableMachines(environmentId, open); + const known = useLinkableMachines(environmentId, open); + const machines = + presetOnly && preset !== undefined + ? known.filter((machine) => preset.includes(machine.environmentId)) + : known; // The same shared list `useLinkableMachines` reads `linked` from. const links = useEnvironmentQuery( open ? peerLinkEnvironment.list({ environmentId, input: {} }) : null, @@ -97,19 +104,37 @@ export function LinkSeveralEnvironmentsDialog({ const [linking, setLinking] = useState(NO_MACHINES); // Enter then a click can both run before a re-render; this guard is synchronous. const inFlight = useRef(false); + // The failure cause holds the request, and with it the code; keep it out of the console. + const quiet = { reportFailure: false, reportDefect: false }; const link = useAtomCommand(peerLinkEnvironment.linkInBatch, { label: "link several environments", - // The failure cause holds the request, and with it the code; keep it out of the console. - reportFailure: false, - reportDefect: false, + ...quiet, }); + // Each machine links back once, so each refreshes its own list. + const linkOn = useAtomCommand(peerLinkEnvironment.link, { + label: "link environment back", + ...quiet, + }); + const [alsoLinkBack, setAlsoLinkBack] = useState(false); const candidates = linkBatchCandidates(machines, writable, linksState); const selectable = candidates.flatMap(({ machine, blocked }) => blocked === null && outcomes.get(machine.environmentId)?.kind !== "linked" ? [machine] : [], ); const chosen = selectable.filter((machine) => selected.has(machine.environmentId)); + const linkBack = useLinkBackOffers( + environmentId, + selectable.map((machine) => machine.environmentId), + open, + ); + const canLinkBack = (machine: { readonly environmentId: EnvironmentId }) => + linkBack.offerFor(machine.environmentId).kind === "offered"; + const backOffered = linkBack.source !== null && selectable.some(canLinkBack); + const oneWayOnly = chosen.filter((machine) => !canLinkBack(machine)).length; const busy = linking.size > 0; const summary = linkBatchSummary(outcomes); + const backFailed = [...outcomes.values()].filter( + (outcome) => outcome.kind === "linked" && outcome.back?.kind === "failed", + ).length; // Picked on the map, but only another machine's link names them: this app has no session there. const unlisted = (preset ?? []).filter( (id) => !candidates.some(({ machine }) => machine.environmentId === id), @@ -121,6 +146,7 @@ export function LinkSeveralEnvironmentsDialog({ setSelected(NO_MACHINES); setOutcomes(NO_OUTCOMES); setAccess("approval-required"); + setAlsoLinkBack(false); } }; const toggle = (id: EnvironmentId, checked: boolean) => @@ -144,6 +170,20 @@ export function LinkSeveralEnvironmentsDialog({ ? Result.succeed(result.value) : Result.fail(squashAtomCommandFailure(result)); }, + ...(alsoLinkBack && linkBack.source !== null + ? { + back: { + source: linkBack.source, + targets: new Set(chosen.filter(canLinkBack).map((machine) => machine.environmentId)), + link: async (targetId, input) => { + const result = await linkOn({ environmentId: targetId, input }); + return result._tag === "Success" + ? Result.succeed(result.value) + : Result.fail(squashAtomCommandFailure(result)); + }, + }, + } + : {}), refreshLinks: links.refresh, onOutcome: (id, outcome) => { setOutcomes((current) => new Map(current).set(id, outcome)); @@ -194,7 +234,11 @@ export function LinkSeveralEnvironmentsDialog({ > {candidates.length === 0 ? (

    - This app knows no other machines. Add them under Environments first. + {presetOnly ? ( + This app is not connected to any of the machines you picked. + ) : ( + This app knows no other machines. Add them under Environments first. + )}

    ) : (
    @@ -253,10 +297,21 @@ export function LinkSeveralEnvironmentsDialog({ const id = machine.environmentId; const outcome = outcomes.get(id); const available = blocked === null && outcome?.kind !== "linked"; + const back = outcome?.kind === "linked" ? outcome.back : undefined; const status = linking.has(id) ? gt("Linking…") : outcome?.kind === "linked" - ? gt("Linked", { $context: "status of a machine that was just linked" }) + ? back?.kind === "linked" + ? gt("Linked both ways", { + $context: + "status of a machine that was just linked in both directions", + }) + : back?.kind === "failed" + ? gt("Linked one way", { + $context: + "status of a machine: the link to it was made, the link back from it failed", + }) + : gt("Linked", { $context: "status of a machine that was just linked" }) : outcome?.kind === "failed" ? linkBatchFailureLabel(outcome.failure, m) : blocked === null @@ -281,11 +336,18 @@ export function LinkSeveralEnvironmentsDialog({ {outcome.detail} ) : null} + {back?.kind === "failed" ? ( + + {gt("Could not link back: {reason}", { + reason: back.detail ?? linkBatchFailureLabel(back.failure, m), + })} + + ) : null} {status === null ? null : ( 0 + ? ` ${gt( + "{count, plural, one {# machine could not link back. Select the link on the map to try again.} other {# machines could not link back. Select each link on the map to try again.}}", + { count: backFailed }, + )}` + : null}

    ) : null} + {backOffered && sourceLabel !== undefined ? ( + + ) : null} diff --git a/apps/web/src/components/settings/LinkedEnvironmentsSettings.tsx b/apps/web/src/components/settings/LinkedEnvironmentsSettings.tsx index 1499872b4b031..86beaf978a460 100644 --- a/apps/web/src/components/settings/LinkedEnvironmentsSettings.tsx +++ b/apps/web/src/components/settings/LinkedEnvironmentsSettings.tsx @@ -1,4 +1,9 @@ import { useAtomValue } from "@effect/atom-react"; +import { + linkBackBlockLabel, + linkBatchFailureLabel, + linkWithMintedCode, +} from "@t3tools/client-runtime/link-batch"; import { ANOTHER_ADDRESS, linkRequestFailureMessage } from "@t3tools/client-runtime/link-request"; import { AuthAccessWriteScope, @@ -21,7 +26,7 @@ import { type ReactNode, useId, useRef, useState } from "react"; import { requestConfirmDialog } from "~/confirmDialog"; import { useEnvironment } from "~/state/environments"; import { mintPairingCodeOn } from "~/state/peerPairingCode"; -import { peerLinkEnvironment, useLinkableMachines } from "~/state/peerLinks"; +import { peerLinkEnvironment, useLinkableMachines, useLinkBackOffers } from "~/state/peerLinks"; import { useEnvironments } from "~/state/environments"; import { useEnvironmentQuery } from "~/state/query"; import { useEnvironmentScope, usePreparedConnection } from "~/state/session"; @@ -29,6 +34,7 @@ import { useAtomCommand } from "~/state/use-atom-command"; import { accessConfig } from "../auth/ConnectAgentSurface"; import { ConnectionStatusDot } from "../ConnectionStatusDot"; import { Button } from "../ui/button"; +import { Checkbox } from "../ui/checkbox"; import { Dialog, DialogClose, @@ -233,6 +239,7 @@ export function LinkEnvironmentDialog({ readonly prefill?: LinkEnvironmentPrefill; }) { const gt = useGT(); + const m = useMessages(); const setOpen = onOpenChange; // Named in the title: from the map, nothing else on screen says which machine is linking. const source = useEnvironment(environmentId); @@ -249,6 +256,13 @@ export function LinkEnvironmentDialog({ const inFlight = useRef(false); const formId = useId(); const link = useAtomCommand(peerLinkEnvironment.link, { label: LINK_COMMAND_LABEL }); + const linkOnTarget = useAtomCommand(peerLinkEnvironment.link, { + label: "link environment back", + // The failure cause holds the request, and with it the code; keep it out of the console. + reportFailure: false, + reportDefect: false, + }); + const [alsoLinkBack, setAlsoLinkBack] = useState(false); const selected = choice ?? (machines.length === 0 ? ANOTHER_ADDRESS : null); const machine = machines.find((candidate) => candidate.environmentId === selected) ?? null; const targetId = machine?.environmentId ?? null; @@ -265,6 +279,8 @@ export function LinkEnvironmentDialog({ Option.isSome(connected) && mayMint && !mintFailed.has(targetId); + const linkBack = useLinkBackOffers(environmentId, targetId === null ? [] : [targetId], open); + const backOffer = linkBack.offerFor(targetId); const ready = selected !== null && (!needsAddress || address.trim().length > 0) && @@ -277,6 +293,7 @@ export function LinkEnvironmentDialog({ setPairingCode(""); setAccess("approval-required"); setMintFailed(new Set()); + setAlsoLinkBack(false); } }; // Settles to the code to link with, or null after reporting why there is none. @@ -314,14 +331,43 @@ export function LinkEnvironmentDialog({ access, }, }); + // The link back is its own link, made on the other machine: it never undoes this one. + const back = + result?._tag === "Success" && + alsoLinkBack && + backOffer.kind === "offered" && + linkBack.source !== null && + targetId !== null + ? await linkWithMintedCode({ + machine: linkBack.source, + access, + mint: mintPairingCodeOn, + link: async (input) => { + const reverse = await linkOnTarget({ environmentId: targetId, input }); + return reverse._tag === "Success" + ? Result.succeed(reverse.value) + : Result.fail(squashAtomCommandFailure(reverse)); + }, + }) + : null; inFlight.current = false; setBusy(false); if (result === null) return; if (result._tag === "Success") { + const names = { source: source?.label ?? "", target: result.value.label }; toastManager.add({ type: "success", - title: gt("Linked {label}", { label: result.value.label }), + title: + back?.kind === "linked" + ? gt("Linked {source} and {target} both ways", names) + : gt("Linked {label}", { label: result.value.label }), }); + if (back?.kind === "failed") { + failureToast( + gt("Could not link {target} back to {source}", names), + back.detail ?? linkBatchFailureLabel(back.failure, m), + ); + } handleOpenChange(false); } else if (!isAtomCommandInterrupted(result)) { failureToast(gt("Could not link the environment"), String(squashAtomCommandFailure(result))); @@ -435,6 +481,37 @@ export function LinkEnvironmentDialog({ )} + {machine === null || source === null ? null : backOffer.kind === "offered" ? ( + + ) : backOffer.kind === "blocked" ? ( +

    + {linkBackBlockLabel( + backOffer.reason, + { source: source.label, target: machine.label }, + m, + )} +

    + ) : null} diff --git a/apps/web/src/components/settings/environmentsMap.logic.test.ts b/apps/web/src/components/settings/environmentsMap.logic.test.ts index bf1046185fd01..b0b78a43fdcd4 100644 --- a/apps/web/src/components/settings/environmentsMap.logic.test.ts +++ b/apps/web/src/components/settings/environmentsMap.logic.test.ts @@ -15,7 +15,9 @@ import { FLEET_ROUTE_PITCH, FLEET_STACK_SHOWN_MAX, fleetFocusRects, + fleetDrawnLinkId, fleetLinkAction, + fleetLinkBackOffered, fleetLinkOffer, fleetMoreNodeId, fleetNeighborhood, @@ -24,6 +26,8 @@ import { fleetShapeKey, fleetStacks, fleetSummary, + fleetTwoWayLinks, + isLinkEdge, isRouteEdge, layoutFleetGraph, nextFleetNode, @@ -549,9 +553,19 @@ describe("fleetLinkAction", () => { ).toMatchObject({ kind: "single" }); }); - it("links to every machine of a stack dropped on, and offers nothing from a host that cannot link", () => { + it("opens no batch for machines the client has no session on, and offers nothing from a host that cannot link", () => { + const members = ["fs-1", "fs-2", "fs-3", "fs-4", "fs-5", "fs-6"].map(node); + // A stack of machines known only through links: each needs a code, so no batch can link one. expect(fleetLinkAction(graph, stacks, new Set(), node("cups"), stacks[0]!.id)).toEqual({ - ...batch(["fs-1", "fs-2", "fs-3", "fs-4", "fs-5", "fs-6"]), + kind: "code-only", + sourceId: node("cups"), + sourceEnvironmentId: id("cups"), + machineIds: members, + }); + // One the client is connected to among them makes it a batch, which says why for the rest. + const mixed = new Set([node("fs-1"), node("fs-2"), node("mbp")]); + expect(fleetLinkAction(graph, stacks, mixed, node("cups"), node("mbp"))).toEqual({ + ...batch(["fs-1", "fs-2", "mbp"]), sourceEnvironmentId: id("cups"), }); for (const source of ["mbp", "vps"]) { @@ -562,6 +576,66 @@ describe("fleetLinkAction", () => { }); }); +describe("fleetTwoWayLinks", () => { + const graph = build([ + environment("a", [link("b"), link("c", { access: "full-access" }), link("d")]), + environment("b", [link("a", { status: "unreachable" })]), + environment("c", [link("a", { access: "auto" })]), + environment("d"), + ]); + const pairs = fleetTwoWayLinks(graph); + const edge = (from: string, to: string) => `link:${node(from)}>${node(to)}`; + + it("merges two links between the same machines only at the same access", () => { + expect([...pairs.keys()].toSorted()).toEqual([edge("a", "b"), edge("b", "a")]); + // Both links select the one line, drawn as the link from the machine listed first. + expect(fleetDrawnLinkId(pairs, edge("b", "a"))).toBe(edge("a", "b")); + expect(fleetDrawnLinkId(pairs, edge("a", "b"))).toBe(edge("a", "b")); + // Different access says two different things, and a one-way link has no other half. + expect(fleetDrawnLinkId(pairs, edge("c", "a"))).toBe(edge("c", "a")); + expect(fleetDrawnLinkId(pairs, edge("a", "d"))).toBe(edge("a", "d")); + }); + + it("keeps each direction's own health, and counts both links", () => { + const pair = pairs.get(edge("a", "b"))!; + expect(pair.forward.health.kind).toBe("reachable"); + expect(pair.back.health.kind).toBe("unreachable"); + expect(fleetSummary(graph).links).toBe(5); + }); + + it("lights both links and both machines' routes from either one", () => { + const lit = fleetNeighborhood(graph, [], { kind: "edge", id: edge("a", "b") }); + expect(lit.edges.has(edge("a", "b")) && lit.edges.has(edge("b", "a"))).toBe(true); + expect(lit.edges.has(`route:${node("a")}:tailnet`)).toBe(true); + expect(lit.edges.has(`route:${node("b")}:tailnet`)).toBe(true); + expect(lit.edges.has(edge("a", "d"))).toBe(false); + }); + + it("offers the link back on a one-way link only where the client can make it", () => { + const linkEdge = (from: ReturnType, source: string, target: string) => + from.edges.filter(isLinkEdge).find((entry) => entry.id === edge(source, target))!; + expect(fleetLinkBackOffered(graph, linkEdge(graph, "a", "d"))).toBe(true); + // Already linked back, at whatever access. + expect(fleetLinkBackOffered(graph, linkEdge(graph, "a", "c"))).toBe(false); + for (const target of [ + environment("d", "unknown", { phase: "offline" }), + environment("d", "off", { offersLinks: false }), + environment("d", [], { canWriteAccess: false }), + environment("d", "loading"), + ]) { + const other = build([environment("a", [link("d")]), target]); + expect(fleetLinkBackOffered(other, linkEdge(other, "a", "d"))).toBe(false); + } + for (const source of [{ canWriteAccess: false }, { hasLinkAddress: false }]) { + const other = build([environment("a", [link("d")], source), environment("d")]); + expect(fleetLinkBackOffered(other, linkEdge(other, "a", "d"))).toBe(false); + } + // A machine known only through the link is not one the client can link from. + const unknown = build([environment("a", [link("x")])]); + expect(fleetLinkBackOffered(unknown, linkEdge(unknown, "a", "x"))).toBe(false); + }); +}); + describe("selecting and finding machines", () => { it("selects the machines a box touches, and never the client or a stack", () => { const graph = largeSetup(); @@ -665,8 +739,9 @@ describe("layoutFleetGraph", () => { it("names the access of links between environments on their own lane, clear of everything", () => { const graph = build([ environment("a", [link("b"), link("c"), link("x")]), - environment("b", [link("a"), link("x")]), - environment("c", [link("a")]), + // At another access than the links back, so each of the four is its own line. + environment("b", [link("a", { access: "auto" }), link("x")]), + environment("c", [link("a", { access: "auto" })]), ]); const layout = layoutFleetGraph(graph); const geometry = (from: string, to: string) => @@ -893,6 +968,10 @@ describe("layoutFleetGraph", () => { expect(leaves).toBeGreaterThan(from.y); expect(leaves).toBeLessThan(from.y + from.height); arrivals.set(edge.to, [...(arrivals.get(edge.to) ?? []), geometry.arrow.y]); + if (geometry.twoWay !== null) { + const into = arrivals.get(edge.from) ?? []; + arrivals.set(edge.from, [...into, geometry.twoWay.backArrow.y]); + } } for (const [id, heights] of arrivals) { const card = layout.nodes.get(id)!; @@ -911,6 +990,44 @@ describe("layoutFleetGraph", () => { } }); + it("draws a two-way link once, on one lane, with an arrowhead into each card", () => { + const setup = (back: Partial) => + build([environment("a", [link("b")]), environment("b", [link("a", back)])]); + const merged = setup({}); + const apart = setup({ access: "auto" }); + const forward = `link:${node("a")}>${node("b")}`; + const reverse = `link:${node("b")}>${node("a")}`; + const layout = layoutFleetGraph(merged); + const two = layoutFleetGraph(apart); + expect([...layout.links.keys()]).toEqual([forward]); + expect([...two.links.keys()].toSorted()).toEqual([forward, reverse]); + // Two lines need two lanes left of the cards; the merged one needs a single lane. + expect(two.nodes.get(node("a"))!.x - layout.nodes.get(node("a"))!.x).toBeGreaterThan(0); + expect(two.links.get(forward)!.twoWay).toBeNull(); + const geometry = layout.links.get(forward)!; + const { twoWay } = geometry; + expect(twoWay).not.toBeNull(); + for (const [arrow, cardId] of [ + [geometry.arrow, "b"], + [twoWay!.backArrow, "a"], + ] as const) { + const card = layout.nodes.get(node(cardId))!; + expect(arrow.x).toBe(card.x); + expect(arrow.y).toBeGreaterThan(card.y); + expect(arrow.y).toBeLessThan(card.y + card.height); + } + // Each half ends at its own arrowhead and the two meet, so one direction's state shows at + // its end without a gap in the line. + const forwardHalf = samplePath(twoWay!.forward); + const backHalf = samplePath(twoWay!.back); + expect(forwardHalf.at(-1)!.y).toBe(geometry.arrow.y); + expect(backHalf[0]!.y).toBe(twoWay!.backArrow.y); + expect(backHalf.at(-1)).toEqual(forwardHalf[0]); + expect(geometry.badge?.onDemand).toBe(false); + // Health is no part of the shape: one direction failing redraws nothing. + expect(fleetShapeKey(setup({ status: "unreachable" }), [])).toBe(fleetShapeKey(merged, [])); + }); + it("shows a link's name only on demand where it has no clear place", () => { const names = ["a", "b", "c", "d", "e"]; const graph = build( diff --git a/apps/web/src/components/settings/environmentsMap.logic.ts b/apps/web/src/components/settings/environmentsMap.logic.ts index ea250d022a57d..f67cbfd5cb353 100644 --- a/apps/web/src/components/settings/environmentsMap.logic.ts +++ b/apps/web/src/components/settings/environmentsMap.logic.ts @@ -2,6 +2,7 @@ import type { ConnectionRouteKind, EnvironmentConnectionPhase, } from "@t3tools/client-runtime/connection"; +import { linkBackOffer } from "@t3tools/client-runtime/link-batch"; import { peerLinkHealth, type PeerLinkHealth } from "@t3tools/client-runtime/state/peerLinks"; import { AuthMcpClientAccess, @@ -94,6 +95,8 @@ export type FleetNode = readonly linking: FleetLinking; /** The client can mint a pairing code there itself, so linking to it asks for none. */ readonly mintable: boolean; + readonly canWriteAccess: boolean; + readonly hasLinkAddress: boolean; } | { readonly id: string; @@ -207,6 +210,8 @@ export function buildFleetGraph(input: { environment.phase === "connected" && environment.canWriteAccess && environment.hasLinkAddress, + canWriteAccess: environment.canWriteAccess, + hasLinkAddress: environment.hasLinkAddress, }); for (const route of environment.routes) { const edgeId = `route:${id}:${route.id}`; @@ -277,6 +282,82 @@ export function buildFleetGraph(input: { export const isLinkEdge = (edge: FleetEdge): edge is FleetLinkEdge => edge.kind === "link"; export const isRouteEdge = (edge: FleetEdge): edge is FleetRouteEdge => edge.kind === "route"; +/** Two machines linked to each other at the same access: two links the map draws as one line. */ +export interface FleetTwoWayLink { + /** The one the line is drawn and selected as: from the machine listed first. */ + readonly forward: FleetLinkEdge; + readonly back: FleetLinkEdge; +} + +/** + * Every two-way link, under the id of each of its two links. Links at different access levels + * say different things, so they stay two lines. + */ +export function fleetTwoWayLinks(graph: FleetGraph): ReadonlyMap { + const links = new Map(graph.edges.filter(isLinkEdge).map((edge) => [edge.id, edge])); + const pairs = new Map(); + for (const forward of links.values()) { + const back = links.get(`link:${forward.to}>${forward.from}`); + if (back === undefined || back.link.access !== forward.link.access || pairs.has(forward.id)) { + continue; + } + const pair = { forward, back }; + pairs.set(forward.id, pair).set(back.id, pair); + } + return pairs; +} + +/** The link whose line stands for `edge`: itself, or the other half of its two-way link. */ +export const fleetDrawnLinkId = (pairs: ReadonlyMap, edgeId: string) => + pairs.get(edgeId)?.forward.id ?? edgeId; + +/** Worst first: expired, failing, not answering, expiring soon, fine. */ +export const linkTroubleRank = (health: PeerLinkHealth) => + health.kind === "expired" + ? 0 + : health.kind === "failing" + ? 1 + : health.kind === "unreachable" + ? 2 + : health.expiresInDays === null + ? 4 + : 3; + +/** The health a two-way link's one label wears: that of the direction in more trouble. */ +export const worseLinkHealth = (left: PeerLinkHealth, right: PeerLinkHealth) => + linkTroubleRank(right) < linkTroubleRank(left) ? right : left; + +/** + * Whether the map offers to link a one-way link's target back to its source: the same rule + * the link dialogs use, read from what the map knows of the two machines. + */ +export function fleetLinkBackOffered(graph: FleetGraph, edge: FleetLinkEdge): boolean { + const source = graph.nodes.find((node) => node.id === edge.from); + const target = graph.nodes.find((node) => node.id === edge.to); + if (source?.kind !== "environment" || target?.kind !== "environment") return false; + const offer = linkBackOffer({ + source: { + environmentId: source.environmentId, + connected: source.phase === "connected", + writable: source.canWriteAccess, + urls: source.hasLinkAddress ? [""] : [], + }, + target: { + connected: target.phase === "connected", + offersLinks: target.linking !== "off", + writable: target.canWriteAccess, + links: + target.outgoing === "loaded" + ? graph.edges + .filter(isLinkEdge) + .filter((other) => other.from === target.id) + .map((other) => other.link) + : null, + }, + }); + return offer.kind === "offered"; +} + /** * The setup in two numbers. `links` is null when the total is not known: a list still loading, * none read, or one failed among several. A failed or unread list is not "no links". @@ -486,12 +567,14 @@ export function fleetNeighborhood( const sources = new Set(); const stack = focus.kind === "stack" ? stacks.find((entry) => entry.id === focus.id) : undefined; const stackEdges = new Set(stack?.edgeIds); + // A two-way link is one line: either of its links brings the other with it. + const pair = focus.kind === "edge" ? fleetTwoWayLinks(graph).get(focus.id) : undefined; for (const edge of graph.edges) { const touches = focus.kind === "stack" ? stackEdges.has(edge.id) : focus.kind === "edge" - ? edge.id === focus.id + ? edge.id === focus.id || edge.id === pair?.forward.id || edge.id === pair?.back.id : edge.from === focus.id || edge.to === focus.id; if (!touches) continue; edges.add(edge.id); @@ -618,10 +701,26 @@ export interface FleetRouteGeometry { */ export type FleetLinkBadge = FleetRect & { readonly side: 1 | -1; readonly onDemand: boolean }; +export interface FleetArrow { + readonly x: number; + readonly y: number; + readonly dir: 1 | -1; +} + export interface FleetLinkGeometry { readonly d: string; /** Arrowhead tip and the horizontal direction it points. */ - readonly arrow: { readonly x: number; readonly y: number; readonly dir: 1 | -1 }; + readonly arrow: FleetArrow; + /** + * Set for a two-way link, which is one line with an arrowhead at each end. `arrow` and + * `forward` are the half leading into the machine the drawn link reaches; `backArrow` and + * `back` the half leading into the one it leaves, which is the other link's. + */ + readonly twoWay: { + readonly backArrow: FleetArrow; + readonly forward: string; + readonly back: string; + } | null; /** Where a link between two environments names its access; a target's card shows its own. */ readonly badge: FleetLinkBadge | null; } @@ -792,6 +891,20 @@ function elbowPath(x0: number, y0: number, viaX: number, x1: number, y1: number) ].join(""); } +/** `elbowPath` cut halfway along its vertical run: the half it starts with, then the other. */ +function elbowHalves(x0: number, y0: number, viaX: number, x1: number, y1: number) { + const dy = y1 - y0; + const mid = (y0 + y1) / 2; + const r = Math.min(CORNER, Math.abs(dy) / 2, Math.abs(viaX - x0), Math.abs(x1 - viaX)); + const sy = Math.sign(dy); + const inX = Math.sign(viaX - x0); + const outX = Math.sign(x1 - viaX); + return [ + `M${x0} ${y0}H${viaX - inX * r}Q${viaX} ${y0} ${viaX} ${y0 + sy * r}V${mid}`, + `M${viaX} ${mid}V${y1 - sy * r}Q${viaX} ${y1} ${viaX + outX * r} ${y1}H${x1}`, + ] as const; +} + /** Straight to `fanX`, across any lanes so they only ever meet it square, then a curve. */ const sCurve = (x0: number, y0: number, x1: number, y1: number, fanX = x0) => { // A short run bends within itself, so it still arrives level instead of doubling back. @@ -995,8 +1108,16 @@ function layoutFleetGraphAt( const reach = (link: FleetLinkEdge) => Math.abs(indexOf(link.to) - indexOf(link.from)); const low = (link: FleetLinkEdge) => Math.min(indexOf(link.from), indexOf(link.to)); const high = (link: FleetLinkEdge) => Math.max(indexOf(link.from), indexOf(link.to)); + // A two-way link is drawn once, as the link from the machine listed first. + const pairs = fleetTwoWayLinks(graph); + const twoWay = (link: FleetLinkEdge) => pairs.has(link.id); const between = links - .filter((link) => hostIndex.has(link.from) && hostIndex.has(link.to)) + .filter( + (link) => + hostIndex.has(link.from) && + hostIndex.has(link.to) && + fleetDrawnLinkId(pairs, link.id) === link.id, + ) .toSorted((left, right) => reach(left) - reach(right) || (left.id < right.id ? -1 : 1)); const betweenLanes: FleetLinkEdge[][] = []; const betweenLane = new Map(); @@ -1012,15 +1133,16 @@ function layoutFleetGraphAt( betweenLane.set(link.id, index); (betweenLanes[index] ??= []).push(link); } - // Such links meet a card's left edge above its routes when the other machine is above, and - // below them when it is below. Each link in has its own port, the outer lane's nearer the - // middle so two turning at one card never cross. The links out on a side share one port, as - // they share the handle on the right, so a card pays for its arrowheads only. + // Such a link meets a card's left edge above its routes when the other machine is above, + // below them when it is below. Each arrowhead has its own port, the outer lane's nearer the + // middle so two never cross. Links out on a side share one port; a two-way link arrives at + // both its cards. const leaves = new Set(); const arrivalsOf = new Map(); for (const link of between) { const down = Math.sign(indexOf(link.to) - indexOf(link.from)); - leaves.add(`${link.from}:${down}`); + if (twoWay(link)) pushTo(arrivalsOf, `${link.from}:${down}`, link); + else leaves.add(`${link.from}:${down}`); pushTo(arrivalsOf, `${link.to}:${-down}`, link); } for (const ports of arrivalsOf.values()) { @@ -1200,7 +1322,9 @@ function layoutFleetGraphAt( const side = Math.sign(indexOf(link.from === hostId ? link.to : link.from) - indexOf(hostId)); const key = `${hostId}:${side}`; const port = - link.from === hostId ? 0 : Number(leaves.has(key)) + arrivalsOf.get(key)!.indexOf(link); + link.from === hostId && !twoWay(link) + ? 0 + : Number(leaves.has(key)) + arrivalsOf.get(key)!.indexOf(link); return ( centerOf(hostId) + side * @@ -1281,6 +1405,7 @@ function layoutFleetGraphAt( linkGeometry.set(entry.key, { d: line.d, arrow: { ...line.arrow, dir: 1 }, + twoWay: null, badge: null, }); } @@ -1438,9 +1563,12 @@ function layoutFleetGraphAt( (option) => clearOfNames(option) && clearOfLanes(option) && clearOfRoutes(option), ); if (clear !== undefined) badges.push(clear); + const startX = twoWay(link) ? cardX - ARROW_LENGTH : cardX; + const [back, forward] = elbowHalves(startX, run.from, x, cardX - ARROW_LENGTH, run.to); linkGeometry.set(link.id, { - d: elbowPath(cardX, run.from, x, cardX - ARROW_LENGTH, run.to), + d: elbowPath(startX, run.from, x, cardX - ARROW_LENGTH, run.to), arrow: { x: cardX, y: run.to, dir: 1 }, + twoWay: twoWay(link) ? { backArrow: { x: cardX, y: run.from, dir: 1 }, forward, back } : null, badge: clear ?? { ...options[0]!, onDemand: true }, }); } @@ -1496,6 +1624,16 @@ export type FleetLinkAction = readonly sourceEnvironmentId: EnvironmentId; readonly environmentIds: ReadonlyArray; } + /** + * None of the machines dropped on can be linked from here in one go: this client has no + * session on any of them, so each needs a pairing code. `machineIds` are the map's nodes. + */ + | { + readonly kind: "code-only"; + readonly sourceId: string; + readonly sourceEnvironmentId: EnvironmentId; + readonly machineIds: ReadonlyArray; + } /** The single link flow; `offer` is null when no machine was named. */ | { readonly kind: "single"; @@ -1520,14 +1658,20 @@ export function fleetLinkAction( const sourceEnvironmentId = source.environmentId; const batch = (picked: Iterable): FleetLinkAction | null => { const environmentIds = new Set(); + const machineIds: string[] = []; + let known = false; for (const id of picked) { const node = byId.get(id); if (node === undefined || node.kind === "client" || node.id === source.id) continue; + if (!environmentIds.has(node.environmentId)) machineIds.push(node.id); environmentIds.add(node.environmentId); + known ||= node.kind !== "target"; } - return environmentIds.size === 0 - ? null - : { kind: "batch", sourceEnvironmentId, environmentIds: [...environmentIds] }; + if (environmentIds.size === 0) return null; + // One such machine is the single flow's, which asks for its code. + return known || machineIds.length < 2 + ? { kind: "batch", sourceEnvironmentId, environmentIds: [...environmentIds] } + : { kind: "code-only", sourceId: source.id, sourceEnvironmentId, machineIds }; }; const stack = targetId === null ? undefined : stacks.find((entry) => entry.id === targetId); if (stack !== undefined) return batch(stack.memberIds); diff --git a/apps/web/src/i18n/translations/de.json b/apps/web/src/i18n/translations/de.json index a98d3b0878857..e28e36711e4ed 100644 --- a/apps/web/src/i18n/translations/de.json +++ b/apps/web/src/i18n/translations/de.json @@ -78,6 +78,10 @@ "4f1ab8a69f4a85e5": "Diese App ist nicht damit verbunden", "95f18b6ad4a409de": "Deine Sitzung dort kann keine Kopplungscodes erstellen", "26847ec0357c8600": "Keine Adresse, die ein anderer Rechner erreichen kann", + "ec1a698b0821ec66": "{target} kann nicht zurückverknüpfen: Verknüpfte Umgebungen sind dort aus.", + "6cf74ace5a766699": "{target} kann nicht zurückverknüpfen: Deine Sitzung dort kann keine Verknüpfungen erstellen.", + "a995255a0f303086": "{target} kann nicht zurückverknüpfen: Deine Sitzung auf {source} kann keine Kopplungscodes erstellen.", + "a51c8cdfccb5b4ca": "{target} kann nicht zurückverknüpfen: Diese App kennt keine Adresse, unter der {source} erreichbar ist.", "cba6d3e3a22f2efe": "Nicht erreichbar", "0eb1a18deaf06b76": "Kopplungscode abgelehnt", "7d6fc963ebf9a9c5": "Eine andere Umgebung hat geantwortet", @@ -8369,6 +8373,10 @@ "a322337b6655de2a": "Nicht in Verwendung", "e31c7e76ef900ef4": "Anmeldung abgelehnt", "235b3e270162f18b": "Verknüpfung, kräftiger bei mehr Zugriff", + "4ae743f8566a1ef1": "Zwei Verknüpfungen, eine je Richtung", + "0b7e6bab12c8ad4c": "{count, plural, one {{source} wurde nicht mit # Rechner verknüpft.} other {{source} wurde nicht mit # Rechnern verknüpft.}}", + "dfea515dc1198934": "{count, plural, one {Diese App ist nicht damit verbunden, daher braucht er einen Kopplungscode.} other {Diese App ist nicht damit verbunden, daher braucht jeder einen Kopplungscode. Verknüpfe sie einzeln.}}", + "e0a8e0b87dca8241": "Einen mit Code verknüpfen…", "c326a7e66bab5da0": "Deine Umgebungen", "86222507d918084b": "Über eine Verknüpfung erreicht", "afc01d2ee8048b4b": "{label}, ausgewählt", @@ -8380,6 +8388,7 @@ "96fdb2fd529b1fbb": "Fehlerhaft", "8971602c42718d72": "Erreichbar", "1b256867b95ee022": "{days, plural, one {Läuft in {days} Tag ab} other {Läuft in {days} Tagen ab}}", + "9d02cb328944fb27": "Verknüpfung in beide Richtungen zwischen {source} und {target}, {access}. {source} zu {target}: {forward}. {target} zu {source}: {back}", "aae31cf2017dab5b": "Öffentlich", "b4f6c341033a3c91": "Ausgeschaltet", "960255d19109dcd9": "Update nötig", @@ -8406,12 +8415,14 @@ "5d252c8bbc3b24d0": "{status}. Verknüpfungen unbekannt", "ec2c609c028d63b4": "{label} mit einem anderen Rechner verknüpfen", "0a72d33781010657": "Damit ist keine Verknüpfung möglich", + "287a6aa91e444b27": "{count, plural, one {Diese App ist hier mit # Rechner nicht verbunden. Er braucht einen Kopplungscode} other {Diese App ist mit diesen # Rechnern nicht verbunden. Jeder braucht einen Kopplungscode}}", "22d1944bbd4d00b4": "{count, plural, one {Mit # Rechner verknüpfen. Auswahl im nächsten Schritt} other {Mit # Rechnern verknüpfen. Auswahl im nächsten Schritt}}", "4f10f6354f38106e": "Verknüpfung zu {target} erneuern. Kein Kopplungscode nötig", "5a25bfd7c3a8e4b4": "Mit {target} verknüpfen. Kein Kopplungscode nötig", "b4b893b9c210e0ba": "Verknüpfung zu {target} erneuern. Benötigt einen Kopplungscode von dort", "052c3f87704b216d": "Mit {target} verknüpfen. Benötigt einen Kopplungscode von dort", "e6b05c7e6ef4fef7": "Auf einem Rechner ablegen, um {source} damit zu verknüpfen", + "0ef2e932b40f0085": "{source} und {target} sind mit demselben Zugriff miteinander verknüpft, daher zeichnet die Karte beide Verknüpfungen als eine Linie. Jede ist eine eigene Verknüpfung und wird einzeln vergessen.", "7f045c3477f783cc": "{count, plural, one {# Verknüpfung braucht Aufmerksamkeit.} other {# Verknüpfungen brauchen Aufmerksamkeit.}}", "d53ada50331e6041": "{machines, plural, one {# Rechner} other {# Rechner}}, {links, plural, =0 {keine Verknüpfungen} one {# Verknüpfung} other {# Verknüpfungen}}", "8cb29b21fc19a505": "Wähle einen Rechner aus, um ihn zu verwalten. Um zwei Rechner zu verknüpfen, ziehe das Plus einer Umgebung auf einen anderen Rechner oder drücke es, um einen auszuwählen. Um mehrere auf einmal zu verknüpfen, klicke Rechner mit gedrückter Umschalttaste an oder ziehe mit Umschalt einen Rahmen um sie und ziehe dann das Plus auf einen davon.", @@ -8442,6 +8453,7 @@ "58cb9c075da185fb": "Verknüpfte Umgebungen werden geladen…", "126e2b7a117f01d5": "{count, plural, =0 {Mit keinem Rechner verknüpft} one {Verknüpft mit # Rechner} other {Verknüpft mit # Rechnern}}", "285d95a8e5ad0ec5": "ist verknüpft mit", + "ee2a5f5571bca358": "Zurückverknüpfen…", "57f38a04b1e5c033": "Wird vergessen…", "20ffe8337f8f30ba": "Vergessen", "1f221fe54654ed13": "Zugriff", @@ -8781,13 +8793,21 @@ "e5ac7abeaeb78750": "Nichts auswählen", "ab520df47bca22d2": "Alles auswählen", "3a57c9bbcd12529f": "Es konnte nicht geprüft werden, welche Rechner bereits verknüpft sind, daher kann keiner ausgewählt werden: {error}", + "4381e144bbeaddb2": "In beide Richtungen verknüpft", + "692450a6537f52a8": "In eine Richtung verknüpft", "78ccf685018ef797": "Verknüpft", + "956b5c20a1fba7c1": "Zurückverknüpfen fehlgeschlagen: {reason}", "e82fad1c68674065": "{count, plural, one {# ausgewählter Rechner ist nur über eine Verknüpfung bekannt und braucht daher einen Kopplungscode. Verknüpfe ihn einzeln.} other {# ausgewählte Rechner sind nur über eine Verknüpfung bekannt und brauchen daher einen Kopplungscode. Verknüpfe sie einzeln.}}", "87433cf138dc3e2c": "{linked, plural, one {# Rechner verknüpft.} other {# Rechner verknüpft.}}", "d044bb95248da10c": "{linked} von {total} verknüpft. Die fehlgeschlagenen bleiben ausgewählt, damit du es erneut versuchen kannst.", + "64768ee9ecd48309": "{count, plural, one {# Rechner konnte nicht zurückverknüpfen. Wähle die Verknüpfung auf der Karte aus, um es erneut zu versuchen.} other {# Rechner konnten nicht zurückverknüpfen. Wähle jede Verknüpfung auf der Karte aus, um es erneut zu versuchen.}}", + "86d17c42dae16356": "Auch jeden Rechner zurück mit {source} verknüpfen", + "3fc9f71471e4c0bb": "Agenten auf jedem Rechner können dann auch auf {source} arbeiten, mit demselben Zugriff. Jede ist eine zweite Verknüpfung, erstellt auf dem jeweiligen Rechner.", + "e1c55ea1297483f3": "{count, plural, one {# ausgewählter Rechner kann nicht zurückverknüpfen oder tut es bereits: Er wird in eine Richtung verknüpft.} other {# ausgewählte Rechner können nicht zurückverknüpfen oder tun es bereits: Sie werden in eine Richtung verknüpft.}}", "d2fbaffe08b6cf60": "{count, plural, one {# Rechner verknüpfen} other {# Rechner verknüpfen}}", "8e3378b526d615f4": "Mehrere verknüpfen…", "b550d04490078bda": "Agenten hier können dann auf jedem ausgewählten Rechner Threads starten, ihnen Nachrichten senden und auf sie warten. Jede Verknüpfung erscheint unter „Autorisierte Clients“ in „Freigabe & Zugriff“ des jeweiligen Rechners und kann dort widerrufen werden.", + "e1c2c3bd84d7bcd7": "Diese App ist mit keinem der ausgewählten Rechner verbunden.", "c2553b323479499a": "Diese App kennt keine anderen Rechner. Füge sie zuerst unter „Umgebungen“ hinzu.", "18b1d4d42b945b34": "Rechner", "03860d65c4052ab5": "Es wird geprüft, welche Rechner bereits verknüpft sind…", @@ -8795,9 +8815,13 @@ "25b74062dc03079e": "Keine verknüpften Umgebungen", "6698127fcc912f23": "Verknüpfe einen anderen Rechner mit T3 Code, etwa einen VPS, damit Agenten hier dort Threads starten und steuern können.", "e1789f863205ad5a": "Umgebung konnte nicht verknüpft werden", + "836dde1b729e6f0a": "{source} und {target} in beide Richtungen verknüpft", "40cde51afa218290": "{label} verknüpft", + "ca4e4015b89ed9a8": "{target} konnte nicht zurück mit {source} verknüpft werden", "64ac3d1579ca9f5b": "{source} mit {target} verknüpfen", "fb71127e5746a6bc": "Unter „Freigabe & Zugriff“ dort oder mit t3 pair", + "1e3fee7084791773": "Auch {target} zurück mit {source} verknüpfen", + "a46df5abb1115c63": "Agenten auf {target} können dann auch auf {source} arbeiten, mit demselben Zugriff. Das ist eine zweite Verknüpfung, erstellt auf {target}.", "ad5ed0ce61b966eb": "{label} vergessen? Agenten von hier arbeiten dort nicht mehr. Widerrufe „T3 Code · …“ unter „Freigabe & Zugriff“ auf {label}, um die Sitzung auch dort zu beenden.", "81c9796bf61b306a": "Verknüpfung konnte nicht vergessen werden", "130e51beb6cf5aad": "Umgebung verknüpfen", diff --git a/apps/web/src/i18n/translations/en.json b/apps/web/src/i18n/translations/en.json index c7eb97acaf0b1..8ea70869d0423 100644 --- a/apps/web/src/i18n/translations/en.json +++ b/apps/web/src/i18n/translations/en.json @@ -78,6 +78,10 @@ "4f1ab8a69f4a85e5": "This app is not connected to it", "95f18b6ad4a409de": "Your session there cannot create pairing codes", "26847ec0357c8600": "No address another machine can reach", + "ec1a698b0821ec66": "{target} cannot link back: Linked environments is off there.", + "6cf74ace5a766699": "{target} cannot link back: your session there cannot create links.", + "a995255a0f303086": "{target} cannot link back: your session on {source} cannot create pairing codes.", + "a51c8cdfccb5b4ca": "{target} cannot link back: this app has no address for {source} it can reach.", "cba6d3e3a22f2efe": "Unreachable", "0eb1a18deaf06b76": "Pairing code refused", "7d6fc963ebf9a9c5": "Another environment answered", @@ -8377,6 +8381,10 @@ "a322337b6655de2a": "Not in use", "e31c7e76ef900ef4": "Sign-in refused", "235b3e270162f18b": "Link, heavier with more access", + "4ae743f8566a1ef1": "Two links, one each way", + "0b7e6bab12c8ad4c": "{count, plural, one {{source} was not linked to # machine.} other {{source} was not linked to # machines.}}", + "dfea515dc1198934": "{count, plural, one {This app is not connected to it, so it needs a pairing code.} other {This app is not connected to them, so each needs a pairing code. Link them one at a time.}}", + "e0a8e0b87dca8241": "Link one with a code…", "c326a7e66bab5da0": "Your environments", "86222507d918084b": "Reached through a link", "afc01d2ee8048b4b": "{label}, selected", @@ -8388,6 +8396,7 @@ "96fdb2fd529b1fbb": "Failing", "8971602c42718d72": "Reachable", "1b256867b95ee022": "{days, plural, one {Expires in {days} day} other {Expires in {days} days}}", + "9d02cb328944fb27": "Two-way link between {source} and {target}, {access}. {source} to {target}: {forward}. {target} to {source}: {back}", "aae31cf2017dab5b": "Public", "b4f6c341033a3c91": "Switched off", "960255d19109dcd9": "Need an update", @@ -8414,12 +8423,14 @@ "5d252c8bbc3b24d0": "{status}. Links unknown", "ec2c609c028d63b4": "Link {label} to another machine", "0a72d33781010657": "Cannot link to this", + "287a6aa91e444b27": "{count, plural, one {This app is not connected to # machine here. It needs a pairing code} other {This app is not connected to these # machines. Each needs a pairing code}}", "22d1944bbd4d00b4": "{count, plural, one {Link to # machine. Pick which in the next step} other {Link to # machines. Pick which in the next step}}", "4f10f6354f38106e": "Renew the link to {target}. No pairing code needed", "5a25bfd7c3a8e4b4": "Link to {target}. No pairing code needed", "b4b893b9c210e0ba": "Renew the link to {target}. Needs a pairing code from it", "052c3f87704b216d": "Link to {target}. Needs a pairing code from it", "e6b05c7e6ef4fef7": "Drop on a machine to link {source} to it", + "0ef2e932b40f0085": "{source} and {target} link to each other with the same access, so the map draws both links as one line. Each is its own link, and is forgotten on its own.", "7f045c3477f783cc": "{count, plural, one {# link needs attention.} other {# links need attention.}}", "d53ada50331e6041": "{machines, plural, one {# machine} other {# machines}}, {links, plural, =0 {no links} one {# link} other {# links}}", "8cb29b21fc19a505": "Select a machine to manage it. To link two machines, drag the plus on an environment onto another machine, or press it to pick one. To link several at once, Shift-click machines or Shift-drag a box around them, then drag the plus onto one of them.", @@ -8450,6 +8461,7 @@ "58cb9c075da185fb": "Loading linked environments…", "126e2b7a117f01d5": "{count, plural, =0 {Links to no one} one {Links to # machine} other {Links to # machines}}", "285d95a8e5ad0ec5": "links to", + "ee2a5f5571bca358": "Link back…", "57f38a04b1e5c033": "Forgetting…", "20ffe8337f8f30ba": "Forget", "1f221fe54654ed13": "Access", @@ -8789,13 +8801,21 @@ "e5ac7abeaeb78750": "Select none", "ab520df47bca22d2": "Select all", "3a57c9bbcd12529f": "Could not check which machines are already linked, so none can be picked: {error}", + "4381e144bbeaddb2": "Linked both ways", + "692450a6537f52a8": "Linked one way", "78ccf685018ef797": "Linked", + "956b5c20a1fba7c1": "Could not link back: {reason}", "e82fad1c68674065": "{count, plural, one {# machine you picked is known only through a link, so it needs a pairing code. Link it on its own.} other {# machines you picked are known only through a link, so they need a pairing code. Link them one at a time.}}", "87433cf138dc3e2c": "{linked, plural, one {Linked # machine.} other {Linked # machines.}}", "d044bb95248da10c": "Linked {linked} of {total}. The ones that failed stay selected, so you can try them again.", + "64768ee9ecd48309": "{count, plural, one {# machine could not link back. Select the link on the map to try again.} other {# machines could not link back. Select each link on the map to try again.}}", + "86d17c42dae16356": "Also link each machine back to {source}", + "3fc9f71471e4c0bb": "Agents on each machine can then work on {source} too, with the same access. Each is a second link, made on that machine.", + "e1c55ea1297483f3": "{count, plural, one {# machine you picked cannot link back, or already does: it is linked one way.} other {# machines you picked cannot link back, or already do: they are linked one way.}}", "d2fbaffe08b6cf60": "{count, plural, one {Link # machine} other {Link # machines}}", "8e3378b526d615f4": "Link several…", "b550d04490078bda": "Agents here can then launch, message and wait on threads on each machine you pick. Each appears under Authorized clients in that machine's Sharing & access, where it can be revoked.", + "e1c2c3bd84d7bcd7": "This app is not connected to any of the machines you picked.", "c2553b323479499a": "This app knows no other machines. Add them under Environments first.", "18b1d4d42b945b34": "Machines", "03860d65c4052ab5": "Checking which machines are already linked…", @@ -8803,9 +8823,13 @@ "25b74062dc03079e": "No linked environments", "6698127fcc912f23": "Link another machine running T3 Code, such as a VPS, so agents here can launch and drive threads there.", "e1789f863205ad5a": "Could not link the environment", + "836dde1b729e6f0a": "Linked {source} and {target} both ways", "40cde51afa218290": "Linked {label}", + "ca4e4015b89ed9a8": "Could not link {target} back to {source}", "64ac3d1579ca9f5b": "Link {source} to {target}", "fb71127e5746a6bc": "From Sharing & access there, or t3 pair", + "1e3fee7084791773": "Also link {target} back to {source}", + "a46df5abb1115c63": "Agents on {target} can then work on {source} too, with the same access. This is a second link, made on {target}.", "ad5ed0ce61b966eb": "Forget {label}? Agents here stop working there. Revoke \"T3 Code · …\" in {label}''s Sharing & access to end the session there too.", "81c9796bf61b306a": "Could not forget the link", "130e51beb6cf5aad": "Link an environment", diff --git a/apps/web/src/i18n/translations/es.json b/apps/web/src/i18n/translations/es.json index 9aa2a7b665116..7eb45c5e07d3b 100644 --- a/apps/web/src/i18n/translations/es.json +++ b/apps/web/src/i18n/translations/es.json @@ -78,6 +78,10 @@ "4f1ab8a69f4a85e5": "Esta app no está conectada a ella", "95f18b6ad4a409de": "Tu sesión allí no puede crear códigos de emparejamiento", "26847ec0357c8600": "Ninguna dirección a la que pueda llegar otra máquina", + "ec1a698b0821ec66": "{target} no puede vincularse de vuelta: Entornos vinculados está desactivado allí.", + "6cf74ace5a766699": "{target} no puede vincularse de vuelta: tu sesión allí no puede crear vínculos.", + "a995255a0f303086": "{target} no puede vincularse de vuelta: tu sesión en {source} no puede crear códigos de emparejamiento.", + "a51c8cdfccb5b4ca": "{target} no puede vincularse de vuelta: esta app no tiene ninguna dirección en la que pueda alcanzar a {source}.", "cba6d3e3a22f2efe": "Inaccesible", "0eb1a18deaf06b76": "Código de emparejamiento rechazado", "7d6fc963ebf9a9c5": "Respondió otro entorno", @@ -8367,6 +8371,10 @@ "a322337b6655de2a": "Sin usar", "e31c7e76ef900ef4": "Inicio de sesión rechazado", "235b3e270162f18b": "Vínculo, más grueso cuanto más acceso", + "4ae743f8566a1ef1": "Dos vínculos, uno en cada sentido", + "0b7e6bab12c8ad4c": "{count, plural, one {{source} no se vinculó a # máquina.} other {{source} no se vinculó a # máquinas.}}", + "dfea515dc1198934": "{count, plural, one {Esta app no está conectada a ella, así que necesita un código de emparejamiento.} other {Esta app no está conectada a ellas, así que cada una necesita un código de emparejamiento. Vincúlalas de una en una.}}", + "e0a8e0b87dca8241": "Vincular una con un código…", "c326a7e66bab5da0": "Tus entornos", "86222507d918084b": "Alcanzadas mediante un vínculo", "afc01d2ee8048b4b": "{label}, seleccionada", @@ -8378,6 +8386,7 @@ "96fdb2fd529b1fbb": "Con errores", "8971602c42718d72": "Accesible", "1b256867b95ee022": "{days, plural, one {Caduca en {days} día} other {Caduca en {days} días}}", + "9d02cb328944fb27": "Vínculo en ambos sentidos entre {source} y {target}, {access}. De {source} a {target}: {forward}. De {target} a {source}: {back}", "aae31cf2017dab5b": "Pública", "b4f6c341033a3c91": "Apagados", "960255d19109dcd9": "Necesitan actualización", @@ -8404,12 +8413,14 @@ "5d252c8bbc3b24d0": "{status}. Vínculos desconocidos", "ec2c609c028d63b4": "Vincular {label} con otra máquina", "0a72d33781010657": "No se puede vincular con esto", + "287a6aa91e444b27": "{count, plural, one {Esta app no está conectada a # máquina aquí. Necesita un código de emparejamiento} other {Esta app no está conectada a estas # máquinas. Cada una necesita un código de emparejamiento}}", "22d1944bbd4d00b4": "{count, plural, one {Vincular a # máquina. Elige cuál en el siguiente paso} other {Vincular a # máquinas. Elige cuáles en el siguiente paso}}", "4f10f6354f38106e": "Renovar el vínculo con {target}. No hace falta código de emparejamiento", "5a25bfd7c3a8e4b4": "Vincular con {target}. No hace falta código de emparejamiento", "b4b893b9c210e0ba": "Renovar el vínculo con {target}. Necesita un código de emparejamiento de esa máquina", "052c3f87704b216d": "Vincular con {target}. Necesita un código de emparejamiento de esa máquina", "e6b05c7e6ef4fef7": "Suelta sobre una máquina para vincular {source} con ella", + "0ef2e932b40f0085": "{source} y {target} están vinculados entre sí con el mismo acceso, así que el mapa dibuja ambos vínculos como una sola línea. Cada uno es un vínculo propio y se olvida por separado.", "7f045c3477f783cc": "{count, plural, one {# vínculo requiere atención.} other {# vínculos requieren atención.}}", "d53ada50331e6041": "{machines, plural, one {# máquina} other {# máquinas}}, {links, plural, =0 {sin vínculos} one {# vínculo} other {# vínculos}}", "8cb29b21fc19a505": "Selecciona una máquina para gestionarla. Para vincular dos máquinas, arrastra el más de un entorno sobre otra máquina, o púlsalo para elegir una. Para vincular varias a la vez, haz Mayús-clic en las máquinas o arrastra un recuadro con Mayús alrededor de ellas, y luego arrastra el más sobre una de ellas.", @@ -8440,6 +8451,7 @@ "58cb9c075da185fb": "Cargando entornos vinculados…", "126e2b7a117f01d5": "{count, plural, =0 {No vincula con ninguna máquina} one {Vincula con # máquina} other {Vincula con # máquinas}}", "285d95a8e5ad0ec5": "vincula con", + "ee2a5f5571bca358": "Vincular de vuelta…", "57f38a04b1e5c033": "Olvidando…", "20ffe8337f8f30ba": "Olvidar", "1f221fe54654ed13": "Acceso", @@ -8779,13 +8791,21 @@ "e5ac7abeaeb78750": "No seleccionar nada", "ab520df47bca22d2": "Seleccionar todo", "3a57c9bbcd12529f": "No se pudo comprobar qué máquinas ya están vinculadas, así que no se puede elegir ninguna: {error}", + "4381e144bbeaddb2": "Vinculada en ambos sentidos", + "692450a6537f52a8": "Vinculada en un sentido", "78ccf685018ef797": "Vinculada", + "956b5c20a1fba7c1": "No se pudo vincular de vuelta: {reason}", "e82fad1c68674065": "{count, plural, one {# máquina que elegiste solo se conoce a través de un vínculo, así que necesita un código de emparejamiento. Vincúlala por separado.} other {# máquinas que elegiste solo se conocen a través de un vínculo, así que necesitan un código de emparejamiento. Vincúlalas una a una.}}", "87433cf138dc3e2c": "{linked, plural, one {Se vinculó # máquina.} other {Se vincularon # máquinas.}}", "d044bb95248da10c": "Se vincularon {linked} de {total}. Las que fallaron siguen seleccionadas para que puedas reintentarlas.", + "64768ee9ecd48309": "{count, plural, one {# máquina no pudo vincularse de vuelta. Selecciona el vínculo en el mapa para intentarlo de nuevo.} other {# máquinas no pudieron vincularse de vuelta. Selecciona cada vínculo en el mapa para intentarlo de nuevo.}}", + "86d17c42dae16356": "Vincular también cada máquina de vuelta a {source}", + "3fc9f71471e4c0bb": "Los agentes de cada máquina podrán entonces trabajar también en {source}, con el mismo acceso. Cada uno es un segundo vínculo, creado en esa máquina.", + "e1c55ea1297483f3": "{count, plural, one {# máquina que elegiste no puede vincularse de vuelta, o ya lo está: se vincula en un sentido.} other {# máquinas que elegiste no pueden vincularse de vuelta, o ya lo están: se vinculan en un sentido.}}", "d2fbaffe08b6cf60": "{count, plural, one {Vincular # máquina} other {Vincular # máquinas}}", "8e3378b526d615f4": "Vincular varios…", "b550d04490078bda": "Así los agentes de aquí podrán iniciar hilos en cada máquina que elijas, enviarles mensajes y esperarlos. Cada vínculo aparece en Clientes autorizados, en Compartir y acceso de esa máquina, donde se puede revocar.", + "e1c2c3bd84d7bcd7": "Esta app no está conectada a ninguna de las máquinas que elegiste.", "c2553b323479499a": "Esta app no conoce otras máquinas. Añádelas primero en Entornos.", "18b1d4d42b945b34": "Máquinas", "03860d65c4052ab5": "Comprobando qué máquinas ya están vinculadas…", @@ -8793,9 +8813,13 @@ "25b74062dc03079e": "No hay entornos vinculados", "6698127fcc912f23": "Vincula otra máquina que ejecute T3 Code, como un VPS, para que los agentes de aquí puedan iniciar y controlar hilos allí.", "e1789f863205ad5a": "No se pudo vincular el entorno", + "836dde1b729e6f0a": "{source} y {target} vinculados en ambos sentidos", "40cde51afa218290": "{label} vinculado", + "ca4e4015b89ed9a8": "No se pudo vincular {target} de vuelta a {source}", "64ac3d1579ca9f5b": "Vincular {source} con {target}", "fb71127e5746a6bc": "Desde Compartir y acceso allí, o t3 pair", + "1e3fee7084791773": "Vincular también {target} de vuelta a {source}", + "a46df5abb1115c63": "Los agentes de {target} podrán entonces trabajar también en {source}, con el mismo acceso. Es un segundo vínculo, creado en {target}.", "ad5ed0ce61b966eb": "¿Olvidar {label}? Los agentes de aquí dejarán de trabajar allí. Revoca \"T3 Code · …\" en Compartir y acceso de {label} para cerrar también la sesión allí.", "81c9796bf61b306a": "No se pudo olvidar el vínculo", "130e51beb6cf5aad": "Vincular un entorno", diff --git a/apps/web/src/i18n/translations/fr.json b/apps/web/src/i18n/translations/fr.json index 5a5a3adef6060..98f1737a3d7a7 100644 --- a/apps/web/src/i18n/translations/fr.json +++ b/apps/web/src/i18n/translations/fr.json @@ -78,6 +78,10 @@ "4f1ab8a69f4a85e5": "Cette app n’y est pas connectée", "95f18b6ad4a409de": "Votre session là-bas ne peut pas créer de codes d’appairage", "26847ec0357c8600": "Aucune adresse joignable par une autre machine", + "ec1a698b0821ec66": "{target} ne peut pas s’associer en retour : Environnements associés y est désactivé.", + "6cf74ace5a766699": "{target} ne peut pas s’associer en retour : votre session là-bas ne peut pas créer d’associations.", + "a995255a0f303086": "{target} ne peut pas s’associer en retour : votre session sur {source} ne peut pas créer de codes d’appairage.", + "a51c8cdfccb5b4ca": "{target} ne peut pas s’associer en retour : cette app n’a aucune adresse à laquelle {source} est joignable.", "cba6d3e3a22f2efe": "Injoignable", "0eb1a18deaf06b76": "Code d’appairage refusé", "7d6fc963ebf9a9c5": "Un autre environnement a répondu", @@ -8368,6 +8372,10 @@ "a322337b6655de2a": "Non utilisée", "e31c7e76ef900ef4": "Connexion refusée", "235b3e270162f18b": "Association, plus épaisse avec plus d’accès", + "4ae743f8566a1ef1": "Deux associations, une dans chaque sens", + "0b7e6bab12c8ad4c": "{count, plural, one {{source} n’a pas été associé à # machine.} other {{source} n’a pas été associé à # machines.}}", + "dfea515dc1198934": "{count, plural, one {Cette app n’y est pas connectée, il lui faut donc un code d’appairage.} other {Cette app n’y est pas connectée, il faut donc un code d’appairage pour chacune. Associez-les une par une.}}", + "e0a8e0b87dca8241": "Associer une machine avec un code…", "c326a7e66bab5da0": "Vos environnements", "86222507d918084b": "Atteintes par une association", "afc01d2ee8048b4b": "{label}, sélectionnée", @@ -8379,6 +8387,7 @@ "96fdb2fd529b1fbb": "En échec", "8971602c42718d72": "Joignable", "1b256867b95ee022": "{days, plural, one {Expire dans {days} jour} other {Expire dans {days} jours}}", + "9d02cb328944fb27": "Association dans les deux sens entre {source} et {target}, {access}. De {source} vers {target} : {forward}. De {target} vers {source} : {back}", "aae31cf2017dab5b": "Publique", "b4f6c341033a3c91": "Désactivés", "960255d19109dcd9": "Mise à jour requise", @@ -8405,12 +8414,14 @@ "5d252c8bbc3b24d0": "{status}. Associations inconnues", "ec2c609c028d63b4": "Associer {label} à une autre machine", "0a72d33781010657": "Association impossible avec cet élément", + "287a6aa91e444b27": "{count, plural, one {Cette app n’est pas connectée à # machine ici. Il lui faut un code d’appairage} other {Cette app n’est pas connectée à ces # machines. Il faut un code d’appairage pour chacune}}", "22d1944bbd4d00b4": "{count, plural, one {Lier à # machine. Choisissez laquelle à l'étape suivante} other {Lier à # machines. Choisissez lesquelles à l'étape suivante}}", "4f10f6354f38106e": "Renouveler l’association avec {target}. Aucun code d’appairage requis", "5a25bfd7c3a8e4b4": "Associer à {target}. Aucun code d’appairage requis", "b4b893b9c210e0ba": "Renouveler l’association avec {target}. Nécessite un code d’appairage de cette machine", "052c3f87704b216d": "Associer à {target}. Nécessite un code d’appairage de cette machine", "e6b05c7e6ef4fef7": "Déposez sur une machine pour y associer {source}", + "0ef2e932b40f0085": "{source} et {target} sont associés l’un à l’autre avec le même accès, la carte dessine donc les deux associations en une seule ligne. Chacune est une association à part et s’oublie séparément.", "7f045c3477f783cc": "{count, plural, one {# association demande votre attention.} other {# associations demandent votre attention.}}", "d53ada50331e6041": "{machines, plural, one {# machine} other {# machines}}, {links, plural, =0 {aucune association} one {# association} other {# associations}}", "8cb29b21fc19a505": "Sélectionnez une machine pour la gérer. Pour lier deux machines, faites glisser le plus d'un environnement sur une autre machine, ou appuyez dessus pour en choisir une. Pour en lier plusieurs à la fois, cliquez sur les machines avec Maj ou tracez un cadre autour d'elles avec Maj, puis faites glisser le plus sur l'une d'elles.", @@ -8441,6 +8452,7 @@ "58cb9c075da185fb": "Chargement des environnements associés…", "126e2b7a117f01d5": "{count, plural, =0 {Associé à aucune machine} one {Associé à # machine} other {Associé à # machines}}", "285d95a8e5ad0ec5": "est associé à", + "ee2a5f5571bca358": "Associer en retour…", "57f38a04b1e5c033": "Oubli en cours…", "20ffe8337f8f30ba": "Oublier", "1f221fe54654ed13": "Accès", @@ -8781,13 +8793,21 @@ "e5ac7abeaeb78750": "Tout désélectionner", "ab520df47bca22d2": "Tout sélectionner", "3a57c9bbcd12529f": "Impossible de vérifier quelles machines sont déjà associées ; aucune ne peut donc être choisie : {error}", + "4381e144bbeaddb2": "Associée dans les deux sens", + "692450a6537f52a8": "Associée dans un seul sens", "78ccf685018ef797": "Associée", + "956b5c20a1fba7c1": "Impossible d’associer en retour : {reason}", "e82fad1c68674065": "{count, plural, one {# machine choisie n'est connue que par un lien : il lui faut un code d'appairage. Liez-la séparément.} other {# machines choisies ne sont connues que par un lien : il leur faut un code d'appairage. Liez-les une par une.}}", "87433cf138dc3e2c": "{linked, plural, one {# machine associée.} other {# machines associées.}}", "d044bb95248da10c": "{linked} sur {total} associées. Celles qui ont échoué restent sélectionnées pour que vous puissiez réessayer.", + "64768ee9ecd48309": "{count, plural, one {# machine n’a pas pu s’associer en retour. Sélectionnez l’association sur la carte pour réessayer.} other {# machines n’ont pas pu s’associer en retour. Sélectionnez chaque association sur la carte pour réessayer.}}", + "86d17c42dae16356": "Associer aussi chaque machine en retour à {source}", + "3fc9f71471e4c0bb": "Les agents de chaque machine pourront alors aussi travailler sur {source}, avec le même accès. Chacune est une seconde association, créée sur cette machine.", + "e1c55ea1297483f3": "{count, plural, one {# machine choisie ne peut pas s’associer en retour, ou l’est déjà : elle est associée dans un seul sens.} other {# machines choisies ne peuvent pas s’associer en retour, ou le sont déjà : elles sont associées dans un seul sens.}}", "d2fbaffe08b6cf60": "{count, plural, one {Associer # machine} other {Associer # machines}}", "8e3378b526d615f4": "Associer plusieurs…", "b550d04490078bda": "Les agents d’ici pourront alors lancer des fils sur chaque machine choisie, leur envoyer des messages et les attendre. Chaque association apparaît sous Clients autorisés dans Partage et accès de la machine concernée, où elle peut être révoquée.", + "e1c2c3bd84d7bcd7": "Cette app n’est connectée à aucune des machines choisies.", "c2553b323479499a": "Cette app ne connaît aucune autre machine. Ajoutez-les d’abord dans Environnements.", "18b1d4d42b945b34": "Machines", "03860d65c4052ab5": "Vérification des machines déjà associées…", @@ -8795,9 +8815,13 @@ "25b74062dc03079e": "Aucun environnement associé", "6698127fcc912f23": "Associez une autre machine qui exécute T3 Code, comme un VPS, pour que les agents d’ici puissent y lancer et piloter des fils.", "e1789f863205ad5a": "Impossible d’associer l’environnement", + "836dde1b729e6f0a": "{source} et {target} associés dans les deux sens", "40cde51afa218290": "{label} associé", + "ca4e4015b89ed9a8": "Impossible d’associer {target} en retour à {source}", "64ac3d1579ca9f5b": "Associer {source} à {target}", "fb71127e5746a6bc": "Depuis Partage et accès sur cette machine, ou t3 pair", + "1e3fee7084791773": "Associer aussi {target} en retour à {source}", + "a46df5abb1115c63": "Les agents de {target} pourront alors aussi travailler sur {source}, avec le même accès. C’est une seconde association, créée sur {target}.", "ad5ed0ce61b966eb": "Oublier {label} ? Les agents d’ici cessent d’y travailler. Révoquez « T3 Code · … » dans Partage et accès sur {label} pour y fermer aussi la session.", "81c9796bf61b306a": "Impossible d’oublier l’association", "130e51beb6cf5aad": "Associer un environnement", diff --git a/apps/web/src/i18n/translations/ja.json b/apps/web/src/i18n/translations/ja.json index 807cc7734596b..f862b2fbf6df4 100644 --- a/apps/web/src/i18n/translations/ja.json +++ b/apps/web/src/i18n/translations/ja.json @@ -78,6 +78,10 @@ "4f1ab8a69f4a85e5": "このアプリはこのマシンに接続していません", "95f18b6ad4a409de": "そのマシンでのセッションではペアリングコードを作成できません", "26847ec0357c8600": "他のマシンから到達できるアドレスがありません", + "ec1a698b0821ec66": "{target} からは逆方向にリンクできません: そのマシンではリンクされた環境がオフです。", + "6cf74ace5a766699": "{target} からは逆方向にリンクできません: そのマシンでのセッションではリンクを作成できません。", + "a995255a0f303086": "{target} からは逆方向にリンクできません: {source} でのセッションではペアリングコードを作成できません。", + "a51c8cdfccb5b4ca": "{target} からは逆方向にリンクできません: このアプリには {source} に到達できるアドレスがありません。", "cba6d3e3a22f2efe": "到達不能", "0eb1a18deaf06b76": "ペアリングコードが拒否されました", "7d6fc963ebf9a9c5": "別の環境が応答しました", @@ -8325,6 +8329,10 @@ "a322337b6655de2a": "未使用", "e31c7e76ef900ef4": "サインインが拒否されました", "235b3e270162f18b": "リンク(アクセスが広いほど太い)", + "4ae743f8566a1ef1": "リンク 2 本(各方向に 1 本)", + "0b7e6bab12c8ad4c": "{count, plural, other {{source} は # 台のマシンにリンクされませんでした。}}", + "dfea515dc1198934": "{count, plural, other {このアプリはこれらのマシンに接続していないため、それぞれにペアリングコードが必要です。1 台ずつリンクしてください。}}", + "e0a8e0b87dca8241": "コードで 1 台をリンク…", "c326a7e66bab5da0": "あなたの環境", "86222507d918084b": "リンク経由で到達", "afc01d2ee8048b4b": "{label}、選択中", @@ -8336,6 +8344,7 @@ "96fdb2fd529b1fbb": "失敗中", "8971602c42718d72": "到達可能", "1b256867b95ee022": "{days, plural, other {{days} 日後に期限切れ}}", + "9d02cb328944fb27": "{source} と {target} の双方向リンク、{access}。{source} から {target}: {forward}。{target} から {source}: {back}", "aae31cf2017dab5b": "パブリック", "b4f6c341033a3c91": "オフ", "960255d19109dcd9": "アップデートが必要", @@ -8362,12 +8371,14 @@ "5d252c8bbc3b24d0": "{status}。リンクは不明", "ec2c609c028d63b4": "{label} を別のマシンにリンク", "0a72d33781010657": "これにはリンクできません", + "287a6aa91e444b27": "{count, plural, other {このアプリはこれら # 台のマシンに接続していません。それぞれにペアリングコードが必要です}}", "22d1944bbd4d00b4": "{count, plural, other {#台のマシンにリンク。次のステップで選択します}}", "4f10f6354f38106e": "{target} へのリンクを更新。ペアリングコードは不要", "5a25bfd7c3a8e4b4": "{target} にリンク。ペアリングコードは不要", "b4b893b9c210e0ba": "{target} へのリンクを更新。そのマシンのペアリングコードが必要", "052c3f87704b216d": "{target} にリンク。そのマシンのペアリングコードが必要", "e6b05c7e6ef4fef7": "マシンにドロップして {source} をリンク", + "0ef2e932b40f0085": "{source} と {target} は同じアクセスで互いにリンクしているため、マップでは 2 本のリンクを 1 本の線で描きます。それぞれ独立したリンクで、個別に削除できます。", "7f045c3477f783cc": "{count, plural, other {# 件のリンクに対応が必要です。}}", "d53ada50331e6041": "{machines, plural, other {マシン # 台}}、{links, plural, =0 {リンクなし} other {リンク # 件}}", "8cb29b21fc19a505": "マシンを選択して管理します。2台のマシンをリンクするには、環境のプラスを別のマシンにドラッグするか、押して選択します。複数を一度にリンクするには、マシンをShift+クリックするかShift+ドラッグで囲み、プラスをそのいずれかにドラッグします。", @@ -8398,6 +8409,7 @@ "58cb9c075da185fb": "リンクされた環境を読み込んでいます…", "126e2b7a117f01d5": "{count, plural, =0 {リンク先なし} other {リンク先 # 台}}", "285d95a8e5ad0ec5": "→", + "ee2a5f5571bca358": "逆方向もリンク…", "57f38a04b1e5c033": "削除中…", "20ffe8337f8f30ba": "削除", "1f221fe54654ed13": "アクセス権", @@ -8737,13 +8749,21 @@ "e5ac7abeaeb78750": "選択を解除", "ab520df47bca22d2": "すべて選択", "3a57c9bbcd12529f": "どのマシンがリンク済みかを確認できなかったため、選択できません: {error}", + "4381e144bbeaddb2": "双方向にリンク済み", + "692450a6537f52a8": "片方向のみリンク済み", "78ccf685018ef797": "リンク済み", + "956b5c20a1fba7c1": "逆方向のリンクに失敗しました: {reason}", "e82fad1c68674065": "{count, plural, other {選択した#台のマシンはリンク経由でのみ認識されているため、ペアリングコードが必要です。1台ずつリンクしてください。}}", "87433cf138dc3e2c": "{linked, plural, other {# 台のマシンをリンクしました。}}", "d044bb95248da10c": "{total} 台中 {linked} 台をリンクしました。失敗したマシンは選択されたままなので、もう一度試せます。", + "64768ee9ecd48309": "{count, plural, other {# 台のマシンは逆方向にリンクできませんでした。再試行するには、マップで各リンクを選択してください。}}", + "86d17c42dae16356": "各マシンから {source} へも逆方向にリンクする", + "3fc9f71471e4c0bb": "各マシンのエージェントも、同じアクセスで {source} で作業できるようになります。それぞれ、そのマシン側で作成される 2 本目のリンクです。", + "e1c55ea1297483f3": "{count, plural, other {選択した # 台のマシンは逆方向にリンクできないか、すでにリンク済みのため、片方向のみリンクされます。}}", "d2fbaffe08b6cf60": "{count, plural, other {# 台のマシンをリンク}}", "8e3378b526d615f4": "複数をリンク…", "b550d04490078bda": "これで、ここのエージェントが選択した各マシンでスレッドを起動し、メッセージを送り、完了を待てるようになります。各リンクはそのマシンの「共有とアクセス」の「承認済みクライアント」に表示され、そこで取り消せます。", + "e1c2c3bd84d7bcd7": "このアプリは、選択したどのマシンにも接続していません。", "c2553b323479499a": "このアプリは他のマシンを認識していません。先に「環境」で追加してください。", "18b1d4d42b945b34": "マシン", "03860d65c4052ab5": "リンク済みのマシンを確認しています…", @@ -8751,9 +8771,13 @@ "25b74062dc03079e": "リンクされた環境はありません", "6698127fcc912f23": "VPS など T3 Code を実行している別のマシンをリンクすると、ここのエージェントがそこでスレッドを起動して操作できます。", "e1789f863205ad5a": "環境をリンクできませんでした", + "836dde1b729e6f0a": "{source} と {target} を双方向にリンクしました", "40cde51afa218290": "{label} をリンクしました", + "ca4e4015b89ed9a8": "{target} から {source} へ逆方向にリンクできませんでした", "64ac3d1579ca9f5b": "{source} を {target} にリンク", "fb71127e5746a6bc": "リンク先の「共有とアクセス」、または t3 pair から", + "1e3fee7084791773": "{target} から {source} へも逆方向にリンクする", + "a46df5abb1115c63": "{target} のエージェントも、同じアクセスで {source} で作業できるようになります。これは {target} 側で作成される 2 本目のリンクです。", "ad5ed0ce61b966eb": "{label} を削除しますか?ここのエージェントはそこで作業できなくなります。そこでのセッションも終了するには、{label} の「共有とアクセス」で \"T3 Code · …\" を取り消してください。", "81c9796bf61b306a": "リンクを削除できませんでした", "130e51beb6cf5aad": "環境をリンク", diff --git a/apps/web/src/i18n/translations/ko.json b/apps/web/src/i18n/translations/ko.json index 91c5cec8df871..0b5a265179465 100644 --- a/apps/web/src/i18n/translations/ko.json +++ b/apps/web/src/i18n/translations/ko.json @@ -78,6 +78,10 @@ "4f1ab8a69f4a85e5": "이 앱이 해당 머신에 연결되어 있지 않습니다", "95f18b6ad4a409de": "그곳의 세션으로는 페어링 코드를 만들 수 없습니다", "26847ec0357c8600": "다른 머신이 접근할 수 있는 주소가 없습니다", + "ec1a698b0821ec66": "{target}에서 반대 방향으로 연결할 수 없습니다. 그곳에서 연결된 환경이 꺼져 있습니다.", + "6cf74ace5a766699": "{target}에서 반대 방향으로 연결할 수 없습니다. 그곳의 세션으로는 링크를 만들 수 없습니다.", + "a995255a0f303086": "{target}에서 반대 방향으로 연결할 수 없습니다. {source}의 세션으로는 페어링 코드를 만들 수 없습니다.", + "a51c8cdfccb5b4ca": "{target}에서 반대 방향으로 연결할 수 없습니다. 이 앱에 {source}에 도달할 수 있는 주소가 없습니다.", "cba6d3e3a22f2efe": "연결할 수 없음", "0eb1a18deaf06b76": "페어링 코드가 거부됨", "7d6fc963ebf9a9c5": "다른 환경이 응답함", @@ -8328,6 +8332,10 @@ "a322337b6655de2a": "사용 안 함", "e31c7e76ef900ef4": "로그인 거부됨", "235b3e270162f18b": "링크, 권한이 클수록 굵게", + "4ae743f8566a1ef1": "링크 2개, 방향마다 하나", + "0b7e6bab12c8ad4c": "{count, plural, other {{source}이(가) 머신 #대에 연결되지 않았습니다.}}", + "dfea515dc1198934": "{count, plural, other {이 앱이 해당 머신에 연결되어 있지 않아 각각 페어링 코드가 필요합니다. 한 대씩 연결하세요.}}", + "e0a8e0b87dca8241": "코드로 한 대 연결…", "c326a7e66bab5da0": "내 환경", "86222507d918084b": "링크를 통해 도달", "afc01d2ee8048b4b": "{label}, 선택됨", @@ -8339,6 +8347,7 @@ "96fdb2fd529b1fbb": "실패 중", "8971602c42718d72": "연결 가능", "1b256867b95ee022": "{days, plural, other {{days}일 후 만료}}", + "9d02cb328944fb27": "{source}와(과) {target} 사이의 양방향 링크, {access}. {source}에서 {target}: {forward}. {target}에서 {source}: {back}", "aae31cf2017dab5b": "공개", "b4f6c341033a3c91": "꺼짐", "960255d19109dcd9": "업데이트 필요", @@ -8365,12 +8374,14 @@ "5d252c8bbc3b24d0": "{status}. 링크 알 수 없음", "ec2c609c028d63b4": "{label}을(를) 다른 머신에 연결", "0a72d33781010657": "여기에는 연결할 수 없음", + "287a6aa91e444b27": "{count, plural, other {이 앱이 이 머신 #대에 연결되어 있지 않습니다. 각각 페어링 코드가 필요합니다}}", "22d1944bbd4d00b4": "{count, plural, other {머신 #개에 연결. 다음 단계에서 선택합니다}}", "4f10f6354f38106e": "{target} 링크 갱신. 페어링 코드 필요 없음", "5a25bfd7c3a8e4b4": "{target}에 연결. 페어링 코드 필요 없음", "b4b893b9c210e0ba": "{target} 링크 갱신. 해당 머신의 페어링 코드 필요", "052c3f87704b216d": "{target}에 연결. 해당 머신의 페어링 코드 필요", "e6b05c7e6ef4fef7": "머신에 놓아 {source}을(를) 연결", + "0ef2e932b40f0085": "{source}와(과) {target}은(는) 같은 권한으로 서로 연결되어 있어 지도에서 두 링크를 한 줄로 그립니다. 각각 별개의 링크이며 따로 삭제됩니다.", "7f045c3477f783cc": "{count, plural, other {링크 #개에 조치가 필요합니다.}}", "d53ada50331e6041": "{machines, plural, other {머신 #대}}, {links, plural, =0 {링크 없음} other {링크 #개}}", "8cb29b21fc19a505": "머신을 선택해 관리하세요. 두 머신을 연결하려면 환경의 더하기를 다른 머신으로 드래그하거나 눌러서 선택하세요. 여러 개를 한 번에 연결하려면 머신을 Shift+클릭하거나 Shift+드래그로 상자를 그린 다음, 더하기를 그중 하나로 드래그하세요.", @@ -8401,6 +8412,7 @@ "58cb9c075da185fb": "연결된 환경 불러오는 중…", "126e2b7a117f01d5": "{count, plural, =0 {링크한 머신 없음} other {머신 #대에 링크}}", "285d95a8e5ad0ec5": "→", + "ee2a5f5571bca358": "반대 방향도 연결…", "57f38a04b1e5c033": "삭제 중…", "20ffe8337f8f30ba": "삭제", "1f221fe54654ed13": "액세스 권한", @@ -8740,13 +8752,21 @@ "e5ac7abeaeb78750": "선택 해제", "ab520df47bca22d2": "모두 선택", "3a57c9bbcd12529f": "어떤 머신이 이미 연결되어 있는지 확인하지 못해 선택할 수 없습니다: {error}", + "4381e144bbeaddb2": "양방향으로 연결됨", + "692450a6537f52a8": "한 방향으로만 연결됨", "78ccf685018ef797": "연결됨", + "956b5c20a1fba7c1": "반대 방향으로 연결할 수 없습니다: {reason}", "e82fad1c68674065": "{count, plural, other {선택한 머신 #개는 연결을 통해서만 알려져 있어 페어링 코드가 필요합니다. 하나씩 연결하세요.}}", "87433cf138dc3e2c": "{linked, plural, other {머신 #대를 연결했습니다.}}", "d044bb95248da10c": "{total}대 중 {linked}대를 연결했습니다. 실패한 머신은 선택된 상태로 남아 있어 다시 시도할 수 있습니다.", + "64768ee9ecd48309": "{count, plural, other {머신 #대가 반대 방향으로 연결되지 않았습니다. 다시 시도하려면 지도에서 각 링크를 선택하세요.}}", + "86d17c42dae16356": "각 머신에서 {source}(으)로도 반대 방향 연결", + "3fc9f71471e4c0bb": "그러면 각 머신의 에이전트도 같은 권한으로 {source}에서 작업할 수 있습니다. 각각 해당 머신에서 만들어지는 두 번째 링크입니다.", + "e1c55ea1297483f3": "{count, plural, other {선택한 머신 #대는 반대 방향으로 연결할 수 없거나 이미 연결되어 있어 한 방향으로만 연결됩니다.}}", "d2fbaffe08b6cf60": "{count, plural, other {머신 #대 연결}}", "8e3378b526d615f4": "여러 개 연결…", "b550d04490078bda": "그러면 이곳의 에이전트가 선택한 각 머신에서 스레드를 시작하고, 메시지를 보내고, 기다릴 수 있습니다. 각 연결은 해당 머신의 공유 및 액세스에서 승인된 클라이언트에 표시되며 그곳에서 취소할 수 있습니다.", + "e1c2c3bd84d7bcd7": "이 앱이 선택한 머신 중 어느 것에도 연결되어 있지 않습니다.", "c2553b323479499a": "이 앱이 아는 다른 머신이 없습니다. 먼저 환경에서 추가하세요.", "18b1d4d42b945b34": "머신", "03860d65c4052ab5": "이미 연결된 머신을 확인하는 중…", @@ -8754,9 +8774,13 @@ "25b74062dc03079e": "연결된 환경 없음", "6698127fcc912f23": "VPS처럼 T3 Code를 실행하는 다른 머신을 연결하면 이곳의 에이전트가 그곳에서 스레드를 시작하고 조작할 수 있습니다.", "e1789f863205ad5a": "환경을 연결할 수 없습니다", + "836dde1b729e6f0a": "{source}와(과) {target}을(를) 양방향으로 연결함", "40cde51afa218290": "{label} 연결됨", + "ca4e4015b89ed9a8": "{target}에서 {source}(으)로 반대 방향 연결을 할 수 없습니다", "64ac3d1579ca9f5b": "{source}을(를) {target}에 연결", "fb71127e5746a6bc": "그곳의 공유 및 액세스 또는 t3 pair에서", + "1e3fee7084791773": "{target}에서 {source}(으)로도 반대 방향 연결", + "a46df5abb1115c63": "그러면 {target}의 에이전트도 같은 권한으로 {source}에서 작업할 수 있습니다. 이는 {target}에서 만들어지는 두 번째 링크입니다.", "ad5ed0ce61b966eb": "{label}을(를) 삭제할까요? 이곳의 에이전트가 그곳에서 더 이상 작업하지 않습니다. 그곳의 세션도 끝내려면 {label}의 공유 및 액세스에서 \"T3 Code · …\"를 취소하세요.", "81c9796bf61b306a": "링크를 삭제할 수 없습니다", "130e51beb6cf5aad": "환경 연결", diff --git a/apps/web/src/i18n/translations/pt-BR.json b/apps/web/src/i18n/translations/pt-BR.json index 25bf1ea6c487d..f9ba8bf1443c4 100644 --- a/apps/web/src/i18n/translations/pt-BR.json +++ b/apps/web/src/i18n/translations/pt-BR.json @@ -78,6 +78,10 @@ "4f1ab8a69f4a85e5": "Este app não está conectado a ela", "95f18b6ad4a409de": "Sua sessão lá não pode criar códigos de pareamento", "26847ec0357c8600": "Nenhum endereço que outra máquina consiga acessar", + "ec1a698b0821ec66": "{target} não pode vincular de volta: Ambientes vinculados está desativado lá.", + "6cf74ace5a766699": "{target} não pode vincular de volta: sua sessão lá não pode criar vínculos.", + "a995255a0f303086": "{target} não pode vincular de volta: sua sessão em {source} não pode criar códigos de pareamento.", + "a51c8cdfccb5b4ca": "{target} não pode vincular de volta: este app não tem um endereço em que {source} possa ser alcançado.", "cba6d3e3a22f2efe": "Inacessível", "0eb1a18deaf06b76": "Código de pareamento recusado", "7d6fc963ebf9a9c5": "Outro ambiente respondeu", @@ -8367,6 +8371,10 @@ "a322337b6655de2a": "Sem uso", "e31c7e76ef900ef4": "Login recusado", "235b3e270162f18b": "Vínculo, mais grosso com mais acesso", + "4ae743f8566a1ef1": "Dois vínculos, um em cada sentido", + "0b7e6bab12c8ad4c": "{count, plural, one {{source} não foi vinculado a # máquina.} other {{source} não foi vinculado a # máquinas.}}", + "dfea515dc1198934": "{count, plural, one {Este app não está conectado a ela, então ela precisa de um código de pareamento.} other {Este app não está conectado a elas, então cada uma precisa de um código de pareamento. Vincule uma de cada vez.}}", + "e0a8e0b87dca8241": "Vincular uma com um código…", "c326a7e66bab5da0": "Seus ambientes", "86222507d918084b": "Alcançadas por um vínculo", "afc01d2ee8048b4b": "{label}, selecionada", @@ -8378,6 +8386,7 @@ "96fdb2fd529b1fbb": "Com falha", "8971602c42718d72": "Acessível", "1b256867b95ee022": "{days, plural, one {Expira em {days} dia} other {Expira em {days} dias}}", + "9d02cb328944fb27": "Vínculo nos dois sentidos entre {source} e {target}, {access}. De {source} para {target}: {forward}. De {target} para {source}: {back}", "aae31cf2017dab5b": "Pública", "b4f6c341033a3c91": "Desligados", "960255d19109dcd9": "Precisam de atualização", @@ -8404,12 +8413,14 @@ "5d252c8bbc3b24d0": "{status}. Vínculos desconhecidos", "ec2c609c028d63b4": "Vincular {label} a outra máquina", "0a72d33781010657": "Não é possível vincular a isto", + "287a6aa91e444b27": "{count, plural, one {Este app não está conectado a # máquina aqui. Ela precisa de um código de pareamento} other {Este app não está conectado a estas # máquinas. Cada uma precisa de um código de pareamento}}", "22d1944bbd4d00b4": "{count, plural, one {Vincular a # máquina. Escolha qual na próxima etapa} other {Vincular a # máquinas. Escolha quais na próxima etapa}}", "4f10f6354f38106e": "Renovar o vínculo com {target}. Sem código de pareamento", "5a25bfd7c3a8e4b4": "Vincular a {target}. Sem código de pareamento", "b4b893b9c210e0ba": "Renovar o vínculo com {target}. Precisa de um código de pareamento dessa máquina", "052c3f87704b216d": "Vincular a {target}. Precisa de um código de pareamento dessa máquina", "e6b05c7e6ef4fef7": "Solte em uma máquina para vincular {source} a ela", + "0ef2e932b40f0085": "{source} e {target} estão vinculados um ao outro com o mesmo acesso, então o mapa desenha os dois vínculos como uma só linha. Cada um é um vínculo próprio e é esquecido separadamente.", "7f045c3477f783cc": "{count, plural, one {# vínculo precisa de atenção.} other {# vínculos precisam de atenção.}}", "d53ada50331e6041": "{machines, plural, one {# máquina} other {# máquinas}}, {links, plural, =0 {sem vínculos} one {# vínculo} other {# vínculos}}", "8cb29b21fc19a505": "Selecione uma máquina para gerenciá-la. Para vincular duas máquinas, arraste o mais de um ambiente até outra máquina, ou pressione-o para escolher uma. Para vincular várias de uma vez, use Shift-clique nas máquinas ou Shift-arraste uma caixa ao redor delas e depois arraste o mais até uma delas.", @@ -8440,6 +8451,7 @@ "58cb9c075da185fb": "Carregando ambientes vinculados…", "126e2b7a117f01d5": "{count, plural, =0 {Não vincula a nenhuma máquina} one {Vincula a # máquina} other {Vincula a # máquinas}}", "285d95a8e5ad0ec5": "vincula a", + "ee2a5f5571bca358": "Vincular de volta…", "57f38a04b1e5c033": "Esquecendo…", "20ffe8337f8f30ba": "Esquecer", "1f221fe54654ed13": "Acesso", @@ -8780,13 +8792,21 @@ "e5ac7abeaeb78750": "Desmarcar tudo", "ab520df47bca22d2": "Selecionar tudo", "3a57c9bbcd12529f": "Não foi possível verificar quais máquinas já estão vinculadas, então nenhuma pode ser escolhida: {error}", + "4381e144bbeaddb2": "Vinculada nos dois sentidos", + "692450a6537f52a8": "Vinculada em um sentido", "78ccf685018ef797": "Vinculada", + "956b5c20a1fba7c1": "Não foi possível vincular de volta: {reason}", "e82fad1c68674065": "{count, plural, one {# máquina escolhida só é conhecida por um vínculo, então precisa de um código de pareamento. Vincule-a separadamente.} other {# máquinas escolhidas só são conhecidas por um vínculo, então precisam de um código de pareamento. Vincule-as uma de cada vez.}}", "87433cf138dc3e2c": "{linked, plural, one {# máquina vinculada.} other {# máquinas vinculadas.}}", "d044bb95248da10c": "{linked} de {total} vinculadas. As que falharam continuam selecionadas para você tentar de novo.", + "64768ee9ecd48309": "{count, plural, one {# máquina não pôde vincular de volta. Selecione o vínculo no mapa para tentar de novo.} other {# máquinas não puderam vincular de volta. Selecione cada vínculo no mapa para tentar de novo.}}", + "86d17c42dae16356": "Vincular também cada máquina de volta a {source}", + "3fc9f71471e4c0bb": "Os agentes de cada máquina poderão então trabalhar também em {source}, com o mesmo acesso. Cada um é um segundo vínculo, criado naquela máquina.", + "e1c55ea1297483f3": "{count, plural, one {# máquina que você escolheu não pode vincular de volta, ou já vincula: ela é vinculada em um sentido.} other {# máquinas que você escolheu não podem vincular de volta, ou já vinculam: elas são vinculadas em um sentido.}}", "d2fbaffe08b6cf60": "{count, plural, one {Vincular # máquina} other {Vincular # máquinas}}", "8e3378b526d615f4": "Vincular vários…", "b550d04490078bda": "Os agentes daqui poderão então iniciar threads em cada máquina escolhida, enviar mensagens e aguardá-las. Cada vínculo aparece em Clientes autorizados em Compartilhamento e acesso da respectiva máquina, onde pode ser revogado.", + "e1c2c3bd84d7bcd7": "Este app não está conectado a nenhuma das máquinas que você escolheu.", "c2553b323479499a": "Este app não conhece outras máquinas. Adicione-as primeiro em Ambientes.", "18b1d4d42b945b34": "Máquinas", "03860d65c4052ab5": "Verificando quais máquinas já estão vinculadas…", @@ -8794,9 +8814,13 @@ "25b74062dc03079e": "Nenhum ambiente vinculado", "6698127fcc912f23": "Vincule outra máquina que rode o T3 Code, como uma VPS, para que os agentes daqui possam iniciar e conduzir threads lá.", "e1789f863205ad5a": "Não foi possível vincular o ambiente", + "836dde1b729e6f0a": "{source} e {target} vinculados nos dois sentidos", "40cde51afa218290": "{label} vinculado", + "ca4e4015b89ed9a8": "Não foi possível vincular {target} de volta a {source}", "64ac3d1579ca9f5b": "Vincular {source} a {target}", "fb71127e5746a6bc": "Em Compartilhamento e acesso de lá, ou t3 pair", + "1e3fee7084791773": "Vincular também {target} de volta a {source}", + "a46df5abb1115c63": "Os agentes de {target} poderão então trabalhar também em {source}, com o mesmo acesso. É um segundo vínculo, criado em {target}.", "ad5ed0ce61b966eb": "Esquecer {label}? Os agentes daqui deixam de funcionar lá. Revogue \"T3 Code · …\" em Compartilhamento e acesso de {label} para encerrar a sessão lá também.", "81c9796bf61b306a": "Não foi possível esquecer o vínculo", "130e51beb6cf5aad": "Vincular um ambiente", diff --git a/apps/web/src/i18n/translations/ru.json b/apps/web/src/i18n/translations/ru.json index d0344e2a08241..e6b4324aad0c1 100644 --- a/apps/web/src/i18n/translations/ru.json +++ b/apps/web/src/i18n/translations/ru.json @@ -78,6 +78,10 @@ "4f1ab8a69f4a85e5": "Это приложение к ней не подключено", "95f18b6ad4a409de": "Ваш сеанс там не может создавать коды сопряжения", "26847ec0357c8600": "Нет адреса, доступного с другой машины", + "ec1a698b0821ec66": "{target} не может привязаться в ответ: привязанные окружения там выключены.", + "6cf74ace5a766699": "{target} не может привязаться в ответ: ваш сеанс там не может создавать привязки.", + "a995255a0f303086": "{target} не может привязаться в ответ: ваш сеанс на {source} не может создавать коды сопряжения.", + "a51c8cdfccb5b4ca": "{target} не может привязаться в ответ: у этого приложения нет адреса, по которому доступна {source}.", "cba6d3e3a22f2efe": "Недоступен", "0eb1a18deaf06b76": "Код сопряжения отклонён", "7d6fc963ebf9a9c5": "Ответило другое окружение", @@ -8369,6 +8373,10 @@ "a322337b6655de2a": "Не используется", "e31c7e76ef900ef4": "Вход отклонён", "235b3e270162f18b": "Привязка: чем больше доступ, тем толще", + "4ae743f8566a1ef1": "Две привязки, по одной в каждую сторону", + "0b7e6bab12c8ad4c": "{count, plural, one {{source} не привязан к # машине.} few {{source} не привязан к # машинам.} many {{source} не привязан к # машинам.} other {{source} не привязан к # машины.}}", + "dfea515dc1198934": "{count, plural, one {Это приложение к ней не подключено, поэтому нужен код сопряжения.} few {Это приложение к ним не подключено, поэтому для каждой нужен код сопряжения. Привязывайте их по одной.} many {Это приложение к ним не подключено, поэтому для каждой нужен код сопряжения. Привязывайте их по одной.} other {Это приложение к ним не подключено, поэтому для каждой нужен код сопряжения. Привязывайте их по одной.}}", + "e0a8e0b87dca8241": "Привязать одну по коду…", "c326a7e66bab5da0": "Ваши окружения", "86222507d918084b": "Доступны через привязку", "afc01d2ee8048b4b": "{label}, выбрано", @@ -8380,6 +8388,7 @@ "96fdb2fd529b1fbb": "Сбой", "8971602c42718d72": "Доступно", "1b256867b95ee022": "{days, plural, one {Истекает через {days} день} few {Истекает через {days} дня} many {Истекает через {days} дней} other {Истекает через {days} дня}}", + "9d02cb328944fb27": "Двусторонняя привязка между {source} и {target}, {access}. От {source} к {target}: {forward}. От {target} к {source}: {back}", "aae31cf2017dab5b": "Публичный", "b4f6c341033a3c91": "Выключены", "960255d19109dcd9": "Требуют обновления", @@ -8406,12 +8415,14 @@ "5d252c8bbc3b24d0": "{status}. Привязки неизвестны", "ec2c609c028d63b4": "Привязать {label} к другой машине", "0a72d33781010657": "К этому нельзя привязать", + "287a6aa91e444b27": "{count, plural, one {Это приложение не подключено к # машине здесь. Ей нужен код сопряжения} few {Это приложение не подключено к этим # машинам. Каждой нужен код сопряжения} many {Это приложение не подключено к этим # машинам. Каждой нужен код сопряжения} other {Это приложение не подключено к этим # машины. Каждой нужен код сопряжения}}", "22d1944bbd4d00b4": "{count, plural, one {Связать с # машиной. Выбор на следующем шаге} few {Связать с # машинами. Выбор на следующем шаге} many {Связать с # машинами. Выбор на следующем шаге} other {Связать с # машины. Выбор на следующем шаге}}", "4f10f6354f38106e": "Обновить привязку к {target}. Код сопряжения не нужен", "5a25bfd7c3a8e4b4": "Привязать к {target}. Код сопряжения не нужен", "b4b893b9c210e0ba": "Обновить привязку к {target}. Нужен код сопряжения с той машины", "052c3f87704b216d": "Привязать к {target}. Нужен код сопряжения с той машины", "e6b05c7e6ef4fef7": "Отпустите на машине, чтобы привязать к ней {source}", + "0ef2e932b40f0085": "{source} и {target} привязаны друг к другу с одинаковым доступом, поэтому карта рисует обе привязки одной линией. Каждая — отдельная привязка и удаляется отдельно.", "7f045c3477f783cc": "{count, plural, one {# привязка требует внимания.} few {# привязки требуют внимания.} many {# привязок требуют внимания.} other {# привязки требуют внимания.}}", "d53ada50331e6041": "{machines, plural, one {# машина} few {# машины} many {# машин} other {# машины}}, {links, plural, =0 {нет привязок} one {# привязка} few {# привязки} many {# привязок} other {# привязки}}", "8cb29b21fc19a505": "Выберите машину, чтобы управлять ею. Чтобы связать две машины, перетащите плюс окружения на другую машину или нажмите его, чтобы выбрать. Чтобы связать несколько сразу, щёлкайте машины с Shift или обведите их рамкой с Shift, затем перетащите плюс на одну из них.", @@ -8442,6 +8453,7 @@ "58cb9c075da185fb": "Загрузка привязанных окружений…", "126e2b7a117f01d5": "{count, plural, =0 {Нет привязок к другим машинам} one {Привязки к # машине} few {Привязки к # машинам} many {Привязки к # машинам} other {Привязки к # машины}}", "285d95a8e5ad0ec5": "привязано к", + "ee2a5f5571bca358": "Привязать в ответ…", "57f38a04b1e5c033": "Удаление привязки…", "20ffe8337f8f30ba": "Забыть", "1f221fe54654ed13": "Доступ", @@ -8781,13 +8793,21 @@ "e5ac7abeaeb78750": "Снять выделение", "ab520df47bca22d2": "Выбрать все", "3a57c9bbcd12529f": "Не удалось проверить, какие машины уже привязаны, поэтому выбрать ни одну нельзя: {error}", + "4381e144bbeaddb2": "Привязана в обе стороны", + "692450a6537f52a8": "Привязана в одну сторону", "78ccf685018ef797": "Привязана", + "956b5c20a1fba7c1": "Не удалось привязать в ответ: {reason}", "e82fad1c68674065": "{count, plural, one {# выбранная машина известна только по связи, поэтому ей нужен код сопряжения. Свяжите её отдельно.} few {# выбранные машины известны только по связи, поэтому им нужен код сопряжения. Свяжите их по одной.} many {# выбранных машин известны только по связи, поэтому им нужен код сопряжения. Свяжите их по одной.} other {# выбранной машины известны только по связи, поэтому им нужен код сопряжения. Свяжите их по одной.}}", "87433cf138dc3e2c": "{linked, plural, one {Привязана # машина.} few {Привязаны # машины.} many {Привязано # машин.} other {Привязано # машины.}}", "d044bb95248da10c": "Привязано {linked} из {total}. Машины с ошибкой остаются выбранными, чтобы можно было повторить попытку.", + "64768ee9ecd48309": "{count, plural, one {# машина не смогла привязаться в ответ. Выберите привязку на карте, чтобы повторить.} few {# машины не смогли привязаться в ответ. Выберите каждую привязку на карте, чтобы повторить.} many {# машин не смогли привязаться в ответ. Выберите каждую привязку на карте, чтобы повторить.} other {# машины не смогли привязаться в ответ. Выберите каждую привязку на карте, чтобы повторить.}}", + "86d17c42dae16356": "Также привязать каждую машину в ответ к {source}", + "3fc9f71471e4c0bb": "Тогда агенты на каждой машине смогут работать и на {source} с тем же доступом. Каждая — вторая привязка, созданная на этой машине.", + "e1c55ea1297483f3": "{count, plural, one {# выбранная машина не может привязаться в ответ или уже привязана: она привязывается в одну сторону.} few {# выбранные машины не могут привязаться в ответ или уже привязаны: они привязываются в одну сторону.} many {# выбранных машин не могут привязаться в ответ или уже привязаны: они привязываются в одну сторону.} other {# выбранной машины не могут привязаться в ответ или уже привязаны: они привязываются в одну сторону.}}", "d2fbaffe08b6cf60": "{count, plural, one {Привязать # машину} few {Привязать # машины} many {Привязать # машин} other {Привязать # машины}}", "8e3378b526d615f4": "Привязать несколько…", "b550d04490078bda": "После этого агенты отсюда смогут запускать треды на каждой выбранной машине, писать в них и ждать их. Каждая связь появится в разделе «Авторизованные клиенты» в «Общем доступе» соответствующей машины, где её можно отозвать.", + "e1c2c3bd84d7bcd7": "Это приложение не подключено ни к одной из выбранных машин.", "c2553b323479499a": "Это приложение не знает других машин. Сначала добавьте их в разделе «Окружения».", "18b1d4d42b945b34": "Машины", "03860d65c4052ab5": "Проверяем, какие машины уже привязаны…", @@ -8795,9 +8815,13 @@ "25b74062dc03079e": "Нет привязанных окружений", "6698127fcc912f23": "Свяжите другую машину с T3 Code, например VPS, чтобы агенты отсюда могли запускать треды там и управлять ими.", "e1789f863205ad5a": "Не удалось привязать окружение", + "836dde1b729e6f0a": "{source} и {target} привязаны в обе стороны", "40cde51afa218290": "Привязано: {label}", + "ca4e4015b89ed9a8": "Не удалось привязать {target} в ответ к {source}", "64ac3d1579ca9f5b": "Привязать {source} к {target}", "fb71127e5746a6bc": "Из раздела «Общий доступ» там или через t3 pair", + "1e3fee7084791773": "Также привязать {target} в ответ к {source}", + "a46df5abb1115c63": "Тогда агенты на {target} смогут работать и на {source} с тем же доступом. Это вторая привязка, созданная на {target}.", "ad5ed0ce61b966eb": "Забыть {label}? Агенты отсюда перестанут там работать. Чтобы завершить сеанс и там, отзовите «T3 Code · …» в разделе «Общий доступ» на {label}.", "81c9796bf61b306a": "Не удалось забыть привязку", "130e51beb6cf5aad": "Привязать окружение", diff --git a/apps/web/src/i18n/translations/sv.json b/apps/web/src/i18n/translations/sv.json index 71fe2eb56fa09..24a4c83ba6e31 100644 --- a/apps/web/src/i18n/translations/sv.json +++ b/apps/web/src/i18n/translations/sv.json @@ -78,6 +78,10 @@ "4f1ab8a69f4a85e5": "Den här appen är inte ansluten till den", "95f18b6ad4a409de": "Din session där kan inte skapa parkopplingskoder", "26847ec0357c8600": "Ingen adress som en annan dator kan nå", + "ec1a698b0821ec66": "{target} kan inte länka tillbaka: Länkade miljöer är avstängt där.", + "6cf74ace5a766699": "{target} kan inte länka tillbaka: din session där kan inte skapa länkar.", + "a995255a0f303086": "{target} kan inte länka tillbaka: din session på {source} kan inte skapa parkopplingskoder.", + "a51c8cdfccb5b4ca": "{target} kan inte länka tillbaka: den här appen har ingen adress där {source} kan nås.", "cba6d3e3a22f2efe": "Inte nåbar", "0eb1a18deaf06b76": "Parkopplingskoden nekades", "7d6fc963ebf9a9c5": "En annan miljö svarade", @@ -8375,6 +8379,10 @@ "a322337b6655de2a": "Används inte", "e31c7e76ef900ef4": "Inloggning nekad", "235b3e270162f18b": "Länk, tjockare med mer åtkomst", + "4ae743f8566a1ef1": "Två länkar, en åt varje håll", + "0b7e6bab12c8ad4c": "{count, plural, one {{source} länkades inte till # dator.} other {{source} länkades inte till # datorer.}}", + "dfea515dc1198934": "{count, plural, one {Den här appen är inte ansluten till den, så den behöver en parkopplingskod.} other {Den här appen är inte ansluten till dem, så var och en behöver en parkopplingskod. Länka dem en i taget.}}", + "e0a8e0b87dca8241": "Länka en med en kod…", "c326a7e66bab5da0": "Dina miljöer", "86222507d918084b": "Nås via en länk", "afc01d2ee8048b4b": "{label}, vald", @@ -8386,6 +8394,7 @@ "96fdb2fd529b1fbb": "Fungerar inte", "8971602c42718d72": "Nåbar", "1b256867b95ee022": "{days, plural, one {Går ut om {days} dag} other {Går ut om {days} dagar}}", + "9d02cb328944fb27": "Länk åt båda håll mellan {source} och {target}, {access}. {source} till {target}: {forward}. {target} till {source}: {back}", "aae31cf2017dab5b": "Publik", "b4f6c341033a3c91": "Avstängda", "960255d19109dcd9": "Behöver uppdateras", @@ -8412,12 +8421,14 @@ "5d252c8bbc3b24d0": "{status}. Länkar okända", "ec2c609c028d63b4": "Länka {label} till en annan maskin", "0a72d33781010657": "Går inte att länka till detta", + "287a6aa91e444b27": "{count, plural, one {Den här appen är inte ansluten till # dator här. Den behöver en parkopplingskod} other {Den här appen är inte ansluten till de här # datorerna. Var och en behöver en parkopplingskod}}", "22d1944bbd4d00b4": "{count, plural, one {Länka till # maskin. Välj vilken i nästa steg} other {Länka till # maskiner. Välj vilka i nästa steg}}", "4f10f6354f38106e": "Förnya länken till {target}. Ingen parkopplingskod behövs", "5a25bfd7c3a8e4b4": "Länka till {target}. Ingen parkopplingskod behövs", "b4b893b9c210e0ba": "Förnya länken till {target}. Kräver en parkopplingskod därifrån", "052c3f87704b216d": "Länka till {target}. Kräver en parkopplingskod därifrån", "e6b05c7e6ef4fef7": "Släpp på en maskin för att länka {source} till den", + "0ef2e932b40f0085": "{source} och {target} är länkade till varandra med samma åtkomst, så kartan ritar båda länkarna som en linje. Var och en är en egen länk och glöms för sig.", "7f045c3477f783cc": "{count, plural, one {# länk behöver åtgärdas.} other {# länkar behöver åtgärdas.}}", "d53ada50331e6041": "{machines, plural, one {# dator} other {# datorer}}, {links, plural, =0 {inga länkar} one {# länk} other {# länkar}}", "8cb29b21fc19a505": "Välj en maskin för att hantera den. För att länka två maskiner drar du plustecknet på en miljö till en annan maskin, eller trycker på det för att välja en. För att länka flera på en gång, Skift-klicka på maskiner eller Skift-dra en ruta runt dem och dra sedan plustecknet till en av dem.", @@ -8448,6 +8459,7 @@ "58cb9c075da185fb": "Läser in länkade miljöer…", "126e2b7a117f01d5": "{count, plural, =0 {Länkar inte till någon} one {Länkar till # dator} other {Länkar till # datorer}}", "285d95a8e5ad0ec5": "länkar till", + "ee2a5f5571bca358": "Länka tillbaka…", "57f38a04b1e5c033": "Glömmer…", "20ffe8337f8f30ba": "Glöm", "1f221fe54654ed13": "Åtkomst", @@ -8787,13 +8799,21 @@ "e5ac7abeaeb78750": "Avmarkera allt", "ab520df47bca22d2": "Markera allt", "3a57c9bbcd12529f": "Det gick inte att kontrollera vilka datorer som redan är länkade, så ingen kan väljas: {error}", + "4381e144bbeaddb2": "Länkad åt båda håll", + "692450a6537f52a8": "Länkad åt ett håll", "78ccf685018ef797": "Länkad", + "956b5c20a1fba7c1": "Kunde inte länka tillbaka: {reason}", "e82fad1c68674065": "{count, plural, one {# maskin du valde är bara känd genom en länk och behöver därför en parkopplingskod. Länka den separat.} other {# maskiner du valde är bara kända genom en länk och behöver därför en parkopplingskod. Länka dem en i taget.}}", "87433cf138dc3e2c": "{linked, plural, one {Länkade # dator.} other {Länkade # datorer.}}", "d044bb95248da10c": "Länkade {linked} av {total}. De som misslyckades är fortfarande markerade så att du kan försöka igen.", + "64768ee9ecd48309": "{count, plural, one {# dator kunde inte länka tillbaka. Välj länken på kartan för att försöka igen.} other {# datorer kunde inte länka tillbaka. Välj varje länk på kartan för att försöka igen.}}", + "86d17c42dae16356": "Länka även varje dator tillbaka till {source}", + "3fc9f71471e4c0bb": "Agenter på varje dator kan då också arbeta på {source}, med samma åtkomst. Var och en är en andra länk, skapad på den datorn.", + "e1c55ea1297483f3": "{count, plural, one {# dator du valde kan inte länka tillbaka, eller gör det redan: den länkas åt ett håll.} other {# datorer du valde kan inte länka tillbaka, eller gör det redan: de länkas åt ett håll.}}", "d2fbaffe08b6cf60": "{count, plural, one {Länka # dator} other {Länka # datorer}}", "8e3378b526d615f4": "Länka flera…", "b550d04490078bda": "Agenter här kan sedan starta, skicka meddelanden till och vänta på trådar på varje dator du väljer. Varje länk visas under Auktoriserade klienter i den datorns Delning och åtkomst, där den kan återkallas.", + "e1c2c3bd84d7bcd7": "Den här appen är inte ansluten till någon av datorerna du valde.", "c2553b323479499a": "Den här appen känner inte till några andra datorer. Lägg först till dem under Miljöer.", "18b1d4d42b945b34": "Datorer", "03860d65c4052ab5": "Kontrollerar vilka datorer som redan är länkade…", @@ -8801,9 +8821,13 @@ "25b74062dc03079e": "Inga länkade miljöer", "6698127fcc912f23": "Länka en annan dator som kör T3 Code, till exempel en VPS, så att agenter här kan starta och styra trådar där.", "e1789f863205ad5a": "Kunde inte länka miljön", + "836dde1b729e6f0a": "Länkade {source} och {target} åt båda håll", "40cde51afa218290": "Länkade {label}", + "ca4e4015b89ed9a8": "Kunde inte länka {target} tillbaka till {source}", "64ac3d1579ca9f5b": "Länka {source} till {target}", "fb71127e5746a6bc": "Från Delning och åtkomst där, eller t3 pair", + "1e3fee7084791773": "Länka även {target} tillbaka till {source}", + "a46df5abb1115c63": "Agenter på {target} kan då också arbeta på {source}, med samma åtkomst. Det är en andra länk, skapad på {target}.", "ad5ed0ce61b966eb": "Glöm {label}? Agenter här slutar arbeta där. Återkalla ”T3 Code · …” under Delning och åtkomst på {label} för att avsluta sessionen där också.", "81c9796bf61b306a": "Kunde inte glömma länken", "130e51beb6cf5aad": "Länka en miljö", diff --git a/apps/web/src/i18n/translations/zh.json b/apps/web/src/i18n/translations/zh.json index 3b53057a640b7..5a111238c035d 100644 --- a/apps/web/src/i18n/translations/zh.json +++ b/apps/web/src/i18n/translations/zh.json @@ -78,6 +78,10 @@ "4f1ab8a69f4a85e5": "此应用未连接到该机器", "95f18b6ad4a409de": "你在该机器上的会话无法创建配对码", "26847ec0357c8600": "没有其他机器可访问的地址", + "ec1a698b0821ec66": "{target} 无法反向关联:该机器上的关联环境已关闭。", + "6cf74ace5a766699": "{target} 无法反向关联:你在该机器上的会话无法创建关联。", + "a995255a0f303086": "{target} 无法反向关联:你在 {source} 上的会话无法创建配对码。", + "a51c8cdfccb5b4ca": "{target} 无法反向关联:此应用没有可访问 {source} 的地址。", "cba6d3e3a22f2efe": "无法访问", "0eb1a18deaf06b76": "配对码被拒绝", "7d6fc963ebf9a9c5": "应答的是另一个环境", @@ -8385,6 +8389,10 @@ "a322337b6655de2a": "未使用", "e31c7e76ef900ef4": "登录被拒绝", "235b3e270162f18b": "关联,权限越大线越粗", + "4ae743f8566a1ef1": "两条关联,每个方向一条", + "0b7e6bab12c8ad4c": "{count, plural, other {{source} 未关联到 # 台机器。}}", + "dfea515dc1198934": "{count, plural, other {此应用未连接到这些机器,因此每台都需要配对码。请逐台关联。}}", + "e0a8e0b87dca8241": "用配对码关联一台…", "c326a7e66bab5da0": "你的环境", "86222507d918084b": "通过关联到达", "afc01d2ee8048b4b": "{label},已选择", @@ -8396,6 +8404,7 @@ "96fdb2fd529b1fbb": "出错", "8971602c42718d72": "可访问", "1b256867b95ee022": "{days, plural, other {{days} 天后过期}}", + "9d02cb328944fb27": "{source} 与 {target} 之间的双向关联,{access}。{source} 到 {target}:{forward}。{target} 到 {source}:{back}", "aae31cf2017dab5b": "公网", "b4f6c341033a3c91": "已关闭", "960255d19109dcd9": "需要更新", @@ -8422,12 +8431,14 @@ "5d252c8bbc3b24d0": "{status}。关联未知", "ec2c609c028d63b4": "将 {label} 关联到另一台机器", "0a72d33781010657": "无法关联到这里", + "287a6aa91e444b27": "{count, plural, other {此应用未连接到这 # 台机器。每台都需要配对码}}", "22d1944bbd4d00b4": "{count, plural, other {链接到 # 台机器。在下一步选择具体哪些}}", "4f10f6354f38106e": "续期到 {target} 的关联。无需配对码", "5a25bfd7c3a8e4b4": "关联到 {target}。无需配对码", "b4b893b9c210e0ba": "续期到 {target} 的关联。需要来自它的配对码", "052c3f87704b216d": "关联到 {target}。需要来自它的配对码", "e6b05c7e6ef4fef7": "拖放到一台机器上,将 {source} 关联到它", + "0ef2e932b40f0085": "{source} 和 {target} 以相同权限互相关联,因此地图把两条关联画成一条线。每条都是独立的关联,需分别移除。", "7f045c3477f783cc": "{count, plural, other {# 个关联需要处理。}}", "d53ada50331e6041": "{machines, plural, other {# 台机器}},{links, plural, =0 {没有关联} other {# 个关联}}", "8cb29b21fc19a505": "选择一台机器以管理它。要链接两台机器,将环境上的加号拖到另一台机器上,或按下它来选择一台。要一次链接多台,按住 Shift 点击机器或按住 Shift 拖出一个框选中它们,然后将加号拖到其中一台上。", @@ -8458,6 +8469,7 @@ "58cb9c075da185fb": "正在加载已关联的环境…", "126e2b7a117f01d5": "{count, plural, =0 {未关联任何机器} other {关联到 # 台机器}}", "285d95a8e5ad0ec5": "关联到", + "ee2a5f5571bca358": "反向关联…", "57f38a04b1e5c033": "正在移除…", "20ffe8337f8f30ba": "移除", "1f221fe54654ed13": "访问权限", @@ -8797,13 +8809,21 @@ "e5ac7abeaeb78750": "取消全选", "ab520df47bca22d2": "全选", "3a57c9bbcd12529f": "无法检查哪些机器已关联,因此暂时无法选择:{error}", + "4381e144bbeaddb2": "已双向关联", + "692450a6537f52a8": "仅单向关联", "78ccf685018ef797": "已关联", + "956b5c20a1fba7c1": "无法反向关联:{reason}", "e82fad1c68674065": "{count, plural, other {你选择的 # 台机器仅通过链接得知,因此需要配对码。请逐台链接。}}", "87433cf138dc3e2c": "{linked, plural, other {已关联 # 台机器。}}", "d044bb95248da10c": "已关联 {linked}/{total} 台。失败的机器仍保持选中,你可以重试。", + "64768ee9ecd48309": "{count, plural, other {# 台机器无法反向关联。在地图上选中各条关联即可重试。}}", + "86d17c42dae16356": "同时让每台机器反向关联到 {source}", + "3fc9f71471e4c0bb": "之后每台机器上的智能体也能以相同权限在 {source} 上工作。每条都是在该机器上创建的第二条关联。", + "e1c55ea1297483f3": "{count, plural, other {你选择的 # 台机器无法反向关联,或已经反向关联:它们只会单向关联。}}", "d2fbaffe08b6cf60": "{count, plural, other {关联 # 台机器}}", "8e3378b526d615f4": "关联多个…", "b550d04490078bda": "这里的智能体随后就能在你选择的每台机器上启动会话、发送消息并等待结果。每个连接将显示在对应机器“共享与访问”的“已授权客户端”中,可在那里撤销。", + "e1c2c3bd84d7bcd7": "此应用未连接到你选择的任何机器。", "c2553b323479499a": "此应用不知道其他机器。请先在“环境”中添加。", "18b1d4d42b945b34": "机器", "03860d65c4052ab5": "正在检查哪些机器已关联…", @@ -8811,9 +8831,13 @@ "25b74062dc03079e": "没有已关联的环境", "6698127fcc912f23": "关联另一台运行 T3 Code 的机器(例如 VPS),让这里的智能体能够在那台机器上启动和操作会话。", "e1789f863205ad5a": "无法关联环境", + "836dde1b729e6f0a": "已双向关联 {source} 和 {target}", "40cde51afa218290": "已关联 {label}", + "ca4e4015b89ed9a8": "无法将 {target} 反向关联到 {source}", "64ac3d1579ca9f5b": "将 {source} 关联到 {target}", "fb71127e5746a6bc": "从远端“共享与访问”页面或 t3 pair 获取", + "1e3fee7084791773": "同时将 {target} 反向关联到 {source}", + "a46df5abb1115c63": "之后 {target} 上的智能体也能以相同权限在 {source} 上工作。这是在 {target} 上创建的第二条关联。", "ad5ed0ce61b966eb": "忘记 {label}?此处的智能体将停止在那里工作。在 {label} 的“共享与访问”中撤销“T3 Code · …”,以同时结束那里的连接。", "81c9796bf61b306a": "无法移除关联", "130e51beb6cf5aad": "关联环境", diff --git a/apps/web/src/state/peerLinks.ts b/apps/web/src/state/peerLinks.ts index 5d34f935bde68..d7a7f0425998f 100644 --- a/apps/web/src/state/peerLinks.ts +++ b/apps/web/src/state/peerLinks.ts @@ -4,13 +4,14 @@ import { linkedEnvironmentNames, offersLinkedEnvironments, } from "@t3tools/client-runtime/link-request"; +import { linkBackOffer, type LinkBackOffer } from "@t3tools/client-runtime/link-batch"; import { createPeerLinkEnvironmentAtoms } from "@t3tools/client-runtime/state/peerLinks"; -import { AuthAccessReadScope, type EnvironmentId } from "@t3tools/contracts"; +import { AuthAccessReadScope, AuthAccessWriteScope, type EnvironmentId } from "@t3tools/contracts"; import { Atom } from "effect/reactivity"; import { useEffect, useEffectEvent } from "react"; import { connectionAtomRuntime } from "../connection/runtime"; -import { environmentAtomList } from "./environmentAtomList"; +import { environmentAtomList, environmentIdsKey } from "./environmentAtomList"; import { useEnvironmentIdentities, useEnvironments } from "./environments"; import { environmentPresentations } from "./presentation"; import { relayEnvironmentDiscovery } from "./relay"; @@ -98,3 +99,65 @@ export function useLinkableMachines(environmentId: EnvironmentId, enabled: boole connect: discovery.environments, }); } + +const NOT_OFFERED: LinkBackOffer = { kind: "hidden" }; + +/** + * Whether linking `sourceId` to each of `targetIds` can also link that machine back, and the + * source as the reverse link names it. Only machines that could link back are asked for their + * links, and only while `enabled`: listing asks every machine they link to whether it answers. + */ +export function useLinkBackOffers( + sourceId: EnvironmentId, + targetIds: ReadonlyArray, + enabled: boolean, +) { + const { environments } = useEnvironments(); + const discovery = useAtomValue(relayEnvironmentDiscovery.stateValueAtom); + const writable = useEnvironmentsWithScope(environments, AuthAccessWriteScope); + const source = linkableMachines({ + environments, + threadEnvironmentId: null, + links: [], + connect: discovery.environments, + }).find((machine) => machine.environmentId === sourceId); + const wanted = new Set(targetIds); + const targets = environments.filter((environment) => wanted.has(environment.environmentId)); + const listed = targets + .filter( + (target) => + enabled && + target.connection.phase === "connected" && + offersLinkedEnvironments(target.serverConfig) && + writable.has(target.environmentId), + ) + .map((target) => target.environmentId); + const lists = useAtomValue(peerLinkListsAtom(environmentIdsKey(listed))); + const offers = new Map(); + for (const target of targets) { + if (source === undefined) break; + const list = lists[listed.indexOf(target.environmentId)]; + offers.set( + target.environmentId, + linkBackOffer({ + source: { + environmentId: sourceId, + connected: source.connected, + writable: writable.has(sourceId), + urls: source.urls, + }, + target: { + connected: target.connection.phase === "connected", + offersLinks: offersLinkedEnvironments(target.serverConfig), + writable: writable.has(target.environmentId), + links: list?._tag === "Success" ? list.value.links : null, + }, + }), + ); + } + return { + source: source ?? null, + offerFor: (targetId: EnvironmentId | null): LinkBackOffer => + (targetId === null ? undefined : offers.get(targetId)) ?? NOT_OFFERED, + }; +} diff --git a/docs/user/remote-access.md b/docs/user/remote-access.md index 4603f2c893a30..5eaeadc0d7a48 100644 --- a/docs/user/remote-access.md +++ b/docs/user/remote-access.md @@ -477,12 +477,20 @@ manage it, or switch to **List** for the same controls as rows. To link from the map, drag the plus on an environment onto another machine, or press it and pick one. If this app is connected to both machines it needs no pairing code. +A link goes one way. To let the other machine's agents work back, tick **Also +link … back** when you create the link, or select a one-way link and use +**Link back…**. It is offered when this app is connected to both machines and +may manage access on each. Two machines linked to each other at the same access +are drawn as one line with an arrowhead at each end; they are still two links, +and each is forgotten on its own. + To link one environment to several machines at once, Shift-click the machines (or Shift-drag a box around them, or press Space on a focused machine), then drag the environment's plus onto any of them, or use **Link several…** above the map. Dropping the plus on a stack offers the stack's machines. The dialog ticks the machines it can link without a pairing code and says why for the -rest. +rest. When this app is connected to none of them, each needs a pairing code, +so the map says so and offers to link one at a time instead. Large setups fold: machines known only through links that share the same linking environments and access levels become one stack, and once this app diff --git a/packages/client-runtime/src/linkBatch.test.ts b/packages/client-runtime/src/linkBatch.test.ts index 4854eecbce233..605d1b968060d 100644 --- a/packages/client-runtime/src/linkBatch.test.ts +++ b/packages/client-runtime/src/linkBatch.test.ts @@ -2,7 +2,13 @@ import { EnvironmentId, PeerLinkError } from "@t3tools/contracts"; import * as Result from "effect/Result"; import { describe, expect, it } from "vite-plus/test"; -import { linkBatchCandidates, linkBatchSummary, linkListState, runLinkBatch } from "./linkBatch.ts"; +import { + linkBackOffer, + linkBatchCandidates, + linkBatchSummary, + linkListState, + runLinkBatch, +} from "./linkBatch.ts"; import type { LinkableMachine } from "./linkRequest.ts"; const machine = (name: string, overrides: Partial = {}): LinkableMachine => ({ @@ -180,3 +186,121 @@ describe("runLinkBatch", () => { expect(events.filter((event) => event === "refresh").length).toBe(2); }); }); + +describe("linkBackOffer", () => { + const source = { + environmentId: id("source"), + connected: true, + writable: true, + urls: ["https://source.example.ts.net"], + }; + const target = { connected: true, offersLinks: true, writable: true, links: [] }; + const offer = (overrides: { + readonly source?: Partial; + readonly target?: Partial[0]["target"]> | null; + }) => + linkBackOffer({ + source: { ...source, ...overrides.source }, + target: overrides.target === null ? null : { ...target, ...overrides.target }, + }); + + it("is offered only when the client can make the reverse link with no pasted code", () => { + expect(offer({})).toEqual({ kind: "offered" }); + // An expired reverse link no longer counts: linking back renews it. + expect( + offer({ target: { links: [{ environmentId: id("source"), status: "expired" }] } }), + ).toEqual({ kind: "offered" }); + expect( + offer({ target: { links: [{ environmentId: id("other"), status: "reachable" }] } }), + ).toEqual({ kind: "offered" }); + }); + + it("says nothing where the user would not expect it", () => { + for (const hidden of [ + offer({ target: null }), + offer({ target: { connected: false } }), + offer({ source: { connected: false } }), + // Not known yet, or already linked back: offering could replace a working token. + offer({ target: { links: null } }), + offer({ target: { links: [{ environmentId: id("source"), status: "reachable" }] } }), + offer({ target: { links: [{ environmentId: id("source"), status: "unreachable" }] } }), + ]) { + expect(hidden).toEqual({ kind: "hidden" }); + } + }); + + it("names what is in the way between two connected environments", () => { + expect(offer({ target: { offersLinks: false } })).toEqual({ + kind: "blocked", + reason: "target_links_off", + }); + expect(offer({ target: { writable: false } })).toEqual({ + kind: "blocked", + reason: "target_no_access", + }); + expect(offer({ source: { writable: false } })).toEqual({ + kind: "blocked", + reason: "source_no_access", + }); + expect(offer({ source: { urls: [] } })).toEqual({ + kind: "blocked", + reason: "source_no_address", + }); + }); +}); + +describe("runLinkBatch link back", () => { + it("links back from each eligible machine, and a reverse failure keeps the forward link", async () => { + const source = machine("source"); + const reverse: Array = []; + const minted: Array = []; + const outcomes = await runLinkBatch({ + machines: [machine("a"), machine("b"), machine("c"), machine("d")], + access: "full-access", + mint: async (environmentId) => { + minted.push(environmentId); + return Result.succeed(`code-for-${environmentId}`); + }, + link: async (input) => + input.expectedLabel === "d" ? Result.fail(new Error("refused")) : Result.succeed(null), + back: { + source, + targets: new Set([id("a"), id("b"), id("d")]), + link: async (environmentId, input) => { + reverse.push([environmentId, input]); + return environmentId === id("b") + ? Result.fail( + new PeerLinkError({ reason: "unreachable", message: "source did not answer." }), + ) + : Result.succeed(null); + }, + }, + refreshLinks: () => {}, + }); + expect(Object.fromEntries(outcomes)).toEqual({ + [id("a")]: { kind: "linked", back: { kind: "linked" } }, + [id("b")]: { + kind: "linked", + back: { kind: "failed", failure: "unreachable", detail: "source did not answer." }, + }, + // Not eligible, so not attempted. + [id("c")]: { kind: "linked" }, + // Its own link failed, so nothing links back. + [id("d")]: { kind: "failed", failure: "other", detail: null }, + }); + // The reverse link is made on the machine, with a code minted on the source for it. + expect(reverse[0]).toEqual([ + id("a"), + { + url: "https://source.example.ts.net", + alternateUrls: ["http://100.64.0.1:3773"], + expectedEnvironmentId: id("source"), + expectedLabel: "source", + pairingCode: `code-for-${id("source")}`, + access: "full-access", + }, + ]); + expect(minted.filter((environmentId) => environmentId === id("source")).length).toBe(2); + expect(linkBatchSummary(outcomes)).toEqual({ linked: 3, failed: [id("d")] }); + }); +}); diff --git a/packages/client-runtime/src/linkBatch.ts b/packages/client-runtime/src/linkBatch.ts index f7f97fabe71c6..acc4980c56c77 100644 --- a/packages/client-runtime/src/linkBatch.ts +++ b/packages/client-runtime/src/linkBatch.ts @@ -3,6 +3,7 @@ import { type EnvironmentId, type PeerLinkCreateInput, type PeerLinkFailureKind, + type PeerLinkSummary, peerLinkFailureKind, } from "@t3tools/contracts"; import * as Result from "effect/Result"; @@ -82,12 +83,110 @@ export const linkBatchBlockLabel = ( } }; +/** Why the link back, from the linked machine to the linking one, is not offered. */ +export type LinkBackBlock = + | "target_links_off" + | "target_no_access" + | "source_no_access" + | "source_no_address"; + +/** + * `hidden`: the user would not expect it, so nothing is shown. `blocked`: both machines are + * the user's own connected environments, so one line says what is in the way. + */ +export type LinkBackOffer = + | { readonly kind: "offered" } + | { readonly kind: "blocked"; readonly reason: LinkBackBlock } + | { readonly kind: "hidden" }; + +/** + * Whether linking `source` to `target` can also link `target` back with no pasted code. The + * reverse is an ordinary link made on the target: the client creates it there and mints its + * pairing code on the source, each with its own session, at an address it has for the source. + */ +export const linkBackOffer = (input: { + /** Null for a machine the client has not saved, such as a typed address. */ + readonly target: { + readonly connected: boolean; + /** Linked environments is supported and switched on there. */ + readonly offersLinks: boolean; + /** The client's session there may create links: `access:write`. */ + readonly writable: boolean; + /** Its own links: null until they are known. */ + readonly links: ReadonlyArray> | null; + } | null; + readonly source: { + readonly environmentId: EnvironmentId; + readonly connected: boolean; + /** The client's session there may create pairing codes: `access:write`. */ + readonly writable: boolean; + readonly urls: ReadonlyArray; + }; +}): LinkBackOffer => { + const { target, source } = input; + if (target === null || !target.connected || !source.connected) return { kind: "hidden" }; + if (!target.offersLinks) return { kind: "blocked", reason: "target_links_off" }; + if (!target.writable) return { kind: "blocked", reason: "target_no_access" }; + if (!source.writable) return { kind: "blocked", reason: "source_no_access" }; + if (source.urls.length === 0) return { kind: "blocked", reason: "source_no_address" }; + // Unknown or already there: offering it could replace a working token. + if ( + target.links === null || + target.links.some( + (link) => link.environmentId === source.environmentId && link.status !== "expired", + ) + ) { + return { kind: "hidden" }; + } + return { kind: "offered" }; +}; + +export const linkBackBlockLabel = ( + blocked: LinkBackBlock, + names: { readonly source: string; readonly target: string }, + resolve: MFunctionType = mFallback, +): string => { + switch (blocked) { + case "target_links_off": + return resolve( + msg("{target} cannot link back: Linked environments is off there.", { + target: names.target, + }), + ); + case "target_no_access": + return resolve( + msg("{target} cannot link back: your session there cannot create links.", { + target: names.target, + }), + ); + case "source_no_access": + return resolve( + msg("{target} cannot link back: your session on {source} cannot create pairing codes.", { + source: names.source, + target: names.target, + }), + ); + case "source_no_address": + return resolve( + msg("{target} cannot link back: this app has no address for {source} it can reach.", { + source: names.source, + target: names.target, + }), + ); + } +}; + export type LinkBatchFailure = PeerLinkFailureKind | "no_code"; -export type LinkBatchOutcome = +export type LinkAttemptOutcome = | { readonly kind: "linked" } | { readonly kind: "failed"; readonly failure: LinkBatchFailure; readonly detail: string | null }; +/** `back` is set when the link back was asked for: it never changes how the link itself went. */ +export type LinkBatchOutcome = + | { readonly kind: "linked"; readonly back?: LinkAttemptOutcome } + | { readonly kind: "failed"; readonly failure: LinkBatchFailure; readonly detail: string | null }; + export const linkBatchFailureLabel = ( failure: LinkBatchFailure, resolve: MFunctionType = mFallback, @@ -110,7 +209,7 @@ export const linkBatchFailureLabel = ( * Only the linking environment's own error passes its message through: * anything else may carry the request, and with it the pairing code. */ -const linkFailure = (failure: unknown): LinkBatchOutcome => { +const linkFailure = (failure: unknown): LinkAttemptOutcome & { readonly kind: "failed" } => { if ( typeof failure === "object" && failure !== null && @@ -128,6 +227,41 @@ const linkFailure = (failure: unknown): LinkBatchOutcome => { type BatchMachine = Pick; +type MintPairingCode = ( + environmentId: EnvironmentId, + access: AuthMcpClientAccess, +) => Promise>; + +/** + * One link to `machine`: a one-use code minted there with the client's session, handed to + * `link` with the addresses the client has for it. The code stays in this call. + */ +export async function linkWithMintedCode(input: { + readonly machine: BatchMachine; + readonly access: AuthMcpClientAccess; + readonly mint: MintPairingCode; + readonly link: (input: PeerLinkCreateInput) => Promise>; +}): Promise { + const { machine } = input; + const [url, ...alternateUrls] = machine.urls; + if (url === undefined) return { kind: "failed", failure: "unreachable", detail: null }; + try { + const minted = await input.mint(machine.environmentId, input.access); + if (Result.isFailure(minted)) return { kind: "failed", failure: "no_code", detail: null }; + const linked = await input.link({ + url, + ...(alternateUrls.length > 0 ? { alternateUrls } : {}), + expectedEnvironmentId: machine.environmentId, + expectedLabel: machine.label, + pairingCode: minted.success, + access: input.access, + }); + return Result.isSuccess(linked) ? { kind: "linked" } : linkFailure(linked.failure); + } catch { + return { kind: "failed", failure: "other", detail: null }; + } +} + /** * Links each machine as a single link is made: a one-use code minted on that * machine with the client's session there, then handed to the linking @@ -137,39 +271,43 @@ type BatchMachine = Pick; export async function runLinkBatch(input: { readonly machines: ReadonlyArray; readonly access: AuthMcpClientAccess; - readonly mint: ( - environmentId: EnvironmentId, - access: AuthMcpClientAccess, - ) => Promise>; + readonly mint: MintPairingCode; readonly link: (input: PeerLinkCreateInput) => Promise>; + /** + * Also links each of `targets` back to `source` once its own link is made. `link` creates + * the link on that machine. A failure here is reported beside the link it follows. + */ + readonly back?: { + readonly source: BatchMachine; + readonly targets: ReadonlySet; + readonly link: ( + environmentId: EnvironmentId, + input: PeerLinkCreateInput, + ) => Promise>; + }; /** Called once, at the end: listing probes every linked machine, so `link` must not refresh. */ readonly refreshLinks: () => void; readonly onOutcome?: (environmentId: EnvironmentId, outcome: LinkBatchOutcome) => void; }): Promise> { const outcomes = new Map(); + const { access, mint, back } = input; const linkOne = async (machine: BatchMachine): Promise => { - const [url, ...alternateUrls] = machine.urls; - if (url === undefined) return { kind: "failed", failure: "unreachable", detail: null }; - const minted = await input.mint(machine.environmentId, input.access); - if (Result.isFailure(minted)) return { kind: "failed", failure: "no_code", detail: null }; - const linked = await input.link({ - url, - ...(alternateUrls.length > 0 ? { alternateUrls } : {}), - expectedEnvironmentId: machine.environmentId, - expectedLabel: machine.label, - pairingCode: minted.success, - access: input.access, - }); - return Result.isSuccess(linked) ? { kind: "linked" } : linkFailure(linked.failure); + const outcome = await linkWithMintedCode({ machine, access, mint, link: input.link }); + if (outcome.kind !== "linked" || !back?.targets.has(machine.environmentId)) return outcome; + return { + kind: "linked", + back: await linkWithMintedCode({ + machine: back.source, + access, + mint, + link: (create) => back.link(machine.environmentId, create), + }), + }; }; const queue = [...input.machines]; const worker = async () => { for (let machine = queue.shift(); machine !== undefined; machine = queue.shift()) { - const outcome = await linkOne(machine).catch((): LinkBatchOutcome => ({ - kind: "failed", - failure: "other", - detail: null, - })); + const outcome = await linkOne(machine); outcomes.set(machine.environmentId, outcome); input.onOutcome?.(machine.environmentId, outcome); } From 290ce918c6421813b7a34e21fe6bd9e67c995b62 Mon Sep 17 00:00:00 2001 From: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com> Date: Thu, 19 Nov 2026 21:23:50 -0800 Subject: [PATCH 07/10] test(web): the routes list names an HTTPS tailnet route Tailscale HTTPS Co-Authored-By: Claude Fable 5.2 --- .../components/settings/EnvironmentRoutesList.browser.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/components/settings/EnvironmentRoutesList.browser.test.tsx b/apps/web/src/components/settings/EnvironmentRoutesList.browser.test.tsx index b4acf89d93d05..39b9cac03ede1 100644 --- a/apps/web/src/components/settings/EnvironmentRoutesList.browser.test.tsx +++ b/apps/web/src/components/settings/EnvironmentRoutesList.browser.test.tsx @@ -76,7 +76,7 @@ it("shows a route added after a reorder was saved, once another route is removed await userEvent.keyboard("{ArrowDown}"); await userEvent.keyboard(" "); await expect - .element(screen.getByRole("button", { name: "Reorder Tailscale, position 1" })) + .element(screen.getByRole("button", { name: "Reorder Tailscale HTTPS, position 1" })) .toBeVisible(); await screen.rerender(routesList([TAILNET, LAN])); From 38851e7caf9adb3e54b9fa24720f2ad63c8209d2 Mon Sep 17 00:00:00 2001 From: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com> Date: Thu, 19 Nov 2026 22:07:02 -0800 Subject: [PATCH 08/10] fix(web): environments map opens a stack in place and says much less Opening a stack re-fitted the whole map: the layout picked new measures for the wider map, the open frame replaced the stack's card, and the fit changed scale, position and canvas height in one untransitioned frame. A stack now keeps its card and opens a tray below it, the measures stay those of the closed map, and the view holds its scale with the card anchored. The canvas grows to show the tray, eased together with the view and the fading-in machines. The how-to paragraph, toolbar hint and long notices are cut to short lines, with the gestures in a help popover and the user guide. Co-Authored-By: Claude Fable 5.2 --- .../components/settings/EnvironmentsMap.tsx | 287 ++++++++------ .../settings/EnvironmentsMapDetails.tsx | 112 ++---- .../settings/LinkSeveralEnvironments.tsx | 11 +- .../settings/LinkedEnvironmentsSettings.tsx | 8 +- .../settings/environmentsMap.logic.test.ts | 189 ++++++++- .../settings/environmentsMap.logic.ts | 368 ++++++++++++------ apps/web/src/i18n/translations/de.json | 70 ++-- apps/web/src/i18n/translations/en.json | 70 ++-- apps/web/src/i18n/translations/es.json | 70 ++-- apps/web/src/i18n/translations/fr.json | 70 ++-- apps/web/src/i18n/translations/ja.json | 70 ++-- apps/web/src/i18n/translations/ko.json | 70 ++-- apps/web/src/i18n/translations/pt-BR.json | 70 ++-- apps/web/src/i18n/translations/ru.json | 70 ++-- apps/web/src/i18n/translations/sv.json | 70 ++-- apps/web/src/i18n/translations/zh.json | 70 ++-- docs/user/remote-access.md | 8 +- 17 files changed, 977 insertions(+), 706 deletions(-) diff --git a/apps/web/src/components/settings/EnvironmentsMap.tsx b/apps/web/src/components/settings/EnvironmentsMap.tsx index 9ac82029af33f..86633841eb4ec 100644 --- a/apps/web/src/components/settings/EnvironmentsMap.tsx +++ b/apps/web/src/components/settings/EnvironmentsMap.tsx @@ -22,6 +22,7 @@ import { AppWindowIcon, ArrowUpDownIcon, CheckIcon, + CircleHelpIcon, CloudIcon, GlobeIcon, MaximizeIcon, @@ -71,8 +72,11 @@ import { EnvironmentMachineIcon } from "../EnvironmentMachineIcon"; import { Button } from "../ui/button"; import { InputGroup, InputGroupAddon, InputGroupInput } from "../ui/input-group"; import { Menu, MenuItem, MenuPopup, MenuTrigger } from "../ui/menu"; +import { Popover, PopoverPopup, PopoverTrigger } from "../ui/popover"; +import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip"; import { buildFleetGraph, + anchorFleetView, fitFleetLayout, fleetCanvasHeight, FLEET_CLIENT_NODE_ID, @@ -98,6 +102,7 @@ import { type FleetFocus, type FleetFoldGroup, type FleetGraph, + type FleetHeldView, type FleetLayout, type FleetLinkAction, type FleetLinkEdge, @@ -137,7 +142,7 @@ type Messages = ReturnType; /** One ordinal scale for access, read only to full access: a link's line gets heavier and darker. */ const ACCESS_STROKE_WIDTHS = [1.25, 1.75, 2.25, 2.75, 3.5]; const ACCESS_STROKE_OPACITIES = [0.4, 0.5, 0.62, 0.76, 0.9]; -/** Short maps get a short canvas; a tall one grows to this before the fit shrinks it. */ +/** Short maps get a short canvas; a tall one grows to this, then the fit shrinks it or it pans. */ const CANVAS_HEIGHT = { min: 180, max: 840 }; const ARROW_ROVE: Record = { ArrowUp: "up", @@ -150,6 +155,10 @@ const NO_SELECTION: ReadonlySet = new Set(); /** Search centres a machine at a scale it can be read at, however far out the map was. */ const FOUND_MIN_SCALE = 0.85; +/** What an opened stack adds fades in over the same time the view takes to make room for it. */ +const APPEAR = + "transition-opacity duration-200 ease-out starting:opacity-0 motion-reduce:transition-none"; + /** Dashes repeat a link's health without colour, one pattern per kind of trouble. */ function healthDash(health: PeerLinkHealth): string | undefined { if (health.kind === "expired") return "1 5"; @@ -602,16 +611,12 @@ function FleetCanvas({ const { graph, stacks, selection, selected, onSelect, onTick } = scene; const [canvas, setCanvas] = useState(null); const [width, setWidth] = useState(null); - // A new width is a new layout, so a view held by hand goes with it as with any other shape. - const { key: shapeKey, layout } = useFleetLayout(graph, stacks, graphKey, width); + const { key: layoutKey, layout } = useFleetLayout(graph, stacks, graphKey, width); const [query, setQuery] = useState(""); - // A view the user set by hand holds until the map's shape changes; otherwise it fits itself. - const [manual, setManual] = useState<{ - readonly key: string; - readonly view: FleetViewTransform; - /** Set by the buttons and keys, whose jump is eased; a drag or pinch tracks the hand. */ - readonly glide: boolean; - } | null>(null); + // A held view lasts while the map keeps its shape, whatever the width; otherwise it fits itself. + const [manual, setManual] = useState(null); + // What was last drawn, to tell a stack opening or closing from any other change of shape. + const [drawn, setDrawn] = useState({ graphKey, layoutKey, layout, stacks }); const [dragging, setDragging] = useState(false); // The selection box, in canvas pixels, while Shift is held through a drag on empty canvas. const [box, setBox] = useState(null); @@ -626,19 +631,55 @@ function FleetCanvas({ readonly origin: FleetViewTransform; moved: boolean; } | null>(null); - // The canvas is as tall as the fitted map wants, so the height never feeds back into the fit. - const size = - width === null ? null : { width, height: fleetCanvasHeight(layout, width, CANVAS_HEIGHT) }; - // A new shape drops the held view for good: returning to an old shape must fit, not restore - // a pan made before the map changed. - if (manual !== null && manual.key !== "" && manual.key !== shapeKey) { - setManual({ ...manual, key: "" }); + if (drawn.layoutKey !== layoutKey) { + setDrawn({ graphKey, layoutKey, layout, stacks }); + if (drawn.graphKey !== graphKey) { + const toggled = stacks.find((stack) => + drawn.stacks.some((was) => was.id === stack.id && was.expanded !== stack.expanded), + ); + const before = toggled === undefined ? undefined : drawn.layout.stacks.get(toggled.id); + const after = toggled === undefined ? undefined : layout.stacks.get(toggled.id); + if (width !== null && before !== undefined && after !== undefined) { + // The stack stays where it is and the rest makes room, in the one render that opens it. + const was = manual?.key === drawn.graphKey ? manual : null; + const from = { + width, + height: was?.height ?? fleetCanvasHeight(drawn.layout, width, CANVAS_HEIGHT), + }; + setManual( + anchorFleetView({ + key: graphKey, + from: { + key: drawn.graphKey, + held: was, + view: was?.view ?? fitFleetLayout(drawn.layout, from), + size: from, + face: before.face, + }, + stack: after, + layout, + bounds: CANVAS_HEIGHT, + }), + ); + } else if (manual !== null && manual.key !== "") { + // Any other new shape drops the held view for good: returning to an old shape must + // fit, not restore a pan made before the map changed. + setManual({ ...manual, key: "" }); + } + } } - const held = manual?.key === shapeKey ? manual : null; + const held = manual?.key === graphKey ? manual : null; + // Not measured: the height follows from the layout and the view, so it never feeds back. + const size = + width === null + ? null + : { width, height: held?.height ?? fleetCanvasHeight(layout, width, CANVAS_HEIGHT) }; const view = held?.view ?? (size === null ? null : fitFleetLayout(layout, size)); const glide = manual !== null && (held === null || held.glide); - const setView = (next: FleetViewTransform, eased: boolean) => - setManual({ key: shapeKey, view: next, glide: eased }); + const setView = (next: FleetViewTransform, eased: boolean) => { + if (size === null) return; + setManual({ key: graphKey, view: next, height: size.height, glide: eased, undo: null }); + }; const zoom = ( factor: number, anchor?: { readonly x: number; readonly y: number }, @@ -685,7 +726,7 @@ function FleetCanvas({ const reveal = (rect: FleetRect) => { if (size === null) return; setManual((current) => { - const shown = current?.key === shapeKey ? current.view : fitFleetLayout(layout, size); + const shown = current?.key === graphKey ? current.view : fitFleetLayout(layout, size); const left = rect.x * shown.scale + shown.x; const top = rect.y * shown.scale + shown.y; const inside = @@ -695,8 +736,10 @@ function FleetCanvas({ top + rect.height * shown.scale <= size.height; if (inside) return current; return { - key: shapeKey, + key: graphKey, + height: size.height, glide: true, + undo: null, view: { scale: shown.scale, x: size.width / 2 - (rect.x + rect.width / 2) * shown.scale, @@ -747,7 +790,7 @@ function FleetCanvas({ const bounds = event.currentTarget.getBoundingClientRect(); drag.current = { pointerId: event.pointerId, - key: shapeKey, + key: layoutKey, mode: event.shiftKey ? "box" : "pan", x: event.clientX, y: event.clientY, @@ -768,7 +811,7 @@ function FleetCanvas({ const current = drag.current; if (current === null || current.pointerId !== event.pointerId) return; // The map was laid out again mid-drag, so the origin belongs to a view that is gone. - if (current.key !== shapeKey) { + if (current.key !== layoutKey) { drag.current = null; setDragging(false); setBox(null); @@ -796,7 +839,7 @@ function FleetCanvas({ if (current.mode === "pan") onSelect(null); return; } - if (current.mode !== "box" || current.key !== shapeKey) return; + if (current.mode !== "box" || current.key !== layoutKey) return; const drawn = boxAt(current, event); const { origin } = current; onTick( @@ -826,6 +869,7 @@ function FleetCanvas({ const source = sources.find((node) => selection?.kind === "node" && node.id === selection.id) ?? (sources.length === 1 ? sources[0] : undefined); + const selectSeveral = gt("Shift-click or Shift-drag to select several"); return ( <> @@ -861,10 +905,10 @@ function FleetCanvas({ ? null : matchIds.length === 0 ? gt("No machine by that name") - : gt( - "{count, plural, one {# match. Enter goes to it} other {# matches. Enter goes to the first}}", - { count: matchIds.length }, - )} + : gt("{count, plural, one {# match} other {# matches}}", { + count: matchIds.length, + $context: "how many machines a search by name found", + })}

    {selected.size > 0 ? ( @@ -879,24 +923,34 @@ function FleetCanvas({ {gt("Clear", { $context: "clears the selection of machines" })} - ) : ( - - {gt("Shift-click or Shift-drag to select several")} - - )} + ) : null} {sources.length === 0 ? null : source !== undefined ? ( - - ) : ( - - + + } /> + {selectSeveral} + + ) : ( + + + + {gt("Link several…")} + + } + /> + } + /> + {selectSeveral} + {sources.map((node) => ( onLinkSeveral(node.id)}> @@ -909,6 +963,27 @@ function FleetCanvas({ )} + + + + + } + /> + +
      +
    • {gt("Select a machine to manage it.")}
    • + {sources.length === 0 ? null : ( + <> +
    • {gt("Drag a plus onto a machine to link them.")}
    • +
    • {selectSeveral}
    • + + )} +
    • {gt("A link reaches one machine and stops there.")}
    • +
    +
    +
    {dropped === null ? null : ( @@ -923,7 +998,7 @@ function FleetCanvas({ ref={setCanvas} data-dragging={dragging || undefined} data-glide={glide || undefined} - className="relative min-h-45 cursor-grab touch-none overflow-clip bg-background/50 select-none data-dragging:cursor-grabbing data-glide:transition-[background-size,background-position] data-glide:duration-200 data-glide:ease-out motion-reduce:transition-none" + className="relative min-h-45 cursor-grab touch-none overflow-clip bg-background/50 select-none data-dragging:cursor-grabbing data-glide:transition-[height,background-size,background-position] data-glide:duration-200 data-glide:ease-out motion-reduce:transition-none" style={ view === null || size === null ? undefined @@ -1013,11 +1088,11 @@ function FleetLegend({ twoWay }: { readonly twoWay: boolean }) { return (
    • {sample("in-use")} - {gt("Route in use")} + {routeStateLabel("in-use", gt)}
    • {sample("standby")} @@ -1025,13 +1100,13 @@ function FleetLegend({ twoWay }: { readonly twoWay: boolean }) {
    • {sample("down")} - {routeStateLabel("down", gt)} + {gt("Offline")}
    • - {gt("Link, heavier with more access")} + {gt("Link", { $context: "noun, in a map legend: a line joining two linked machines" })}
    • {twoWay ? (
    • @@ -1039,7 +1114,7 @@ function FleetLegend({ twoWay }: { readonly twoWay: boolean }) { - {gt("Two links, one each way")} + {gt("Two-way", { $context: "in a map legend: a link that goes both ways" })}
    • ) : null}
    @@ -1175,16 +1250,7 @@ function CodeOnlyNotice({ className="flex flex-wrap items-center gap-x-3 gap-y-1.5 border-b border-border/60 bg-background/50 px-3 py-2 text-xs" >

    - - {gt( - "{count, plural, one {{source} was not linked to # machine.} other {{source} was not linked to # machines.}}", - { count: machines.length, source: source.label }, - )} - {" "} - {gt( - "{count, plural, one {This app is not connected to it, so it needs a pairing code.} other {This app is not connected to them, so each needs a pairing code. Link them one at a time.}}", - { count: machines.length }, - )} + {needsCodeText(machines.length, gt)}

    {/* Linking through an environment that already reaches these machines would be offered here. */} @@ -1210,30 +1276,30 @@ function CodeOnlyNotice({ ); } +const needsCodeText = (count: number, gt: GT) => + gt( + "{count, plural, one {# machine needs a pairing code} other {# machines each need a pairing code}}", + { count }, + ); + function actionText(action: FleetLinkAction | null, target: string, gt: GT): string { if (action === null) return gt("Cannot link to this"); - if (action.kind === "code-only") { - return gt( - "{count, plural, one {This app is not connected to # machine here. It needs a pairing code} other {This app is not connected to these # machines. Each needs a pairing code}}", - { count: action.machineIds.length }, - ); - } + if (action.kind === "code-only") return needsCodeText(action.machineIds.length, gt); if (action.kind === "batch") { - return gt( - "{count, plural, one {Link to # machine. Pick which in the next step} other {Link to # machines. Pick which in the next step}}", - { count: action.environmentIds.length }, - ); + return gt("{count, plural, one {Link to # machine} other {Link to # machines}}", { + count: action.environmentIds.length, + }); } const { offer } = action; if (offer === null) return gt("Cannot link to this"); if (offer.path === "code-less") { return offer.renews - ? gt("Renew the link to {target}. No pairing code needed", { target }) - : gt("Link to {target}. No pairing code needed", { target }); + ? gt("Renew link to {target}", { target }) + : gt("Link to {target}", { target }); } return offer.renews - ? gt("Renew the link to {target}. Needs a pairing code from it", { target }) - : gt("Link to {target}. Needs a pairing code from it", { target }); + ? gt("Renew link to {target} with a pairing code", { target }) + : gt("Link to {target} with a pairing code", { target }); } function foldGroupLabel(group: FleetFoldGroup, gt: GT): string { @@ -1253,8 +1319,8 @@ function foldGroupLabel(group: FleetFoldGroup, gt: GT): string { const COLUMN_TITLES = (gt: GT): Record => ({ client: gt("This app"), - environments: gt("Your environments"), - targets: gt("Reached through a link"), + environments: gt("Environments"), + targets: gt("Linked machines"), }); interface LinkDrag { @@ -1731,7 +1797,7 @@ const FleetScene = memo(function FleetScene({ {stacks.map((stack) => { const geometry = layout.stacks.get(stack.id); if (geometry === undefined) return null; - const { face, rect, more } = geometry; + const { face, tray, more } = geometry; const count = stack.memberIds.length; const range = stack.firstLabel === stack.lastLabel @@ -1765,46 +1831,47 @@ const FleetScene = memo(function FleetScene({ summary, }); const partial = fleetStackPartial(stack); - // The room a closed stack's card adds below its name when some machines do not answer. - const partialBand = partial && !stack.expanded ? 20 : 0; + // The room the card adds below its name when some machines do not answer. + const partialBand = partial ? 20 : 0; const ToggleIcon = stack.expanded ? FoldVerticalIcon : UnfoldVerticalIcon; const hidden = count - stack.shownIds.length; return (
    - {stack.expanded ? ( + {/* The card is the same open or closed, so it does not change under the pointer. */} + {[8, 4].map((lift) => (
    + ))} + {tray === null ? null : ( +
    - ) : ( - [8, 4].map((lift) => ( -
    - )) )}
    diff --git a/apps/web/src/components/settings/EnvironmentsMapDetails.tsx b/apps/web/src/components/settings/EnvironmentsMapDetails.tsx index af0267f16a9f8..098a61e1e6d36 100644 --- a/apps/web/src/components/settings/EnvironmentsMapDetails.tsx +++ b/apps/web/src/components/settings/EnvironmentsMapDetails.tsx @@ -175,12 +175,7 @@ export function FleetDetails(props: FleetDetailsProps) { ) : null} {pair ? (
    -

    - {gt( - "{source} and {target} link to each other with the same access, so the map draws both links as one line. Each is its own link, and is forgotten on its own.", - { source: labelOf(pair.forward.from), target: labelOf(pair.forward.to) }, - )} -

    +

    {gt("Two links, one each way.")}

    {[pair.forward, pair.back].map((link) => ( linkNeedsAttention(edge.health)).length; const { machines } = summary; - const canLink = graph.nodes.some( - (entry) => entry.kind === "environment" && entry.linking === "ready", - ); return (
    0 - ? gt( - "{count, plural, one {# link needs attention.} other {# links need attention.}}", - { count: attention }, - ) + ? gt("{count, plural, one {# needs attention} other {# need attention}}", { + count: attention, + $context: "after a count of links: how many of those links have a problem", + }) : null } > @@ -270,16 +262,6 @@ function FleetSummary({ ) : gt("{machines, plural, one {# machine} other {# machines}}", { machines })} -

    - {canLink - ? gt( - "Select a machine to manage it. To link two machines, drag the plus on an environment onto another machine, or press it to pick one. To link several at once, Shift-click machines or Shift-drag a box around them, then drag the plus onto one of them.", - ) - : gt("Select a machine to manage it.")}{" "} - {gt( - "A link reaches one machine and stops there. It does not pass on to the machines that one links to.", - )} -

    ); } @@ -426,45 +408,39 @@ function StackDetails({ : `${stack.firstLabel} … ${stack.lastLabel}`; const sources = stack.sources.map((source) => nodeById.get(source.sourceId)?.label ?? ""); const [only] = stack.sources; - const hidden = stack.memberIds.length - stack.shownIds.length; return (
    {range}
    {members.length > MEMBER_LIST_ROWS ? ( @@ -585,17 +561,13 @@ function Reconnect({ environment }: { readonly environment: EnvironmentPresentat function linksNote(node: FleetEnvironmentNode, gt: GT): string | null { if (node.phase !== "connected") { - return gt( - "This app is not connected to {label} right now, so any links it holds to other machines are not shown.", - { label: node.label }, - ); + return gt("Not connected, so its links are not shown."); } switch (node.outgoing) { case "off": - return gt( - "Linked environments is off on {label}. Turn it on in its Settings, under Labs, to link from it.", - { label: node.label }, - ); + return gt("To link from {label}, turn on Linked environments in its Labs settings.", { + label: node.label, + }); case "unknown": return gt("This app may not read the links {label} holds.", { label: node.label }); case "error": @@ -663,17 +635,15 @@ function NodeDetails({ return (
    entry.phase === "connected").length, total: hosts.length, })} > {node.label} -

    - {gt( - "Each line from here is a saved route to an environment. The map shows the links of the environments this app is connected to; one it cannot reach may hold links that are not drawn.", - )} +

    + {gt("Each line from here is a saved route to an environment.")}

    ); @@ -697,10 +667,7 @@ function NodeDetails({ {renderConnectMachine(node.environmentId)}

    - {gt( - "{label} is on your T3 Connect account but not added to this app. Add it to connect, and to see the links it holds.", - { label: node.label }, - )} + {gt("Add {label} to this app to connect to it.", { label: node.label })}

    {incoming.length > 0 ? linkedFrom : null}
    @@ -734,10 +701,7 @@ function NodeDetails({ ))}

    - {gt( - "This app is not connected to {label}, so any links it holds to other machines are not shown.", - { label: node.label }, - )} + {gt("Not connected, so its links are not shown.")}

    ); diff --git a/apps/web/src/components/settings/LinkSeveralEnvironments.tsx b/apps/web/src/components/settings/LinkSeveralEnvironments.tsx index b270203b217d2..fd2002c9004cb 100644 --- a/apps/web/src/components/settings/LinkSeveralEnvironments.tsx +++ b/apps/web/src/components/settings/LinkSeveralEnvironments.tsx @@ -365,7 +365,7 @@ export function LinkSeveralEnvironmentsDialog({ {unlisted > 0 ? (

    {gt( - "{count, plural, one {# machine you picked is known only through a link, so it needs a pairing code. Link it on its own.} other {# machines you picked are known only through a link, so they need a pairing code. Link them one at a time.}}", + "{count, plural, one {# machine needs a pairing code, so it is not listed.} other {# machines need a pairing code, so they are not listed.}}", { count: unlisted }, )}

    @@ -382,7 +382,7 @@ export function LinkSeveralEnvironmentsDialog({ )} {backFailed > 0 ? ` ${gt( - "{count, plural, one {# machine could not link back. Select the link on the map to try again.} other {# machines could not link back. Select each link on the map to try again.}}", + "{count, plural, one {# machine could not link back.} other {# machines could not link back.}}", { count: backFailed }, )}` : null} @@ -401,13 +401,10 @@ export function LinkSeveralEnvironmentsDialog({ {gt("Also link each machine back to {source}", { source: sourceLabel })} - {gt( - "Agents on each machine can then work on {source} too, with the same access. Each is a second link, made on that machine.", - { source: sourceLabel }, - )} + {gt("Agents there can then work on {source} too.", { source: sourceLabel })} {alsoLinkBack && oneWayOnly > 0 ? ` ${gt( - "{count, plural, one {# machine you picked cannot link back, or already does: it is linked one way.} other {# machines you picked cannot link back, or already do: they are linked one way.}}", + "{count, plural, one {# machine stays one-way.} other {# machines stay one-way.}}", { count: oneWayOnly }, )}` : null} diff --git a/apps/web/src/components/settings/LinkedEnvironmentsSettings.tsx b/apps/web/src/components/settings/LinkedEnvironmentsSettings.tsx index 86beaf978a460..d0a32970ec336 100644 --- a/apps/web/src/components/settings/LinkedEnvironmentsSettings.tsx +++ b/apps/web/src/components/settings/LinkedEnvironmentsSettings.tsx @@ -496,10 +496,10 @@ export function LinkEnvironmentDialog({ })} - {gt( - "Agents on {target} can then work on {source} too, with the same access. This is a second link, made on {target}.", - { source: source.label, target: machine.label }, - )} + {gt("Agents on {target} can then work on {source} too.", { + source: source.label, + target: machine.label, + })} diff --git a/apps/web/src/components/settings/environmentsMap.logic.test.ts b/apps/web/src/components/settings/environmentsMap.logic.test.ts index b0b78a43fdcd4..4b404806543f3 100644 --- a/apps/web/src/components/settings/environmentsMap.logic.test.ts +++ b/apps/web/src/components/settings/environmentsMap.logic.test.ts @@ -3,6 +3,7 @@ import * as DateTime from "effect/DateTime"; import { describe, expect, it } from "vite-plus/test"; import { + anchorFleetView, buildFleetGraph, FLEET_FIT_LEGIBLE_SCALE, fitFleetLayout, @@ -707,22 +708,64 @@ describe("layoutFleetGraph", () => { ]); }); - it("opens a stack in place, each machine inside its frame", () => { + it("opens a stack where its card is, each machine in the tray below it", () => { const large = largeSetup(); - const stackId = fleetStacks(large, new Set())[0]!.id; + const closed = fleetStacks(large, new Set()); + const stackId = closed[0]!.id; const open = fleetStacks(large, new Set([stackId])); - const layout = layoutFleetGraph(large, open); - expectNoOverlap(layout, membersOf(open)); - // Forty machines open to the first 24 and one card for the other 16, never forty cards. - expect(layout.nodes.size).toBe(13 + FLEET_STACK_SHOWN_MAX); - const frame = layout.stacks.get(stackId)!.rect; - const more = fleetFocusRects(layout).get(fleetMoreNodeId(stackId))!; - expect(layout.nodes.has(open[0]!.memberIds[FLEET_STACK_SHOWN_MAX]!)).toBe(false); - for (const rect of [more, ...open[0]!.shownIds.map((member) => layout.nodes.get(member)!)]) { - expect(rect.x).toBeGreaterThanOrEqual(frame.x); - expect(rect.y).toBeGreaterThanOrEqual(frame.y); - expect(rect.x + rect.width).toBeLessThanOrEqual(frame.x + frame.width); - expect(rect.y + rect.height).toBeLessThanOrEqual(frame.y + frame.height); + for (const width of [undefined, 560, 900, 1400]) { + const before = layoutFleetGraph(large, closed, width); + const layout = layoutFleetGraph(large, open, width); + expectNoOverlap(layout, membersOf(open)); + // Forty machines open to the first 24 and one card for the other 16, never forty cards. + expect(layout.nodes.size).toBe(13 + FLEET_STACK_SHOWN_MAX); + const { face, tray } = layout.stacks.get(stackId)!; + const more = fleetFocusRects(layout).get(fleetMoreNodeId(stackId))!; + expect(layout.nodes.has(open[0]!.memberIds[FLEET_STACK_SHOWN_MAX]!)).toBe(false); + for (const rect of [more, ...open[0]!.shownIds.map((member) => layout.nodes.get(member)!)]) { + expect(rect.x).toBeGreaterThanOrEqual(tray!.x); + expect(rect.y).toBeGreaterThanOrEqual(tray!.y); + expect(rect.x + rect.width).toBeLessThanOrEqual(tray!.x + tray!.width); + expect(rect.y + rect.height).toBeLessThanOrEqual(tray!.y + tray!.height); + } + // The card, its lines, every route and every column stay put: the width's measures are + // those of the closed map, so opening never closes the columns up. + expect(face).toEqual(before.stacks.get(stackId)!.face); + expect(layout.stacks.get(stackId)!.lines.map((line) => line.arrow)).toEqual( + before.stacks.get(stackId)!.lines.map((line) => line.arrow), + ); + expect(layout.routes).toEqual(before.routes); + expect(layout.columns).toEqual(before.columns); + expect(tray!.y).toBeGreaterThanOrEqual(face.y + face.height); + // Only machines the tray would cover move, and only down. + for (const [nodeId, rect] of before.nodes) { + const now = layout.nodes.get(nodeId)!; + if (rect.x === face.x && rect.y > face.y) { + expect(now.y, nodeId).toBeGreaterThanOrEqual(tray!.y + tray!.height); + expect({ ...now, y: rect.y }, nodeId).toEqual(rect); + } else { + expect(now, nodeId).toEqual(rect); + } + } + } + }); + + it("opens a group of environments where its card is, moving only the cards below it", () => { + const graph = hugeSetup(); + const closed = fleetStacks(graph, new Set()); + const fold = closed.find((stack) => stack.kind === "environments")!; + const open = fleetStacks(graph, new Set([fold.id])); + for (const width of [560, 1400]) { + const before = layoutFleetGraph(graph, closed, width); + const layout = layoutFleetGraph(graph, open, width); + expectNoOverlap(layout, membersOf(open)); + const { face } = layout.stacks.get(fold.id)!; + expect(face).toEqual(before.stacks.get(fold.id)!.face); + for (const [nodeId, rect] of before.nodes) { + const now = layout.nodes.get(nodeId)!; + if (rect.y < face.y) expect(now, nodeId).toEqual(rect); + else expect({ ...now, y: rect.y }, nodeId).toEqual(rect); + } } }); @@ -830,7 +873,8 @@ describe("layoutFleetGraph", () => { const geometry = edge.kind === "link" ? layout.links.get(edge.id) : undefined; if (geometry === undefined) continue; const [before, last] = samplePath(geometry.d).slice(-2); - expect(before!.y).toBeCloseTo(geometry.arrow.y, 0); + // A machine an open stack pushed far down is reached by a steeper curve. + expect(Math.abs(before!.y - geometry.arrow.y)).toBeLessThan(1); expect(last!.y).toBe(geometry.arrow.y); arrivals.set(edge.to, [...(arrivals.get(edge.to) ?? []), geometry.arrow.y]); } @@ -1229,6 +1273,121 @@ describe("fitting the view", () => { ); }); + it("keeps a stack where it is on screen when it opens, and returns when it closes", () => { + const graph = largeSetup(); + const closed = fleetStacks(graph, new Set()); + const stackId = closed[0]!.id; + const open = fleetStacks(graph, new Set([stackId])); + const bounds = { min: 180, max: 840 }; + const onScreen = (view: { x: number; y: number; scale: number }, rect: FleetRect) => ({ + x: rect.x * view.scale + view.x, + y: rect.y * view.scale + view.y, + }); + for (const width of [560, 640, 1400]) { + const before = layoutFleetGraph(graph, closed, width); + const after = layoutFleetGraph(graph, open, width); + const size = { width, height: fleetCanvasHeight(before, width, bounds) }; + const fit = fitFleetLayout(before, size); + const face = before.stacks.get(stackId)!.face; + const opened = anchorFleetView({ + key: "open", + from: { key: "closed", held: null, view: fit, size, face }, + stack: after.stacks.get(stackId)!, + layout: after, + bounds, + }); + expect(opened.key).toBe("open"); + expect(opened.glide).toBe(true); + // The canvas only grows, to show what opened, and never past its bound. + expect(opened.height).toBeGreaterThanOrEqual(size.height); + expect(opened.height).toBeLessThanOrEqual(bounds.max); + // The scale holds, and the card and every machine beside it stay where they were. + expect(opened.view).toEqual(fit); + expect(onScreen(opened.view, after.nodes.get(node("nucbox"))!)).toEqual( + onScreen(fit, before.nodes.get(node("nucbox"))!), + ); + const tray = after.stacks.get(stackId)!.rect; + expect(onScreen(opened.view, tray).x + tray.width * opened.view.scale).toBeLessThanOrEqual( + width, + ); + + // Zoomed in until the stack is wider than the canvas, the view shrinks to its width, once. + const close = { x: fit.x - 600, y: fit.y, scale: 6 }; + const shrunk = anchorFleetView({ + key: "open", + from: { key: "closed", held: null, view: close, size, face }, + stack: after.stacks.get(stackId)!, + layout: after, + bounds, + }); + expect(shrunk.view.scale).toBeLessThan(6); + expect(onScreen(shrunk.view, tray).x).toBeGreaterThanOrEqual(0); + expect(onScreen(shrunk.view, tray).x + tray.width * shrunk.view.scale).toBeLessThanOrEqual( + width, + ); + expect(onScreen(shrunk.view, face).y).toBeCloseTo(onScreen(close, face).y); + + // Closing it again goes back to the fit it came from. + const back = anchorFleetView({ + key: "closed", + from: { key: "open", held: opened, view: opened.view, size, face }, + stack: before.stacks.get(stackId)!, + layout: before, + bounds, + }); + expect(back.key).toBe(""); + expect(back.glide).toBe(true); + + // After a pan the view is the user's: closing keeps the card under the pointer instead. + const panned = { ...opened, view: { ...opened.view, x: opened.view.x - 40 }, undo: null }; + const closedAgain = anchorFleetView({ + key: "closed", + from: { key: "open", held: panned, view: panned.view, size, face }, + stack: before.stacks.get(stackId)!, + layout: before, + bounds, + }); + expect(closedAgain.key).toBe("closed"); + expect(closedAgain.view.scale).toBe(panned.view.scale); + expect(onScreen(closedAgain.view, face)).toEqual(onScreen(panned.view, face)); + expect(closedAgain.height).toBeLessThanOrEqual(size.height); + } + }); + + it("returns to a view set by hand before the stack opened", () => { + const graph = largeSetup(); + const closed = fleetStacks(graph, new Set()); + const stackId = closed[0]!.id; + const before = layoutFleetGraph(graph, closed, 1400); + const after = layoutFleetGraph(graph, fleetStacks(graph, new Set([stackId])), 1400); + const bounds = { min: 180, max: 840 }; + const size = { width: 1400, height: 500 }; + const held = { + key: "closed", + view: { x: -120, y: 30, scale: 1.4 }, + height: 500, + glide: false, + undo: null, + }; + const face = before.stacks.get(stackId)!.face; + const opened = anchorFleetView({ + key: "open", + from: { key: "closed", held, view: held.view, size, face }, + stack: after.stacks.get(stackId)!, + layout: after, + bounds, + }); + expect(opened.view.scale).toBe(1.4); + const back = anchorFleetView({ + key: "closed", + from: { key: "open", held: opened, view: opened.view, size, face }, + stack: before.stacks.get(stackId)!, + layout: before, + bounds, + }); + expect(back).toEqual({ ...held, glide: true }); + }); + it("zooms around the anchor", () => { const view = zoomFleetView({ x: 10, y: 20, scale: 1 }, 2, { x: 100, y: 100 }); expect(view).toEqual({ scale: 2, x: -80, y: -60 }); diff --git a/apps/web/src/components/settings/environmentsMap.logic.ts b/apps/web/src/components/settings/environmentsMap.logic.ts index f67cbfd5cb353..288d467a733d8 100644 --- a/apps/web/src/components/settings/environmentsMap.logic.ts +++ b/apps/web/src/components/settings/environmentsMap.logic.ts @@ -734,11 +734,13 @@ export interface FleetStackLine { } export interface FleetStackGeometry { - /** The whole footprint: the sheets of a closed stack, or the frame of an open one. */ + /** The whole footprint: the sheets of a closed stack, or an open one's card and its tray. */ readonly rect: FleetRect; - /** The part that is the stack's control: the front sheet, or an open stack's header. */ + /** The stack's card. Opening the stack leaves it where it is, and the tray grows out below. */ readonly face: FleetRect; readonly lines: ReadonlyArray; + /** The panel an open stack draws its machines in, below its card. */ + readonly tray: FleetRect | null; /** In an open stack, the card standing for the machines it does not draw. */ readonly more: FleetRect | null; } @@ -853,14 +855,17 @@ const mixMetrics = (from: FleetMetrics, to: FleetMetrics, t: number): FleetMetri const CHIP = { width: 124, height: 26 }; const CHIP_GAP = 6; const FRAME_PAD = 8; -const FRAME_HEADER = 30; -/** An open group of environments is two machines wide, and the column widens to hold it. */ -const FOLD_COLUMNS = 2; +/** Between a stack's card and the tray it opens. */ +const TRAY_GAP = 4; +/** Narrower than this a machine's name no longer reads, so a tray gives up a column instead. */ +const CHIP_MIN_WIDTH = 60; const GROUP_GAP = 28; const BAY_GAP = 12; const LANE_STEP = 14; const LANE_CLEARANCE = 10; const ARROW_LENGTH = 6; +/** The least run a link keeps from the last lane to a machine: its turn and its arrowhead. */ +const LINK_RUN_MIN = 20; /** How far apart two hosts' links enter one machine, so each keeps its own last stretch. */ const ENTRY_PITCH = 14; /** The channel left of the cards that links between environments keep to themselves. */ @@ -919,8 +924,29 @@ const frameColumns = (count: number) => Math.max(2, Math.min(4, Math.ceil(Math.s const frameCells = (stack: FleetStack) => stack.shownIds.length + Number(stack.memberIds.length > stack.shownIds.length); -const frameHeight = (stack: FleetStack, columns: number, header: number) => - header + Math.ceil(frameCells(stack) / columns) * (CHIP.height + CHIP_GAP) - CHIP_GAP + FRAME_PAD; +const trayWidth = (columns: number) => FRAME_PAD * 2 + columns * (CHIP.width + CHIP_GAP) - CHIP_GAP; + +/** What an open stack adds below its card. */ +const trayHeight = (stack: FleetStack, columns: number) => + TRAY_GAP + + FRAME_PAD * 2 + + Math.ceil(frameCells(stack) / columns) * (CHIP.height + CHIP_GAP) - + CHIP_GAP; + +/** + * What an open stack of link targets has to stay within, both read off the map with every stack + * closed: the width its tray can take without the view shrinking to show it, and where its + * column stood, so opening one neither rescales the map nor moves a column. + */ +interface FleetTrayRoom { + readonly width: number; + readonly bayX: number | null; +} + +const closedStacks = (stacks: ReadonlyArray) => + stacks.some((stack) => stack.expanded) + ? stacks.map((stack) => (stack.expanded ? { ...stack, expanded: false } : stack)) + : stacks; /** One line into a machine or a stack, from the environment holding the link. */ interface BayEntry { @@ -981,19 +1007,40 @@ export function layoutFleetGraph( stacks: ReadonlyArray = [], canvasWidth?: number, ): FleetLayout { + // The measures follow the map with every stack closed, so opening one moves no column. + const closed = closedStacks(stacks); + const { metrics, layout } = fitFleetMetrics(graph, closed, canvasWidth); + if (closed === stacks) return layout; + if (canvasWidth === undefined) { + const bayX = layout.columns.find((column) => column.id === "targets")?.x ?? null; + return layoutFleetGraphAt(graph, stacks, metrics, { width: Infinity, bayX }); + } + const bayX = layout.columns.find((column) => column.id === "targets")?.x ?? null; + // How much of the map the closed fit shows across: the room a tray has at that same scale. + const room = canvasWidth - fleetFitPadding(canvasWidth) * 2; + const shown = room / Math.min(FLEET_FIT_MAX_SCALE, room / layout.width); + return layoutFleetGraphAt(graph, stacks, metrics, { width: shown - (bayX ?? 0), bayX }); +} + +function fitFleetMetrics( + graph: FleetGraph, + stacks: ReadonlyArray, + canvasWidth: number | undefined, +): { readonly metrics: FleetMetrics; readonly layout: FleetLayout } { const regular = layoutFleetGraphAt(graph, stacks, REGULAR); - if (canvasWidth === undefined) return regular; + if (canvasWidth === undefined) return { metrics: REGULAR, layout: regular }; const room = canvasWidth - fleetFitPadding(canvasWidth) * 2; const narrow = room < regular.width; // Narrower than regular, the map fits at full size. Wider, it is enlarged first. const wanted = narrow ? room : room / FLEET_FIT_MAX_SCALE; - if (!narrow && wanted <= regular.width) return regular; + if (!narrow && wanted <= regular.width) return { metrics: REGULAR, layout: regular }; const limit = narrow ? COMPACT : ROOMY; const end = layoutFleetGraphAt(graph, stacks, limit); - if (narrow ? end.width >= wanted : end.width <= wanted) return end; + if (narrow ? end.width >= wanted : end.width <= wanted) return { metrics: limit, layout: end }; // Width is a maximum of sums of the measures, so it never exceeds this straight-line estimate. const t = (wanted - regular.width) / (end.width - regular.width); - return layoutFleetGraphAt(graph, stacks, mixMetrics(REGULAR, limit, t)); + const metrics = mixMetrics(REGULAR, limit, t); + return { metrics, layout: layoutFleetGraphAt(graph, stacks, metrics) }; } /** @@ -1005,6 +1052,7 @@ function layoutFleetGraphAt( graph: FleetGraph, stacks: ReadonlyArray, metrics: FleetMetrics, + room: FleetTrayRoom = { width: Infinity, bayX: null }, ): FleetLayout { const CLIENT_SIZE = { width: metrics.app, height: CLIENT.height }; const PILL_SIZE = { width: metrics.pill, height: PILL.height }; @@ -1171,54 +1219,88 @@ function layoutFleetGraphAt( }; const pillsHeight = (hostId: string) => (Math.max(1, routesInto(hostId)) - 1) * FLEET_ROUTE_PITCH + PILL.height; - const hostWidth = folds.some((stack) => stack.expanded) - ? FRAME_PAD * 2 + FOLD_COLUMNS * (CHIP.width + CHIP_GAP) - CHIP_GAP - : metrics.card; - const entryHeight = (entry: ColumnEntry) => + const foldFace = { width: metrics.card - STACK.lift, height: STACK.height }; + const closedWidth = metrics.target + STACK.lift; + /** + * A group of environments opens one machine wide, under its card. Link targets take the + * columns there is room for, and with no room to spare two narrow ones under the closed stack. + */ + const trayShape = (stack: FleetStack) => { + if (stack.kind === "environments") return { columns: 1, width: metrics.card }; + const wanted = frameColumns(frameCells(stack)); + const fitting = Math.floor((room.width - FRAME_PAD * 2 + CHIP_GAP) / (CHIP.width + CHIP_GAP)); + if (fitting >= 2) { + const columns = Math.min(wanted, fitting); + return { columns, width: Math.max(closedWidth, trayWidth(columns)) }; + } + const width = Math.max(closedWidth, Math.min(room.width, trayWidth(2))); + return { + columns: (width - FRAME_PAD * 2 - CHIP_GAP) / 2 < CHIP_MIN_WIDTH ? 1 : 2, + width, + }; + }; + /** `open` false is the place an entry takes with its stack closed, which is where it starts. */ + const entryHeight = (entry: ColumnEntry, open: boolean) => entry.kind === "host" ? // The place a card takes in the column: its own height, or what its route names need. Math.max(cardHeight(entry.host), pillsHeight(entry.id) - PILL_OVERHANG * 2) - : entry.stack.expanded - ? frameHeight(entry.stack, FOLD_COLUMNS, FRAME_HEADER) - : STACK.height + STACK.lift; + : STACK.height + + STACK.lift + + (open && entry.stack.expanded + ? trayHeight(entry.stack, trayShape(entry.stack).columns) + : 0); /** Tall enough that each line in keeps its own entry. */ const faceHeight = (item: BayItem, least: number) => Math.max(least, 20 + (item.entries.length - 1) * ENTRY_PITCH); - const itemSize = (item: BayItem) => { + const itemSize = (item: BayItem, open: boolean) => { if (item.kind === "target") { return { width: metrics.target, height: faceHeight(item, TARGET.height) }; } - if (!item.stack.expanded) { - return { - width: metrics.target + STACK.lift, - height: - faceHeight(item, STACK.height + (fleetStackPartial(item.stack) ? STACK.partial : 0)) + - STACK.lift, - }; - } - const columns = frameColumns(frameCells(item.stack)); + const closed = { + width: closedWidth, + height: + faceHeight(item, STACK.height + (fleetStackPartial(item.stack) ? STACK.partial : 0)) + + STACK.lift, + }; + if (!open || !item.stack.expanded) return closed; + const shape = trayShape(item.stack); return { - width: FRAME_PAD * 2 + columns * (CHIP.width + CHIP_GAP) - CHIP_GAP, - height: frameHeight(item.stack, columns, faceHeight(item, FRAME_HEADER)), + width: shape.width, + height: closed.height + trayHeight(item.stack, shape.columns), }; }; - /** Places an open stack's machines in its frame, and returns the card for the rest. */ - const fillFrame = ( - stack: FleetStack, - x: number, - top: number, - columns: number, - chipWidth: number, - ): FleetRect | null => { + /** Places an open stack's machines in the tray below its card, and returns the card for the rest. */ + const fillTray = (stack: FleetStack, face: FleetRect): FleetRect | null => { + const { columns, width } = trayShape(stack); + const chipWidth = (width - FRAME_PAD * 2 - (columns - 1) * CHIP_GAP) / columns; const cell = (index: number): FleetRect => ({ - x: x + FRAME_PAD + (index % columns) * (chipWidth + CHIP_GAP), - y: top + Math.floor(index / columns) * (CHIP.height + CHIP_GAP), + x: face.x + FRAME_PAD + (index % columns) * (chipWidth + CHIP_GAP), + y: + face.y + + face.height + + TRAY_GAP + + FRAME_PAD + + Math.floor(index / columns) * (CHIP.height + CHIP_GAP), width: chipWidth, height: CHIP.height, }); stack.shownIds.forEach((memberId, index) => nodes.set(memberId, cell(index))); return stack.memberIds.length > stack.shownIds.length ? cell(stack.shownIds.length) : null; }; + /** An open stack's footprint, its card and tray, and the tray alone. */ + const openRects = (stack: FleetStack, face: FleetRect) => { + const { columns, width } = trayShape(stack); + const height = trayHeight(stack, columns); + return { + rect: { x: face.x, y: face.y, width, height: face.height + height }, + tray: { + x: face.x, + y: face.y + face.height + TRAY_GAP, + width, + height: height - TRAY_GAP, + }, + }; + }; const pillX = metrics.app + metrics.wire; const cardX = @@ -1228,89 +1310,88 @@ function layoutFleetGraphAt( (betweenLanes.length === 0 ? 0 : metrics.betweenLast + (betweenLanes.length - 1) * BETWEEN.step + metrics.betweenFirst); - const cardRight = cardX + hostWidth; + const cardRight = cardX + metrics.card; // Heights first: which lanes the channel needs, and so how wide it is, follows from them. + // Rows are spaced as if every stack were closed, so an open one grows down from where its + // card was and moves only what its tray would otherwise cover. const placed: Array<{ readonly item: BayItem; readonly y: number; readonly size: { readonly width: number; readonly height: number }; + /** The item's height with its stack closed: where its card ends. */ + readonly closedHeight: number; }> = []; const column: Array<{ readonly entry: ColumnEntry; readonly center: number }> = []; + /** Where each entry's middle is with every stack closed: this app's card is set by these. */ + const restCenters: number[] = []; /** Where a card's routes arrive and its links leave: its middle. */ const anchors = new Map(); let y = HEADER; + let cardFloor = -Infinity; + let bayFloor = -Infinity; for (const row of rows) { - const heights = row.entries.map(entryHeight); + const heights = row.entries.map((entry) => entryHeight(entry, false)); const cardsHeight = heights.reduce((sum, height) => sum + height + GROUP_GAP, -GROUP_GAP); - const sizes = row.items.map(itemSize); + const sizes = row.items.map((item) => itemSize(item, false)); const bayHeight = sizes.reduce((sum, size) => sum + size.height + BAY_GAP, -BAY_GAP); const rowHeight = Math.max(cardsHeight, bayHeight); - let cardY = y + (rowHeight - cardsHeight) / 2; + let restY = y + (rowHeight - cardsHeight) / 2; row.entries.forEach((entry, index) => { - const height = heights[index]!; + const rest = heights[index]!; + const cardY = Math.max(restY, cardFloor); if (entry.kind === "host") { - const anchor = cardY + height / 2; + const anchor = cardY + rest / 2; const own = cardHeight(entry.host); - nodes.set(entry.id, { x: cardX, y: anchor - own / 2, width: hostWidth, height: own }); + nodes.set(entry.id, { x: cardX, y: anchor - own / 2, width: metrics.card, height: own }); anchors.set(entry.id, anchor); if (entry.host.kind === "environment") handles.set(entry.id, { x: cardRight, y: anchor }); column.push({ entry, center: anchor }); - } else if (entry.stack.expanded) { - const more = fillFrame( - entry.stack, - cardX, - cardY + FRAME_HEADER, - FOLD_COLUMNS, - (hostWidth - FRAME_PAD * 2 - (FOLD_COLUMNS - 1) * CHIP_GAP) / FOLD_COLUMNS, - ); - stackGeometry.set(entry.id, { - rect: { x: cardX, y: cardY, width: hostWidth, height }, - face: { x: cardX, y: cardY, width: hostWidth, height: FRAME_HEADER }, - lines: [], - more, - }); - column.push({ entry, center: cardY + FRAME_HEADER / 2 }); + restCenters.push(restY + rest / 2); } else { - const face = { - x: cardX, - y: cardY + STACK.lift, - width: hostWidth - STACK.lift, - height: STACK.height, - }; + const face = { x: cardX, y: cardY + STACK.lift, ...foldFace }; stackGeometry.set(entry.id, { - rect: { x: cardX, y: cardY, width: hostWidth, height }, + ...(entry.stack.expanded + ? openRects(entry.stack, face) + : { rect: { x: cardX, y: cardY, width: metrics.card, height: rest }, tray: null }), face, lines: [], - more: null, + more: entry.stack.expanded ? fillTray(entry.stack, face) : null, }); column.push({ entry, center: face.y + face.height / 2 }); + restCenters.push(restY + STACK.lift + face.height / 2); } - cardY += height + GROUP_GAP; + cardFloor = cardY + entryHeight(entry, true) + GROUP_GAP; + restY += rest + GROUP_GAP; }); - let itemY = y + (rowHeight - bayHeight) / 2; + let restItemY = y + (rowHeight - bayHeight) / 2; row.items.forEach((item, index) => { - const size = sizes[index]!; - placed.push({ item, y: itemY, size }); - itemY += size.height + BAY_GAP; + const itemY = Math.max(restItemY, bayFloor); + const size = itemSize(item, true); + placed.push({ item, y: itemY, size, closedHeight: sizes[index]!.height }); + bayFloor = itemY + size.height + BAY_GAP; + restItemY += sizes[index]!.height + BAY_GAP; }); y += rowHeight + GROUP_GAP; } - let height = Math.max(HEADER + CLIENT.height, y - GROUP_GAP); + let height = Math.max( + HEADER + CLIENT.height, + y - GROUP_GAP, + cardFloor - GROUP_GAP, + bayFloor - BAY_GAP, + ); const centerOf = (id: string) => anchors.get(id)!; - /** The middle of what a line into the item points at: the machine, or the stack's control. */ - const faceOf = (item: BayItem, itemY: number, size: { readonly height: number }) => { - if (item.kind === "target") return { top: itemY, height: size.height }; - return item.stack.expanded - ? { top: itemY, height: faceHeight(item, FRAME_HEADER) } - : { top: itemY + STACK.lift, height: size.height - STACK.lift }; - }; + /** What a line into the item points at: the machine, or the stack's card, open or closed. */ + const faceOf = (item: BayItem, itemY: number, closedHeight: number) => + item.kind === "target" + ? { top: itemY, height: closedHeight } + : { top: itemY + STACK.lift, height: closedHeight - STACK.lift }; /** Where each line into the item arrives. */ const entryY = new Map(); - for (const { item, y: itemY, size } of placed) { - const face = faceOf(item, itemY, size); + for (const { item, y: itemY, closedHeight } of placed) { + const face = faceOf(item, itemY, closedHeight); item.entries.forEach((entry, index) => { entryY.set( entry.key, @@ -1381,7 +1462,12 @@ function layoutFleetGraphAt( const laneX = (lane: FleetLane) => cardRight + metrics.laneFirst + lane.index * LANE_STEP; const fanX = taken.length === 0 ? cardRight : cardRight + metrics.laneFirst + taken.length * LANE_STEP; - const bayX = fanX + metrics.linkRun; + // Machines an open stack pushed down can need a lane more. It comes out of the run to their + // column while that has any to give, so the column stays where it stood. + const bayX = + room.bayX === null + ? fanX + metrics.linkRun + : Math.max(room.bayX, fanX + Math.min(metrics.linkRun, LINK_RUN_MIN)); const endX = bayX - ARROW_LENGTH; const lineInto = (entry: BayEntry) => { const trunk = trunkOf.get(entry.key); @@ -1396,7 +1482,7 @@ function layoutFleetGraphAt( }; let width = fanX; - for (const { item, y: itemY, size } of placed) { + for (const { item, y: itemY, size, closedHeight } of placed) { width = Math.max(width, bayX + size.width); if (item.kind === "target") { nodes.set(item.targetId, { x: bayX, y: itemY, ...size }); @@ -1412,39 +1498,26 @@ function layoutFleetGraphAt( continue; } const { stack } = item; - const face = faceOf(item, itemY, size); - const lines = item.entries.map((entry, index) => ({ - sourceId: entry.from, - access: stack.sources[index]!.access, - ...lineInto(entry), - })); - if (!stack.expanded) { - stackGeometry.set(stack.id, { - rect: { x: bayX, y: itemY, ...size }, - face: { x: bayX, y: face.top, width: metrics.target, height: face.height }, - lines, - more: null, - }); - continue; - } + const { top, height: faceHeight } = faceOf(item, itemY, closedHeight); + const face = { x: bayX, y: top, width: metrics.target, height: faceHeight }; stackGeometry.set(stack.id, { - rect: { x: bayX, y: itemY, ...size }, - face: { x: bayX, y: itemY, width: size.width, height: face.height }, - lines, - more: fillFrame( - stack, - bayX, - itemY + face.height, - frameColumns(frameCells(stack)), - CHIP.width, - ), + ...(stack.expanded + ? openRects(stack, face) + : { rect: { x: bayX, y: itemY, ...size }, tray: null }), + face, + lines: item.entries.map((entry, index) => ({ + sourceId: entry.from, + access: stack.sources[index]!.access, + ...lineInto(entry), + })), + more: stack.expanded ? fillTray(stack, face) : null, }); } const clientCenterY = - column.length === 0 + restCenters.length === 0 ? HEADER + CLIENT.height / 2 - : (column[0]!.center + column.at(-1)!.center) / 2; + : (restCenters[0]! + restCenters.at(-1)!) / 2; nodes.set(FLEET_CLIENT_NODE_ID, { x: 0, y: clientCenterY - CLIENT.height / 2, @@ -1794,3 +1867,70 @@ export function zoomFleetView( y: anchor.y - (anchor.y - view.y) * ratio, }; } + +/** A view that is not the fit: set by hand, or kept in place while a stack opened or closed. */ +export interface FleetHeldView { + /** The shape it was set on. It holds while the map keeps that shape. */ + readonly key: string; + readonly view: FleetViewTransform; + readonly height: number; + /** Eased into; a drag or pinch tracks the hand instead. */ + readonly glide: boolean; + /** What closing the stack again returns to, while nothing else has moved the view since. */ + readonly undo: { readonly key: string; readonly held: FleetHeldView | null } | null; +} + +/** + * The view after a stack opened or closed. Its card stays where it was on screen and the scale + * holds, so nothing is fitted again. The canvas grows to show what the stack added, up to its + * bound; past that the user pans. Only a stack wider than the canvas at this scale shrinks the + * view, and then just to its width. Toggling it back returns the view it had before. + */ +export function anchorFleetView(input: { + readonly key: string; + /** The shape, the view held on it and the canvas before the change. */ + readonly from: { + readonly key: string; + readonly held: FleetHeldView | null; + readonly view: FleetViewTransform; + readonly size: { readonly width: number; readonly height: number }; + readonly face: FleetPoint; + }; + /** The stack and the map after it. */ + readonly stack: Pick; + readonly layout: Pick; + readonly bounds: { readonly min: number; readonly max: number }; +}): FleetHeldView { + const { from, stack, layout, bounds } = input; + const { size } = from; + if (from.held?.undo?.key === input.key) { + const { held } = from.held.undo; + // With no view held before, a stale entry eases the scene back to the fit. + return held === null + ? { key: "", view: from.view, height: size.height, glide: true, undo: null } + : { ...held, glide: true }; + } + const padding = fleetFitPadding(size.width); + const top = from.face.y * from.view.scale + from.view.y; + const scale = Math.min(from.view.scale, fitScale(size.width, stack.rect.width, padding)); + const view = + scale < from.view.scale + ? { scale, x: padding - stack.face.x * scale, y: top - stack.face.y * scale } + : { + scale, + x: from.view.x + (from.face.x - stack.face.x) * scale, + y: from.view.y + (from.face.y - stack.face.y) * scale, + }; + const wanted = Math.ceil(view.y + layout.height * scale + padding); + const opened = stack.rect.height > stack.face.height; + return { + key: input.key, + view, + height: Math.max( + bounds.min, + Math.min(bounds.max, opened ? Math.max(size.height, wanted) : Math.min(size.height, wanted)), + ), + glide: true, + undo: { key: from.key, held: from.held }, + }; +} diff --git a/apps/web/src/i18n/translations/de.json b/apps/web/src/i18n/translations/de.json index e28e36711e4ed..d9e63267b9ee9 100644 --- a/apps/web/src/i18n/translations/de.json +++ b/apps/web/src/i18n/translations/de.json @@ -8356,29 +8356,30 @@ "219bc3612d646a01": "Route entfernen", "b2877341429675aa": "über {route}", "537e7cf4df7a0af1": "Dieser Browser", + "d18ad97175bd2028": "Umschalt-Klick oder Umschalt-Ziehen wählt mehrere aus", "692153ec34a9a7bd": "Einen Rechner auf der Karte finden", "288ab5c45a9539a3": "Rechner finden", "c263859f8bcc7b1c": "Kein Rechner mit diesem Namen", - "1bcc5f963ef39c7b": "{count, plural, one {# Treffer. Enter springt dorthin} other {# Treffer. Enter springt zum ersten}}", + "ebe6ecf547a0636b": "{count, plural, one {# Treffer} other {# Treffer}}", "2bb44d78cb85c097": "{count, plural, one {# ausgewählt} other {# ausgewählt}}", "bcf01a26153f6425": "Auswahl aufheben", - "d18ad97175bd2028": "Umschalt-Klick oder Umschalt-Ziehen wählt mehrere aus", "d9665bd69e7fd4f4": "Mehrere verknüpfen…", "8d5882faf1e5fb96": "Von {source}", + "2b9e6257e6995ada": "So funktioniert die Karte", + "743b93767ec7ebf8": "Wähle einen Rechner aus, um ihn zu verwalten.", + "49712bceec027141": "Ziehe ein Plus auf einen Rechner, um beide zu verknüpfen.", + "aba23d86b0f4b66b": "Eine Verknüpfung reicht bis zu einem Rechner und endet dort.", "601e0c9e6a45a54f": "Karte einpassen", "feec58f6653f5673": "So liest man die Linien", - "e459bd5c53a993e2": "Route in Verwendung", "46e0a0c6ff391521": "In Verwendung", "1151e8a9fb7bdfcf": "Bereit", "a322337b6655de2a": "Nicht in Verwendung", "e31c7e76ef900ef4": "Anmeldung abgelehnt", - "235b3e270162f18b": "Verknüpfung, kräftiger bei mehr Zugriff", - "4ae743f8566a1ef1": "Zwei Verknüpfungen, eine je Richtung", - "0b7e6bab12c8ad4c": "{count, plural, one {{source} wurde nicht mit # Rechner verknüpft.} other {{source} wurde nicht mit # Rechnern verknüpft.}}", - "dfea515dc1198934": "{count, plural, one {Diese App ist nicht damit verbunden, daher braucht er einen Kopplungscode.} other {Diese App ist nicht damit verbunden, daher braucht jeder einen Kopplungscode. Verknüpfe sie einzeln.}}", + "c032d479f9bbb166": "Verknüpfung", + "d4160421f6e651bb": "Beidseitig", + "d3751f456814b2b2": "{count, plural, one {# Rechner braucht einen Kopplungscode} other {# Rechner brauchen je einen Kopplungscode}}", "e0a8e0b87dca8241": "Einen mit Code verknüpfen…", - "c326a7e66bab5da0": "Deine Umgebungen", - "86222507d918084b": "Über eine Verknüpfung erreicht", + "ad095a37f818d67e": "Verknüpfte Rechner", "afc01d2ee8048b4b": "{label}, ausgewählt", "aa34f7bc5aaf6bb0": "Karte deiner Rechner", "edb6cb27ff7f446b": "Mit den Pfeiltasten wechselst du zwischen Rechnern. Die Eingabetaste öffnet die Details eines Rechners mit seinen Routen und Verknüpfungen. Die Leertaste wählt einen Rechner aus, um mehrere auf einmal zu verknüpfen. Tab führt von einer Umgebung zu ihrer Verknüpfen-Schaltfläche. Plus und Minus zoomen, Null passt die Karte ein.", @@ -8415,39 +8416,32 @@ "5d252c8bbc3b24d0": "{status}. Verknüpfungen unbekannt", "ec2c609c028d63b4": "{label} mit einem anderen Rechner verknüpfen", "0a72d33781010657": "Damit ist keine Verknüpfung möglich", - "287a6aa91e444b27": "{count, plural, one {Diese App ist hier mit # Rechner nicht verbunden. Er braucht einen Kopplungscode} other {Diese App ist mit diesen # Rechnern nicht verbunden. Jeder braucht einen Kopplungscode}}", - "22d1944bbd4d00b4": "{count, plural, one {Mit # Rechner verknüpfen. Auswahl im nächsten Schritt} other {Mit # Rechnern verknüpfen. Auswahl im nächsten Schritt}}", - "4f10f6354f38106e": "Verknüpfung zu {target} erneuern. Kein Kopplungscode nötig", - "5a25bfd7c3a8e4b4": "Mit {target} verknüpfen. Kein Kopplungscode nötig", - "b4b893b9c210e0ba": "Verknüpfung zu {target} erneuern. Benötigt einen Kopplungscode von dort", - "052c3f87704b216d": "Mit {target} verknüpfen. Benötigt einen Kopplungscode von dort", - "e6b05c7e6ef4fef7": "Auf einem Rechner ablegen, um {source} damit zu verknüpfen", - "0ef2e932b40f0085": "{source} und {target} sind mit demselben Zugriff miteinander verknüpft, daher zeichnet die Karte beide Verknüpfungen als eine Linie. Jede ist eine eigene Verknüpfung und wird einzeln vergessen.", - "7f045c3477f783cc": "{count, plural, one {# Verknüpfung braucht Aufmerksamkeit.} other {# Verknüpfungen brauchen Aufmerksamkeit.}}", + "e93eaf3bfa0ff76b": "{count, plural, one {Mit # Rechner verknüpfen} other {Mit # Rechnern verknüpfen}}", + "96bd315e3441c52a": "Verknüpfung zu {target} erneuern", + "9f752f912897416a": "Mit {target} verknüpfen", + "b40f4891ccc7af6d": "Verknüpfung zu {target} mit Kopplungscode erneuern", + "d51a7a2bb6b8c406": "Mit {target} per Kopplungscode verknüpfen", + "f4ca5e62fb54a3a7": "Zum Verknüpfen auf einem Rechner ablegen", + "11e67016507a6daa": "Zwei Verknüpfungen, eine je Richtung.", + "352169e91766aeb4": "{count, plural, one {# braucht Aufmerksamkeit} other {# brauchen Aufmerksamkeit}}", "d53ada50331e6041": "{machines, plural, one {# Rechner} other {# Rechner}}, {links, plural, =0 {keine Verknüpfungen} one {# Verknüpfung} other {# Verknüpfungen}}", - "8cb29b21fc19a505": "Wähle einen Rechner aus, um ihn zu verwalten. Um zwei Rechner zu verknüpfen, ziehe das Plus einer Umgebung auf einen anderen Rechner oder drücke es, um einen auszuwählen. Um mehrere auf einmal zu verknüpfen, klicke Rechner mit gedrückter Umschalttaste an oder ziehe mit Umschalt einen Rahmen um sie und ziehe dann das Plus auf einen davon.", - "743b93767ec7ebf8": "Wähle einen Rechner aus, um ihn zu verwalten.", - "718e9f7ff8f48497": "Eine Verknüpfung erreicht einen Rechner und endet dort. Sie reicht nicht weiter zu den Rechnern, mit denen dieser verknüpft ist.", "3e8441af6148878f": "Läuft am {date} ab", "4daaa2288b63a801": "{count, plural, one {# eingehende Verknüpfung} other {# eingehende Verknüpfungen}}", - "5e7ed49a9fbfbcb4": "{count, plural, one {# Umgebung} other {# Umgebungen}} ohne Verknüpfungen, nicht verbunden", - "786d62572ebcebdf": "{count, plural, one {# Rechner} other {# Rechner}}, verknüpft von {source}, {access}, {reachable} erreichbar", - "7762644204376a63": "{count, plural, one {# Rechner} other {# Rechner}}, jeweils verknüpft von {sources}, {reachable} erreichbar", - "166aac696c3ec460": "Auf der Karte einklappen", - "d4e68210142d6734": "Die ersten {shown} auf der Karte zeigen", - "069d8ba658617f30": "Jeden auf der Karte zeigen", + "baf297d0add1d61b": "{count, plural, one {# Umgebung} other {# Umgebungen}}", + "ddb9150bfa8ce6f0": "Keine Verknüpfungen", + "a780bc462b60c3c0": "Einklappen", + "059c335b1da34f63": "Auf der Karte zeigen", "c7e1635b229d7249": "Diese Rechner nach Namen filtern", "52a07016be1bea99": "Nach Namen filtern", "a7061489aec79ba8": "{shown} von {count}", "eefe994332120d82": "Verknüpfen", - "9aca4025e20bef31": "Mit {connected} von {total} Umgebungen verbunden", - "7f3ea6eba251a165": "Jede Linie von hier ist eine gespeicherte Route zu einer Umgebung. Die Karte zeigt die Verknüpfungen der Umgebungen, mit denen diese App verbunden ist; eine nicht erreichbare Umgebung kann Verknüpfungen haben, die nicht eingezeichnet sind.", + "c20e4b94dddc33e7": "{connected} von {total} verbunden", + "c7a9759d8578279f": "Jede Linie von hier ist eine gespeicherte Route zu einer Umgebung.", "398cee23ca4dabec": "{count, plural, =0 {Kein bekannter Rechner ist hierher verknüpft} one {Von # Rechner verknüpft} other {Von # Rechnern verknüpft}}", - "4492f856b6539118": "{label} ist in deinem T3-Connect-Konto, aber dieser App nicht hinzugefügt. Füge es hinzu, um dich zu verbinden und seine Verknüpfungen zu sehen.", + "79e98f4a48d3df43": "Füge {label} dieser App hinzu, um dich damit zu verbinden.", "da2990354cbe0fab": "Nur über eine Verknüpfung bekannt", - "5d46435186f86deb": "Diese App ist nicht mit {label} verbunden, daher werden dessen Verknüpfungen zu anderen Rechnern nicht angezeigt.", - "b943528e12e44252": "Diese App ist gerade nicht mit {label} verbunden, daher werden dessen Verknüpfungen zu anderen Rechnern nicht angezeigt.", - "f0fa4a3c6960cb17": "Verknüpfte Umgebungen sind auf {label} aus. Schalte sie dort in den Einstellungen unter Labs ein, um von dort aus zu verknüpfen.", + "dfaeed73f86107ea": "Nicht verbunden, daher werden die Verknüpfungen nicht angezeigt.", + "2ff64d143a690a99": "Um von {label} aus zu verknüpfen, schalte dort in den Labs-Einstellungen „Verknüpfte Umgebungen“ ein.", "eb3226bab4946cfa": "Diese App darf die Verknüpfungen von {label} nicht lesen.", "59bb2a50641eb2a9": "Verknüpfungen von {label} konnten nicht geladen werden: {error}", "58cb9c075da185fb": "Verknüpfte Umgebungen werden geladen…", @@ -8797,13 +8791,13 @@ "692450a6537f52a8": "In eine Richtung verknüpft", "78ccf685018ef797": "Verknüpft", "956b5c20a1fba7c1": "Zurückverknüpfen fehlgeschlagen: {reason}", - "e82fad1c68674065": "{count, plural, one {# ausgewählter Rechner ist nur über eine Verknüpfung bekannt und braucht daher einen Kopplungscode. Verknüpfe ihn einzeln.} other {# ausgewählte Rechner sind nur über eine Verknüpfung bekannt und brauchen daher einen Kopplungscode. Verknüpfe sie einzeln.}}", + "641c3b24cbc7d86b": "{count, plural, one {# Rechner braucht einen Kopplungscode und ist daher nicht aufgeführt.} other {# Rechner brauchen einen Kopplungscode und sind daher nicht aufgeführt.}}", "87433cf138dc3e2c": "{linked, plural, one {# Rechner verknüpft.} other {# Rechner verknüpft.}}", "d044bb95248da10c": "{linked} von {total} verknüpft. Die fehlgeschlagenen bleiben ausgewählt, damit du es erneut versuchen kannst.", - "64768ee9ecd48309": "{count, plural, one {# Rechner konnte nicht zurückverknüpfen. Wähle die Verknüpfung auf der Karte aus, um es erneut zu versuchen.} other {# Rechner konnten nicht zurückverknüpfen. Wähle jede Verknüpfung auf der Karte aus, um es erneut zu versuchen.}}", + "079237b461191c9a": "{count, plural, one {# Rechner konnte nicht zurückverknüpfen.} other {# Rechner konnten nicht zurückverknüpfen.}}", "86d17c42dae16356": "Auch jeden Rechner zurück mit {source} verknüpfen", - "3fc9f71471e4c0bb": "Agenten auf jedem Rechner können dann auch auf {source} arbeiten, mit demselben Zugriff. Jede ist eine zweite Verknüpfung, erstellt auf dem jeweiligen Rechner.", - "e1c55ea1297483f3": "{count, plural, one {# ausgewählter Rechner kann nicht zurückverknüpfen oder tut es bereits: Er wird in eine Richtung verknüpft.} other {# ausgewählte Rechner können nicht zurückverknüpfen oder tun es bereits: Sie werden in eine Richtung verknüpft.}}", + "23fd4db8faa1a001": "Agenten dort können dann auch auf {source} arbeiten.", + "35d59319f62bd505": "{count, plural, one {# Rechner bleibt einseitig verknüpft.} other {# Rechner bleiben einseitig verknüpft.}}", "d2fbaffe08b6cf60": "{count, plural, one {# Rechner verknüpfen} other {# Rechner verknüpfen}}", "8e3378b526d615f4": "Mehrere verknüpfen…", "b550d04490078bda": "Agenten hier können dann auf jedem ausgewählten Rechner Threads starten, ihnen Nachrichten senden und auf sie warten. Jede Verknüpfung erscheint unter „Autorisierte Clients“ in „Freigabe & Zugriff“ des jeweiligen Rechners und kann dort widerrufen werden.", @@ -8821,7 +8815,7 @@ "64ac3d1579ca9f5b": "{source} mit {target} verknüpfen", "fb71127e5746a6bc": "Unter „Freigabe & Zugriff“ dort oder mit t3 pair", "1e3fee7084791773": "Auch {target} zurück mit {source} verknüpfen", - "a46df5abb1115c63": "Agenten auf {target} können dann auch auf {source} arbeiten, mit demselben Zugriff. Das ist eine zweite Verknüpfung, erstellt auf {target}.", + "ea34a190b0bd804c": "Agenten auf {target} können dann auch auf {source} arbeiten.", "ad5ed0ce61b966eb": "{label} vergessen? Agenten von hier arbeiten dort nicht mehr. Widerrufe „T3 Code · …“ unter „Freigabe & Zugriff“ auf {label}, um die Sitzung auch dort zu beenden.", "81c9796bf61b306a": "Verknüpfung konnte nicht vergessen werden", "130e51beb6cf5aad": "Umgebung verknüpfen", diff --git a/apps/web/src/i18n/translations/en.json b/apps/web/src/i18n/translations/en.json index 8ea70869d0423..ff208fe9d6a07 100644 --- a/apps/web/src/i18n/translations/en.json +++ b/apps/web/src/i18n/translations/en.json @@ -8364,29 +8364,30 @@ "219bc3612d646a01": "Remove route", "b2877341429675aa": "via {route}", "537e7cf4df7a0af1": "This browser", + "d18ad97175bd2028": "Shift-click or Shift-drag to select several", "692153ec34a9a7bd": "Find a machine on the map", "288ab5c45a9539a3": "Find a machine", "c263859f8bcc7b1c": "No machine by that name", - "1bcc5f963ef39c7b": "{count, plural, one {# match. Enter goes to it} other {# matches. Enter goes to the first}}", + "ebe6ecf547a0636b": "{count, plural, one {# match} other {# matches}}", "2bb44d78cb85c097": "{count, plural, one {# selected} other {# selected}}", "bcf01a26153f6425": "Clear", - "d18ad97175bd2028": "Shift-click or Shift-drag to select several", "d9665bd69e7fd4f4": "Link several…", "8d5882faf1e5fb96": "From {source}", + "2b9e6257e6995ada": "How to use the map", + "743b93767ec7ebf8": "Select a machine to manage it.", + "49712bceec027141": "Drag a plus onto a machine to link them.", + "aba23d86b0f4b66b": "A link reaches one machine and stops there.", "601e0c9e6a45a54f": "Fit the map to view", "feec58f6653f5673": "How to read the lines", - "e459bd5c53a993e2": "Route in use", "46e0a0c6ff391521": "In use", "1151e8a9fb7bdfcf": "Standby", "a322337b6655de2a": "Not in use", "e31c7e76ef900ef4": "Sign-in refused", - "235b3e270162f18b": "Link, heavier with more access", - "4ae743f8566a1ef1": "Two links, one each way", - "0b7e6bab12c8ad4c": "{count, plural, one {{source} was not linked to # machine.} other {{source} was not linked to # machines.}}", - "dfea515dc1198934": "{count, plural, one {This app is not connected to it, so it needs a pairing code.} other {This app is not connected to them, so each needs a pairing code. Link them one at a time.}}", + "c032d479f9bbb166": "Link", + "d4160421f6e651bb": "Two-way", + "d3751f456814b2b2": "{count, plural, one {# machine needs a pairing code} other {# machines each need a pairing code}}", "e0a8e0b87dca8241": "Link one with a code…", - "c326a7e66bab5da0": "Your environments", - "86222507d918084b": "Reached through a link", + "ad095a37f818d67e": "Linked machines", "afc01d2ee8048b4b": "{label}, selected", "aa34f7bc5aaf6bb0": "Map of your machines", "edb6cb27ff7f446b": "Arrow keys move between machines. Enter opens a machine's details, with its routes and links. Space selects a machine for linking several at once. Tab from an environment reaches its link button. Plus and minus zoom, zero fits the map.", @@ -8423,39 +8424,32 @@ "5d252c8bbc3b24d0": "{status}. Links unknown", "ec2c609c028d63b4": "Link {label} to another machine", "0a72d33781010657": "Cannot link to this", - "287a6aa91e444b27": "{count, plural, one {This app is not connected to # machine here. It needs a pairing code} other {This app is not connected to these # machines. Each needs a pairing code}}", - "22d1944bbd4d00b4": "{count, plural, one {Link to # machine. Pick which in the next step} other {Link to # machines. Pick which in the next step}}", - "4f10f6354f38106e": "Renew the link to {target}. No pairing code needed", - "5a25bfd7c3a8e4b4": "Link to {target}. No pairing code needed", - "b4b893b9c210e0ba": "Renew the link to {target}. Needs a pairing code from it", - "052c3f87704b216d": "Link to {target}. Needs a pairing code from it", - "e6b05c7e6ef4fef7": "Drop on a machine to link {source} to it", - "0ef2e932b40f0085": "{source} and {target} link to each other with the same access, so the map draws both links as one line. Each is its own link, and is forgotten on its own.", - "7f045c3477f783cc": "{count, plural, one {# link needs attention.} other {# links need attention.}}", + "e93eaf3bfa0ff76b": "{count, plural, one {Link to # machine} other {Link to # machines}}", + "96bd315e3441c52a": "Renew link to {target}", + "9f752f912897416a": "Link to {target}", + "b40f4891ccc7af6d": "Renew link to {target} with a pairing code", + "d51a7a2bb6b8c406": "Link to {target} with a pairing code", + "f4ca5e62fb54a3a7": "Drop on a machine to link", + "11e67016507a6daa": "Two links, one each way.", + "352169e91766aeb4": "{count, plural, one {# needs attention} other {# need attention}}", "d53ada50331e6041": "{machines, plural, one {# machine} other {# machines}}, {links, plural, =0 {no links} one {# link} other {# links}}", - "8cb29b21fc19a505": "Select a machine to manage it. To link two machines, drag the plus on an environment onto another machine, or press it to pick one. To link several at once, Shift-click machines or Shift-drag a box around them, then drag the plus onto one of them.", - "743b93767ec7ebf8": "Select a machine to manage it.", - "718e9f7ff8f48497": "A link reaches one machine and stops there. It does not pass on to the machines that one links to.", "3e8441af6148878f": "Expires {date}", "4daaa2288b63a801": "{count, plural, one {# link in} other {# links in}}", - "5e7ed49a9fbfbcb4": "{count, plural, one {# environment} other {# environments}} with no links, not connected", - "786d62572ebcebdf": "{count, plural, one {# machine} other {# machines}} linked from {source}, {access}, {reachable} reachable", - "7762644204376a63": "{count, plural, one {# machine} other {# machines}} each linked from {sources}, {reachable} reachable", - "166aac696c3ec460": "Collapse on the map", - "d4e68210142d6734": "Show the first {shown} on the map", - "069d8ba658617f30": "Show each on the map", + "baf297d0add1d61b": "{count, plural, one {# environment} other {# environments}}", + "ddb9150bfa8ce6f0": "No links", + "a780bc462b60c3c0": "Collapse", + "059c335b1da34f63": "Show on map", "c7e1635b229d7249": "Filter these machines by name", "52a07016be1bea99": "Filter by name", "a7061489aec79ba8": "{shown} of {count}", "eefe994332120d82": "Link", - "9aca4025e20bef31": "Connected to {connected} of {total} environments", - "7f3ea6eba251a165": "Each line from here is a saved route to an environment. The map shows the links of the environments this app is connected to; one it cannot reach may hold links that are not drawn.", + "c20e4b94dddc33e7": "{connected} of {total} connected", + "c7a9759d8578279f": "Each line from here is a saved route to an environment.", "398cee23ca4dabec": "{count, plural, =0 {No known machine links here} one {Linked from # machine} other {Linked from # machines}}", - "4492f856b6539118": "{label} is on your T3 Connect account but not added to this app. Add it to connect, and to see the links it holds.", + "79e98f4a48d3df43": "Add {label} to this app to connect to it.", "da2990354cbe0fab": "Known only through a link", - "5d46435186f86deb": "This app is not connected to {label}, so any links it holds to other machines are not shown.", - "b943528e12e44252": "This app is not connected to {label} right now, so any links it holds to other machines are not shown.", - "f0fa4a3c6960cb17": "Linked environments is off on {label}. Turn it on in its Settings, under Labs, to link from it.", + "dfaeed73f86107ea": "Not connected, so its links are not shown.", + "2ff64d143a690a99": "To link from {label}, turn on Linked environments in its Labs settings.", "eb3226bab4946cfa": "This app may not read the links {label} holds.", "59bb2a50641eb2a9": "Could not load the links {label} holds: {error}", "58cb9c075da185fb": "Loading linked environments…", @@ -8805,13 +8799,13 @@ "692450a6537f52a8": "Linked one way", "78ccf685018ef797": "Linked", "956b5c20a1fba7c1": "Could not link back: {reason}", - "e82fad1c68674065": "{count, plural, one {# machine you picked is known only through a link, so it needs a pairing code. Link it on its own.} other {# machines you picked are known only through a link, so they need a pairing code. Link them one at a time.}}", + "641c3b24cbc7d86b": "{count, plural, one {# machine needs a pairing code, so it is not listed.} other {# machines need a pairing code, so they are not listed.}}", "87433cf138dc3e2c": "{linked, plural, one {Linked # machine.} other {Linked # machines.}}", "d044bb95248da10c": "Linked {linked} of {total}. The ones that failed stay selected, so you can try them again.", - "64768ee9ecd48309": "{count, plural, one {# machine could not link back. Select the link on the map to try again.} other {# machines could not link back. Select each link on the map to try again.}}", + "079237b461191c9a": "{count, plural, one {# machine could not link back.} other {# machines could not link back.}}", "86d17c42dae16356": "Also link each machine back to {source}", - "3fc9f71471e4c0bb": "Agents on each machine can then work on {source} too, with the same access. Each is a second link, made on that machine.", - "e1c55ea1297483f3": "{count, plural, one {# machine you picked cannot link back, or already does: it is linked one way.} other {# machines you picked cannot link back, or already do: they are linked one way.}}", + "23fd4db8faa1a001": "Agents there can then work on {source} too.", + "35d59319f62bd505": "{count, plural, one {# machine stays one-way.} other {# machines stay one-way.}}", "d2fbaffe08b6cf60": "{count, plural, one {Link # machine} other {Link # machines}}", "8e3378b526d615f4": "Link several…", "b550d04490078bda": "Agents here can then launch, message and wait on threads on each machine you pick. Each appears under Authorized clients in that machine's Sharing & access, where it can be revoked.", @@ -8829,7 +8823,7 @@ "64ac3d1579ca9f5b": "Link {source} to {target}", "fb71127e5746a6bc": "From Sharing & access there, or t3 pair", "1e3fee7084791773": "Also link {target} back to {source}", - "a46df5abb1115c63": "Agents on {target} can then work on {source} too, with the same access. This is a second link, made on {target}.", + "ea34a190b0bd804c": "Agents on {target} can then work on {source} too.", "ad5ed0ce61b966eb": "Forget {label}? Agents here stop working there. Revoke \"T3 Code · …\" in {label}''s Sharing & access to end the session there too.", "81c9796bf61b306a": "Could not forget the link", "130e51beb6cf5aad": "Link an environment", diff --git a/apps/web/src/i18n/translations/es.json b/apps/web/src/i18n/translations/es.json index 7eb45c5e07d3b..a88e1f7bfe5be 100644 --- a/apps/web/src/i18n/translations/es.json +++ b/apps/web/src/i18n/translations/es.json @@ -8354,29 +8354,30 @@ "219bc3612d646a01": "Quitar ruta", "b2877341429675aa": "vía {route}", "537e7cf4df7a0af1": "Este navegador", + "d18ad97175bd2028": "Mayús-clic o Mayús-arrastrar para seleccionar varias", "692153ec34a9a7bd": "Buscar una máquina en el mapa", "288ab5c45a9539a3": "Buscar una máquina", "c263859f8bcc7b1c": "Ninguna máquina con ese nombre", - "1bcc5f963ef39c7b": "{count, plural, one {# coincidencia. Intro va a ella} other {# coincidencias. Intro va a la primera}}", + "ebe6ecf547a0636b": "{count, plural, one {# coincidencia} other {# coincidencias}}", "2bb44d78cb85c097": "{count, plural, one {# seleccionada} other {# seleccionadas}}", "bcf01a26153f6425": "Borrar", - "d18ad97175bd2028": "Mayús-clic o Mayús-arrastrar para seleccionar varias", "d9665bd69e7fd4f4": "Vincular varias…", "8d5882faf1e5fb96": "Desde {source}", + "2b9e6257e6995ada": "Cómo usar el mapa", + "743b93767ec7ebf8": "Selecciona una máquina para gestionarla.", + "49712bceec027141": "Arrastra un más sobre una máquina para vincularlas.", + "aba23d86b0f4b66b": "Un vínculo llega a una máquina y termina ahí.", "601e0c9e6a45a54f": "Ajustar el mapa a la vista", "feec58f6653f5673": "Cómo leer las líneas", - "e459bd5c53a993e2": "Ruta en uso", "46e0a0c6ff391521": "En uso", "1151e8a9fb7bdfcf": "En espera", "a322337b6655de2a": "Sin usar", "e31c7e76ef900ef4": "Inicio de sesión rechazado", - "235b3e270162f18b": "Vínculo, más grueso cuanto más acceso", - "4ae743f8566a1ef1": "Dos vínculos, uno en cada sentido", - "0b7e6bab12c8ad4c": "{count, plural, one {{source} no se vinculó a # máquina.} other {{source} no se vinculó a # máquinas.}}", - "dfea515dc1198934": "{count, plural, one {Esta app no está conectada a ella, así que necesita un código de emparejamiento.} other {Esta app no está conectada a ellas, así que cada una necesita un código de emparejamiento. Vincúlalas de una en una.}}", + "c032d479f9bbb166": "Vínculo", + "d4160421f6e651bb": "Bidireccional", + "d3751f456814b2b2": "{count, plural, one {# máquina necesita un código de emparejamiento} other {# máquinas necesitan cada una un código de emparejamiento}}", "e0a8e0b87dca8241": "Vincular una con un código…", - "c326a7e66bab5da0": "Tus entornos", - "86222507d918084b": "Alcanzadas mediante un vínculo", + "ad095a37f818d67e": "Máquinas vinculadas", "afc01d2ee8048b4b": "{label}, seleccionada", "aa34f7bc5aaf6bb0": "Mapa de tus máquinas", "edb6cb27ff7f446b": "Las flechas mueven entre máquinas. Intro abre los detalles de una máquina, con sus rutas y vínculos. Espacio selecciona una máquina para vincular varias a la vez. Tab desde un entorno llega a su botón de vincular. Más y menos hacen zoom, cero ajusta el mapa.", @@ -8413,39 +8414,32 @@ "5d252c8bbc3b24d0": "{status}. Vínculos desconocidos", "ec2c609c028d63b4": "Vincular {label} con otra máquina", "0a72d33781010657": "No se puede vincular con esto", - "287a6aa91e444b27": "{count, plural, one {Esta app no está conectada a # máquina aquí. Necesita un código de emparejamiento} other {Esta app no está conectada a estas # máquinas. Cada una necesita un código de emparejamiento}}", - "22d1944bbd4d00b4": "{count, plural, one {Vincular a # máquina. Elige cuál en el siguiente paso} other {Vincular a # máquinas. Elige cuáles en el siguiente paso}}", - "4f10f6354f38106e": "Renovar el vínculo con {target}. No hace falta código de emparejamiento", - "5a25bfd7c3a8e4b4": "Vincular con {target}. No hace falta código de emparejamiento", - "b4b893b9c210e0ba": "Renovar el vínculo con {target}. Necesita un código de emparejamiento de esa máquina", - "052c3f87704b216d": "Vincular con {target}. Necesita un código de emparejamiento de esa máquina", - "e6b05c7e6ef4fef7": "Suelta sobre una máquina para vincular {source} con ella", - "0ef2e932b40f0085": "{source} y {target} están vinculados entre sí con el mismo acceso, así que el mapa dibuja ambos vínculos como una sola línea. Cada uno es un vínculo propio y se olvida por separado.", - "7f045c3477f783cc": "{count, plural, one {# vínculo requiere atención.} other {# vínculos requieren atención.}}", + "e93eaf3bfa0ff76b": "{count, plural, one {Vincular a # máquina} other {Vincular a # máquinas}}", + "96bd315e3441c52a": "Renovar el vínculo con {target}", + "9f752f912897416a": "Vincular con {target}", + "b40f4891ccc7af6d": "Renovar el vínculo con {target} con un código de emparejamiento", + "d51a7a2bb6b8c406": "Vincular con {target} con un código de emparejamiento", + "f4ca5e62fb54a3a7": "Suelta sobre una máquina para vincular", + "11e67016507a6daa": "Dos vínculos, uno en cada sentido.", + "352169e91766aeb4": "{count, plural, one {# requiere atención} other {# requieren atención}}", "d53ada50331e6041": "{machines, plural, one {# máquina} other {# máquinas}}, {links, plural, =0 {sin vínculos} one {# vínculo} other {# vínculos}}", - "8cb29b21fc19a505": "Selecciona una máquina para gestionarla. Para vincular dos máquinas, arrastra el más de un entorno sobre otra máquina, o púlsalo para elegir una. Para vincular varias a la vez, haz Mayús-clic en las máquinas o arrastra un recuadro con Mayús alrededor de ellas, y luego arrastra el más sobre una de ellas.", - "743b93767ec7ebf8": "Selecciona una máquina para gestionarla.", - "718e9f7ff8f48497": "Un vínculo llega a una máquina y termina ahí. No continúa hacia las máquinas con las que esa está vinculada.", "3e8441af6148878f": "Caduca el {date}", "4daaa2288b63a801": "{count, plural, one {# vínculo entrante} other {# vínculos entrantes}}", - "5e7ed49a9fbfbcb4": "{count, plural, one {# entorno} other {# entornos}} sin vínculos, no conectados", - "786d62572ebcebdf": "{count, plural, one {# máquina vinculada} other {# máquinas vinculadas}} desde {source}, {access}, {reachable} accesibles", - "7762644204376a63": "{count, plural, one {# máquina} other {# máquinas}}, cada una vinculada desde {sources}, {reachable} accesibles", - "166aac696c3ec460": "Contraer en el mapa", - "d4e68210142d6734": "Mostrar las primeras {shown} en el mapa", - "069d8ba658617f30": "Mostrar cada una en el mapa", + "baf297d0add1d61b": "{count, plural, one {# entorno} other {# entornos}}", + "ddb9150bfa8ce6f0": "Sin vínculos", + "a780bc462b60c3c0": "Contraer", + "059c335b1da34f63": "Mostrar en el mapa", "c7e1635b229d7249": "Filtrar estas máquinas por nombre", "52a07016be1bea99": "Filtrar por nombre", "a7061489aec79ba8": "{shown} de {count}", "eefe994332120d82": "Vincular", - "9aca4025e20bef31": "Conectado a {connected} de {total} entornos", - "7f3ea6eba251a165": "Cada línea que sale de aquí es una ruta guardada hacia un entorno. El mapa muestra los vínculos de los entornos a los que esta app está conectada; uno al que no llega puede tener vínculos que no se dibujan.", + "c20e4b94dddc33e7": "{connected} de {total} conectados", + "c7a9759d8578279f": "Cada línea que sale de aquí es una ruta guardada hacia un entorno.", "398cee23ca4dabec": "{count, plural, =0 {Ninguna máquina conocida vincula aquí} one {Vinculada desde # máquina} other {Vinculada desde # máquinas}}", - "4492f856b6539118": "{label} está en tu cuenta de T3 Connect, pero no se ha añadido a esta app. Añádela para conectarte y ver los vínculos que tiene.", + "79e98f4a48d3df43": "Añade {label} a esta app para conectarte.", "da2990354cbe0fab": "Conocida solo por un vínculo", - "5d46435186f86deb": "Esta app no está conectada a {label}, así que no se muestran los vínculos que tenga con otras máquinas.", - "b943528e12e44252": "Esta app no está conectada a {label} en este momento, así que no se muestran los vínculos que tenga con otras máquinas.", - "f0fa4a3c6960cb17": "Entornos vinculados está desactivado en {label}. Actívalo en sus Ajustes, en Experimentos, para vincular desde ahí.", + "dfaeed73f86107ea": "No conectada, así que sus vínculos no se muestran.", + "2ff64d143a690a99": "Para vincular desde {label}, activa Entornos vinculados en sus ajustes de Experimentos.", "eb3226bab4946cfa": "Esta app no tiene permiso para leer los vínculos de {label}.", "59bb2a50641eb2a9": "No se pudieron cargar los vínculos de {label}: {error}", "58cb9c075da185fb": "Cargando entornos vinculados…", @@ -8795,13 +8789,13 @@ "692450a6537f52a8": "Vinculada en un sentido", "78ccf685018ef797": "Vinculada", "956b5c20a1fba7c1": "No se pudo vincular de vuelta: {reason}", - "e82fad1c68674065": "{count, plural, one {# máquina que elegiste solo se conoce a través de un vínculo, así que necesita un código de emparejamiento. Vincúlala por separado.} other {# máquinas que elegiste solo se conocen a través de un vínculo, así que necesitan un código de emparejamiento. Vincúlalas una a una.}}", + "641c3b24cbc7d86b": "{count, plural, one {# máquina necesita un código de emparejamiento, así que no aparece en la lista.} other {# máquinas necesitan un código de emparejamiento, así que no aparecen en la lista.}}", "87433cf138dc3e2c": "{linked, plural, one {Se vinculó # máquina.} other {Se vincularon # máquinas.}}", "d044bb95248da10c": "Se vincularon {linked} de {total}. Las que fallaron siguen seleccionadas para que puedas reintentarlas.", - "64768ee9ecd48309": "{count, plural, one {# máquina no pudo vincularse de vuelta. Selecciona el vínculo en el mapa para intentarlo de nuevo.} other {# máquinas no pudieron vincularse de vuelta. Selecciona cada vínculo en el mapa para intentarlo de nuevo.}}", + "079237b461191c9a": "{count, plural, one {# máquina no pudo vincularse de vuelta.} other {# máquinas no pudieron vincularse de vuelta.}}", "86d17c42dae16356": "Vincular también cada máquina de vuelta a {source}", - "3fc9f71471e4c0bb": "Los agentes de cada máquina podrán entonces trabajar también en {source}, con el mismo acceso. Cada uno es un segundo vínculo, creado en esa máquina.", - "e1c55ea1297483f3": "{count, plural, one {# máquina que elegiste no puede vincularse de vuelta, o ya lo está: se vincula en un sentido.} other {# máquinas que elegiste no pueden vincularse de vuelta, o ya lo están: se vinculan en un sentido.}}", + "23fd4db8faa1a001": "Los agentes de allí podrán trabajar también en {source}.", + "35d59319f62bd505": "{count, plural, one {# máquina queda vinculada en un sentido.} other {# máquinas quedan vinculadas en un sentido.}}", "d2fbaffe08b6cf60": "{count, plural, one {Vincular # máquina} other {Vincular # máquinas}}", "8e3378b526d615f4": "Vincular varios…", "b550d04490078bda": "Así los agentes de aquí podrán iniciar hilos en cada máquina que elijas, enviarles mensajes y esperarlos. Cada vínculo aparece en Clientes autorizados, en Compartir y acceso de esa máquina, donde se puede revocar.", @@ -8819,7 +8813,7 @@ "64ac3d1579ca9f5b": "Vincular {source} con {target}", "fb71127e5746a6bc": "Desde Compartir y acceso allí, o t3 pair", "1e3fee7084791773": "Vincular también {target} de vuelta a {source}", - "a46df5abb1115c63": "Los agentes de {target} podrán entonces trabajar también en {source}, con el mismo acceso. Es un segundo vínculo, creado en {target}.", + "ea34a190b0bd804c": "Los agentes de {target} podrán trabajar también en {source}.", "ad5ed0ce61b966eb": "¿Olvidar {label}? Los agentes de aquí dejarán de trabajar allí. Revoca \"T3 Code · …\" en Compartir y acceso de {label} para cerrar también la sesión allí.", "81c9796bf61b306a": "No se pudo olvidar el vínculo", "130e51beb6cf5aad": "Vincular un entorno", diff --git a/apps/web/src/i18n/translations/fr.json b/apps/web/src/i18n/translations/fr.json index 98f1737a3d7a7..e4a9500eb608d 100644 --- a/apps/web/src/i18n/translations/fr.json +++ b/apps/web/src/i18n/translations/fr.json @@ -8355,29 +8355,30 @@ "219bc3612d646a01": "Supprimer la route", "b2877341429675aa": "via {route}", "537e7cf4df7a0af1": "Ce navigateur", + "d18ad97175bd2028": "Maj-clic ou Maj-glisser pour en sélectionner plusieurs", "692153ec34a9a7bd": "Trouver une machine sur la carte", "288ab5c45a9539a3": "Trouver une machine", "c263859f8bcc7b1c": "Aucune machine de ce nom", - "1bcc5f963ef39c7b": "{count, plural, one {# résultat. Entrée y mène} other {# résultats. Entrée mène au premier}}", + "ebe6ecf547a0636b": "{count, plural, one {# résultat} other {# résultats}}", "2bb44d78cb85c097": "{count, plural, one {# sélectionnée} other {# sélectionnées}}", "bcf01a26153f6425": "Effacer", - "d18ad97175bd2028": "Maj-clic ou Maj-glisser pour en sélectionner plusieurs", "d9665bd69e7fd4f4": "Lier plusieurs…", "8d5882faf1e5fb96": "Depuis {source}", + "2b9e6257e6995ada": "Comment utiliser la carte", + "743b93767ec7ebf8": "Sélectionnez une machine pour la gérer.", + "49712bceec027141": "Faites glisser un plus sur une machine pour les associer.", + "aba23d86b0f4b66b": "Une association atteint une machine et s’arrête là.", "601e0c9e6a45a54f": "Ajuster la carte à la vue", "feec58f6653f5673": "Comment lire les lignes", - "e459bd5c53a993e2": "Route utilisée", "46e0a0c6ff391521": "Utilisée", "1151e8a9fb7bdfcf": "En attente", "a322337b6655de2a": "Non utilisée", "e31c7e76ef900ef4": "Connexion refusée", - "235b3e270162f18b": "Association, plus épaisse avec plus d’accès", - "4ae743f8566a1ef1": "Deux associations, une dans chaque sens", - "0b7e6bab12c8ad4c": "{count, plural, one {{source} n’a pas été associé à # machine.} other {{source} n’a pas été associé à # machines.}}", - "dfea515dc1198934": "{count, plural, one {Cette app n’y est pas connectée, il lui faut donc un code d’appairage.} other {Cette app n’y est pas connectée, il faut donc un code d’appairage pour chacune. Associez-les une par une.}}", + "c032d479f9bbb166": "Association", + "d4160421f6e651bb": "Dans les deux sens", + "d3751f456814b2b2": "{count, plural, one {# machine nécessite un code d’appairage} other {# machines nécessitent chacune un code d’appairage}}", "e0a8e0b87dca8241": "Associer une machine avec un code…", - "c326a7e66bab5da0": "Vos environnements", - "86222507d918084b": "Atteintes par une association", + "ad095a37f818d67e": "Machines associées", "afc01d2ee8048b4b": "{label}, sélectionnée", "aa34f7bc5aaf6bb0": "Carte de vos machines", "edb6cb27ff7f446b": "Les flèches déplacent entre les machines. Entrée ouvre les détails d'une machine, avec ses routes et ses liens. Espace sélectionne une machine pour en lier plusieurs à la fois. Tab depuis un environnement atteint son bouton de lien. Plus et moins zooment, zéro ajuste la carte.", @@ -8414,39 +8415,32 @@ "5d252c8bbc3b24d0": "{status}. Associations inconnues", "ec2c609c028d63b4": "Associer {label} à une autre machine", "0a72d33781010657": "Association impossible avec cet élément", - "287a6aa91e444b27": "{count, plural, one {Cette app n’est pas connectée à # machine ici. Il lui faut un code d’appairage} other {Cette app n’est pas connectée à ces # machines. Il faut un code d’appairage pour chacune}}", - "22d1944bbd4d00b4": "{count, plural, one {Lier à # machine. Choisissez laquelle à l'étape suivante} other {Lier à # machines. Choisissez lesquelles à l'étape suivante}}", - "4f10f6354f38106e": "Renouveler l’association avec {target}. Aucun code d’appairage requis", - "5a25bfd7c3a8e4b4": "Associer à {target}. Aucun code d’appairage requis", - "b4b893b9c210e0ba": "Renouveler l’association avec {target}. Nécessite un code d’appairage de cette machine", - "052c3f87704b216d": "Associer à {target}. Nécessite un code d’appairage de cette machine", - "e6b05c7e6ef4fef7": "Déposez sur une machine pour y associer {source}", - "0ef2e932b40f0085": "{source} et {target} sont associés l’un à l’autre avec le même accès, la carte dessine donc les deux associations en une seule ligne. Chacune est une association à part et s’oublie séparément.", - "7f045c3477f783cc": "{count, plural, one {# association demande votre attention.} other {# associations demandent votre attention.}}", + "e93eaf3bfa0ff76b": "{count, plural, one {Associer à # machine} other {Associer à # machines}}", + "96bd315e3441c52a": "Renouveler l’association avec {target}", + "9f752f912897416a": "Associer à {target}", + "b40f4891ccc7af6d": "Renouveler l’association avec {target} avec un code d’appairage", + "d51a7a2bb6b8c406": "Associer à {target} avec un code d’appairage", + "f4ca5e62fb54a3a7": "Déposez sur une machine pour associer", + "11e67016507a6daa": "Deux associations, une dans chaque sens.", + "352169e91766aeb4": "{count, plural, one {# demande votre attention} other {# demandent votre attention}}", "d53ada50331e6041": "{machines, plural, one {# machine} other {# machines}}, {links, plural, =0 {aucune association} one {# association} other {# associations}}", - "8cb29b21fc19a505": "Sélectionnez une machine pour la gérer. Pour lier deux machines, faites glisser le plus d'un environnement sur une autre machine, ou appuyez dessus pour en choisir une. Pour en lier plusieurs à la fois, cliquez sur les machines avec Maj ou tracez un cadre autour d'elles avec Maj, puis faites glisser le plus sur l'une d'elles.", - "743b93767ec7ebf8": "Sélectionnez une machine pour la gérer.", - "718e9f7ff8f48497": "Une association atteint une machine et s’arrête là. Elle ne se prolonge pas vers les machines auxquelles celle-ci est associée.", "3e8441af6148878f": "Expire le {date}", "4daaa2288b63a801": "{count, plural, one {# lien entrant} other {# liens entrants}}", - "5e7ed49a9fbfbcb4": "{count, plural, one {# environnement} other {# environnements}} sans lien, non connectés", - "786d62572ebcebdf": "{count, plural, one {# machine associée} other {# machines associées}} depuis {source}, {access}, {reachable} joignables", - "7762644204376a63": "{count, plural, one {# machine} other {# machines}}, chacune liée depuis {sources}, {reachable} joignables", - "166aac696c3ec460": "Replier sur la carte", - "d4e68210142d6734": "Afficher les {shown} premières sur la carte", - "069d8ba658617f30": "Afficher chacune sur la carte", + "baf297d0add1d61b": "{count, plural, one {# environnement} other {# environnements}}", + "ddb9150bfa8ce6f0": "Aucune association", + "a780bc462b60c3c0": "Replier", + "059c335b1da34f63": "Afficher sur la carte", "c7e1635b229d7249": "Filtrer ces machines par nom", "52a07016be1bea99": "Filtrer par nom", "a7061489aec79ba8": "{shown} sur {count}", "eefe994332120d82": "Associer", - "9aca4025e20bef31": "Connecté à {connected} environnements sur {total}", - "7f3ea6eba251a165": "Chaque ligne partant d’ici est une route enregistrée vers un environnement. La carte montre les associations des environnements auxquels cette app est connectée ; un environnement injoignable peut avoir des associations qui ne sont pas dessinées.", + "c20e4b94dddc33e7": "{connected} sur {total} connectés", + "c7a9759d8578279f": "Chaque ligne partant d’ici est une route enregistrée vers un environnement.", "398cee23ca4dabec": "{count, plural, =0 {Aucune machine connue n’est associée ici} one {Associé depuis # machine} other {Associé depuis # machines}}", - "4492f856b6539118": "{label} est sur votre compte T3 Connect mais n’est pas ajoutée à cette app. Ajoutez-la pour vous connecter et voir ses associations.", + "79e98f4a48d3df43": "Ajoutez {label} à cette app pour vous y connecter.", "da2990354cbe0fab": "Connue uniquement par une association", - "5d46435186f86deb": "Cette app n’est pas connectée à {label} ; ses éventuelles associations vers d’autres machines ne sont donc pas affichées.", - "b943528e12e44252": "Cette app n’est pas connectée à {label} pour le moment ; ses éventuelles associations vers d’autres machines ne sont donc pas affichées.", - "f0fa4a3c6960cb17": "Environnements associés est désactivé sur {label}. Activez-le dans ses Réglages, sous Labs, pour associer depuis cette machine.", + "dfaeed73f86107ea": "Non connectée, ses associations ne sont donc pas affichées.", + "2ff64d143a690a99": "Pour associer depuis {label}, activez Environnements associés dans ses réglages Labs.", "eb3226bab4946cfa": "Cette app n’est pas autorisée à lire les associations de {label}.", "59bb2a50641eb2a9": "Impossible de charger les associations de {label} : {error}", "58cb9c075da185fb": "Chargement des environnements associés…", @@ -8797,13 +8791,13 @@ "692450a6537f52a8": "Associée dans un seul sens", "78ccf685018ef797": "Associée", "956b5c20a1fba7c1": "Impossible d’associer en retour : {reason}", - "e82fad1c68674065": "{count, plural, one {# machine choisie n'est connue que par un lien : il lui faut un code d'appairage. Liez-la séparément.} other {# machines choisies ne sont connues que par un lien : il leur faut un code d'appairage. Liez-les une par une.}}", + "641c3b24cbc7d86b": "{count, plural, one {# machine nécessite un code d’appairage, elle n’est donc pas listée.} other {# machines nécessitent un code d’appairage, elles ne sont donc pas listées.}}", "87433cf138dc3e2c": "{linked, plural, one {# machine associée.} other {# machines associées.}}", "d044bb95248da10c": "{linked} sur {total} associées. Celles qui ont échoué restent sélectionnées pour que vous puissiez réessayer.", - "64768ee9ecd48309": "{count, plural, one {# machine n’a pas pu s’associer en retour. Sélectionnez l’association sur la carte pour réessayer.} other {# machines n’ont pas pu s’associer en retour. Sélectionnez chaque association sur la carte pour réessayer.}}", + "079237b461191c9a": "{count, plural, one {# machine n’a pas pu s’associer en retour.} other {# machines n’ont pas pu s’associer en retour.}}", "86d17c42dae16356": "Associer aussi chaque machine en retour à {source}", - "3fc9f71471e4c0bb": "Les agents de chaque machine pourront alors aussi travailler sur {source}, avec le même accès. Chacune est une seconde association, créée sur cette machine.", - "e1c55ea1297483f3": "{count, plural, one {# machine choisie ne peut pas s’associer en retour, ou l’est déjà : elle est associée dans un seul sens.} other {# machines choisies ne peuvent pas s’associer en retour, ou le sont déjà : elles sont associées dans un seul sens.}}", + "23fd4db8faa1a001": "Les agents de ces machines pourront alors aussi travailler sur {source}.", + "35d59319f62bd505": "{count, plural, one {# machine reste associée dans un seul sens.} other {# machines restent associées dans un seul sens.}}", "d2fbaffe08b6cf60": "{count, plural, one {Associer # machine} other {Associer # machines}}", "8e3378b526d615f4": "Associer plusieurs…", "b550d04490078bda": "Les agents d’ici pourront alors lancer des fils sur chaque machine choisie, leur envoyer des messages et les attendre. Chaque association apparaît sous Clients autorisés dans Partage et accès de la machine concernée, où elle peut être révoquée.", @@ -8821,7 +8815,7 @@ "64ac3d1579ca9f5b": "Associer {source} à {target}", "fb71127e5746a6bc": "Depuis Partage et accès sur cette machine, ou t3 pair", "1e3fee7084791773": "Associer aussi {target} en retour à {source}", - "a46df5abb1115c63": "Les agents de {target} pourront alors aussi travailler sur {source}, avec le même accès. C’est une seconde association, créée sur {target}.", + "ea34a190b0bd804c": "Les agents de {target} pourront alors aussi travailler sur {source}.", "ad5ed0ce61b966eb": "Oublier {label} ? Les agents d’ici cessent d’y travailler. Révoquez « T3 Code · … » dans Partage et accès sur {label} pour y fermer aussi la session.", "81c9796bf61b306a": "Impossible d’oublier l’association", "130e51beb6cf5aad": "Associer un environnement", diff --git a/apps/web/src/i18n/translations/ja.json b/apps/web/src/i18n/translations/ja.json index f862b2fbf6df4..b8320b29e5f0e 100644 --- a/apps/web/src/i18n/translations/ja.json +++ b/apps/web/src/i18n/translations/ja.json @@ -8312,29 +8312,30 @@ "219bc3612d646a01": "ルートを削除", "b2877341429675aa": "{route} 経由", "537e7cf4df7a0af1": "このブラウザ", + "d18ad97175bd2028": "Shift+クリックまたはShift+ドラッグで複数選択", "692153ec34a9a7bd": "マップでマシンを検索", "288ab5c45a9539a3": "マシンを検索", "c263859f8bcc7b1c": "その名前のマシンはありません", - "1bcc5f963ef39c7b": "{count, plural, other {#件一致。Enterで最初の項目へ移動}}", + "ebe6ecf547a0636b": "{count, plural, other {#件一致}}", "2bb44d78cb85c097": "{count, plural, other {#件選択中}}", "bcf01a26153f6425": "クリア", - "d18ad97175bd2028": "Shift+クリックまたはShift+ドラッグで複数選択", "d9665bd69e7fd4f4": "複数をリンク…", "8d5882faf1e5fb96": "{source} から", + "2b9e6257e6995ada": "マップの使い方", + "743b93767ec7ebf8": "マシンを選択すると管理できます。", + "49712bceec027141": "プラスをマシンにドラッグするとリンクできます。", + "aba23d86b0f4b66b": "リンクは 1 台のマシンに届き、そこで止まります。", "601e0c9e6a45a54f": "マップ全体を表示", "feec58f6653f5673": "線の見方", - "e459bd5c53a993e2": "使用中のルート", "46e0a0c6ff391521": "使用中", "1151e8a9fb7bdfcf": "待機中", "a322337b6655de2a": "未使用", "e31c7e76ef900ef4": "サインインが拒否されました", - "235b3e270162f18b": "リンク(アクセスが広いほど太い)", - "4ae743f8566a1ef1": "リンク 2 本(各方向に 1 本)", - "0b7e6bab12c8ad4c": "{count, plural, other {{source} は # 台のマシンにリンクされませんでした。}}", - "dfea515dc1198934": "{count, plural, other {このアプリはこれらのマシンに接続していないため、それぞれにペアリングコードが必要です。1 台ずつリンクしてください。}}", + "c032d479f9bbb166": "リンク", + "d4160421f6e651bb": "双方向", + "d3751f456814b2b2": "{count, plural, other {# 台のマシンそれぞれにペアリングコードが必要}}", "e0a8e0b87dca8241": "コードで 1 台をリンク…", - "c326a7e66bab5da0": "あなたの環境", - "86222507d918084b": "リンク経由で到達", + "ad095a37f818d67e": "リンク先のマシン", "afc01d2ee8048b4b": "{label}、選択中", "aa34f7bc5aaf6bb0": "マシンのマップ", "edb6cb27ff7f446b": "矢印キーでマシン間を移動します。Enterでマシンの詳細(ルートとリンク)を開きます。Spaceで複数を一度にリンクするためにマシンを選択します。環境からTabでリンクボタンに移動します。プラスとマイナスでズーム、ゼロでマップ全体を表示します。", @@ -8371,39 +8372,32 @@ "5d252c8bbc3b24d0": "{status}。リンクは不明", "ec2c609c028d63b4": "{label} を別のマシンにリンク", "0a72d33781010657": "これにはリンクできません", - "287a6aa91e444b27": "{count, plural, other {このアプリはこれら # 台のマシンに接続していません。それぞれにペアリングコードが必要です}}", - "22d1944bbd4d00b4": "{count, plural, other {#台のマシンにリンク。次のステップで選択します}}", - "4f10f6354f38106e": "{target} へのリンクを更新。ペアリングコードは不要", - "5a25bfd7c3a8e4b4": "{target} にリンク。ペアリングコードは不要", - "b4b893b9c210e0ba": "{target} へのリンクを更新。そのマシンのペアリングコードが必要", - "052c3f87704b216d": "{target} にリンク。そのマシンのペアリングコードが必要", - "e6b05c7e6ef4fef7": "マシンにドロップして {source} をリンク", - "0ef2e932b40f0085": "{source} と {target} は同じアクセスで互いにリンクしているため、マップでは 2 本のリンクを 1 本の線で描きます。それぞれ独立したリンクで、個別に削除できます。", - "7f045c3477f783cc": "{count, plural, other {# 件のリンクに対応が必要です。}}", + "e93eaf3bfa0ff76b": "{count, plural, other {#台のマシンにリンク}}", + "96bd315e3441c52a": "{target} へのリンクを更新", + "9f752f912897416a": "{target} にリンク", + "b40f4891ccc7af6d": "ペアリングコードで {target} へのリンクを更新", + "d51a7a2bb6b8c406": "ペアリングコードで {target} にリンク", + "f4ca5e62fb54a3a7": "マシンにドロップしてリンク", + "11e67016507a6daa": "リンク 2 本(各方向に 1 本)。", + "352169e91766aeb4": "{count, plural, other {# 件に対応が必要}}", "d53ada50331e6041": "{machines, plural, other {マシン # 台}}、{links, plural, =0 {リンクなし} other {リンク # 件}}", - "8cb29b21fc19a505": "マシンを選択して管理します。2台のマシンをリンクするには、環境のプラスを別のマシンにドラッグするか、押して選択します。複数を一度にリンクするには、マシンをShift+クリックするかShift+ドラッグで囲み、プラスをそのいずれかにドラッグします。", - "743b93767ec7ebf8": "マシンを選択すると管理できます。", - "718e9f7ff8f48497": "リンクは 1 台のマシンに届き、そこで止まります。そのマシンがリンクしている先のマシンには及びません。", "3e8441af6148878f": "{date} に期限切れ", "4daaa2288b63a801": "{count, plural, other {受信リンク #件}}", - "5e7ed49a9fbfbcb4": "{count, plural, other {#個の環境}}、リンクなし、未接続", - "786d62572ebcebdf": "{count, plural, other {{source} からリンクされた # 台のマシン}}、{access}、{reachable} 台が到達可能", - "7762644204376a63": "{count, plural, other {#台のマシン}}、それぞれ {sources} からリンク、{reachable} 台に到達可能", - "166aac696c3ec460": "マップ上で折りたたむ", - "d4e68210142d6734": "最初の {shown} 台をマップに表示", - "069d8ba658617f30": "それぞれをマップに表示", + "baf297d0add1d61b": "{count, plural, other {#個の環境}}", + "ddb9150bfa8ce6f0": "リンクなし", + "a780bc462b60c3c0": "折りたたむ", + "059c335b1da34f63": "マップに表示", "c7e1635b229d7249": "これらのマシンを名前で絞り込む", "52a07016be1bea99": "名前で絞り込む", "a7061489aec79ba8": "{count} 件中 {shown} 件", "eefe994332120d82": "リンク", - "9aca4025e20bef31": "{total} 個中 {connected} 個の環境に接続済み", - "7f3ea6eba251a165": "ここから出る線はそれぞれ、環境への保存済みルートです。マップには、このアプリが接続している環境のリンクが表示されます。到達できない環境には、描かれていないリンクがあるかもしれません。", + "c20e4b94dddc33e7": "{total} 件中 {connected} 件に接続", + "c7a9759d8578279f": "ここから出る線はそれぞれ、環境への保存済みルートです。", "398cee23ca4dabec": "{count, plural, =0 {ここにリンクしている既知のマシンはありません} other {# 台のマシンからリンク}}", - "4492f856b6539118": "{label} は T3 Connect アカウントにありますが、このアプリには追加されていません。追加すると接続でき、そのリンクも表示されます。", + "79e98f4a48d3df43": "接続するには {label} をこのアプリに追加してください。", "da2990354cbe0fab": "リンク経由でのみ把握", - "5d46435186f86deb": "このアプリは {label} に接続していないため、{label} が他のマシンに持つリンクは表示されません。", - "b943528e12e44252": "このアプリは現在 {label} に接続していないため、{label} が他のマシンに持つリンクは表示されません。", - "f0fa4a3c6960cb17": "{label} ではリンクされた環境がオフです。{label} の設定の「試験的機能」でオンにすると、そこからリンクできます。", + "dfaeed73f86107ea": "未接続のため、リンクは表示されません。", + "2ff64d143a690a99": "{label} からリンクするには、{label} の「試験的機能」設定でリンクされた環境をオンにしてください。", "eb3226bab4946cfa": "このアプリには {label} のリンクを読み取る権限がありません。", "59bb2a50641eb2a9": "{label} のリンクを読み込めませんでした: {error}", "58cb9c075da185fb": "リンクされた環境を読み込んでいます…", @@ -8753,13 +8747,13 @@ "692450a6537f52a8": "片方向のみリンク済み", "78ccf685018ef797": "リンク済み", "956b5c20a1fba7c1": "逆方向のリンクに失敗しました: {reason}", - "e82fad1c68674065": "{count, plural, other {選択した#台のマシンはリンク経由でのみ認識されているため、ペアリングコードが必要です。1台ずつリンクしてください。}}", + "641c3b24cbc7d86b": "{count, plural, other {# 台のマシンはペアリングコードが必要なため、一覧に表示されません。}}", "87433cf138dc3e2c": "{linked, plural, other {# 台のマシンをリンクしました。}}", "d044bb95248da10c": "{total} 台中 {linked} 台をリンクしました。失敗したマシンは選択されたままなので、もう一度試せます。", - "64768ee9ecd48309": "{count, plural, other {# 台のマシンは逆方向にリンクできませんでした。再試行するには、マップで各リンクを選択してください。}}", + "079237b461191c9a": "{count, plural, other {# 台のマシンは逆方向にリンクできませんでした。}}", "86d17c42dae16356": "各マシンから {source} へも逆方向にリンクする", - "3fc9f71471e4c0bb": "各マシンのエージェントも、同じアクセスで {source} で作業できるようになります。それぞれ、そのマシン側で作成される 2 本目のリンクです。", - "e1c55ea1297483f3": "{count, plural, other {選択した # 台のマシンは逆方向にリンクできないか、すでにリンク済みのため、片方向のみリンクされます。}}", + "23fd4db8faa1a001": "そのマシンのエージェントも {source} で作業できるようになります。", + "35d59319f62bd505": "{count, plural, other {# 台のマシンは片方向のままです。}}", "d2fbaffe08b6cf60": "{count, plural, other {# 台のマシンをリンク}}", "8e3378b526d615f4": "複数をリンク…", "b550d04490078bda": "これで、ここのエージェントが選択した各マシンでスレッドを起動し、メッセージを送り、完了を待てるようになります。各リンクはそのマシンの「共有とアクセス」の「承認済みクライアント」に表示され、そこで取り消せます。", @@ -8777,7 +8771,7 @@ "64ac3d1579ca9f5b": "{source} を {target} にリンク", "fb71127e5746a6bc": "リンク先の「共有とアクセス」、または t3 pair から", "1e3fee7084791773": "{target} から {source} へも逆方向にリンクする", - "a46df5abb1115c63": "{target} のエージェントも、同じアクセスで {source} で作業できるようになります。これは {target} 側で作成される 2 本目のリンクです。", + "ea34a190b0bd804c": "{target} のエージェントも {source} で作業できるようになります。", "ad5ed0ce61b966eb": "{label} を削除しますか?ここのエージェントはそこで作業できなくなります。そこでのセッションも終了するには、{label} の「共有とアクセス」で \"T3 Code · …\" を取り消してください。", "81c9796bf61b306a": "リンクを削除できませんでした", "130e51beb6cf5aad": "環境をリンク", diff --git a/apps/web/src/i18n/translations/ko.json b/apps/web/src/i18n/translations/ko.json index 0b5a265179465..6ec0c54593310 100644 --- a/apps/web/src/i18n/translations/ko.json +++ b/apps/web/src/i18n/translations/ko.json @@ -8315,29 +8315,30 @@ "219bc3612d646a01": "경로 제거", "b2877341429675aa": "{route} 경유", "537e7cf4df7a0af1": "이 브라우저", + "d18ad97175bd2028": "Shift+클릭 또는 Shift+드래그로 여러 개 선택", "692153ec34a9a7bd": "지도에서 머신 찾기", "288ab5c45a9539a3": "머신 찾기", "c263859f8bcc7b1c": "그 이름의 머신이 없습니다", - "1bcc5f963ef39c7b": "{count, plural, other {#개 일치. Enter로 첫 항목으로 이동}}", + "ebe6ecf547a0636b": "{count, plural, other {#개 일치}}", "2bb44d78cb85c097": "{count, plural, other {#개 선택됨}}", "bcf01a26153f6425": "지우기", - "d18ad97175bd2028": "Shift+클릭 또는 Shift+드래그로 여러 개 선택", "d9665bd69e7fd4f4": "여러 개 연결…", "8d5882faf1e5fb96": "{source}에서", + "2b9e6257e6995ada": "지도 사용법", + "743b93767ec7ebf8": "머신을 선택해 관리하세요.", + "49712bceec027141": "더하기를 머신으로 끌어다 놓으면 연결됩니다.", + "aba23d86b0f4b66b": "링크는 머신 한 대에 닿고 거기서 끝납니다.", "601e0c9e6a45a54f": "지도를 화면에 맞추기", "feec58f6653f5673": "선 읽는 법", - "e459bd5c53a993e2": "사용 중인 경로", "46e0a0c6ff391521": "사용 중", "1151e8a9fb7bdfcf": "대기", "a322337b6655de2a": "사용 안 함", "e31c7e76ef900ef4": "로그인 거부됨", - "235b3e270162f18b": "링크, 권한이 클수록 굵게", - "4ae743f8566a1ef1": "링크 2개, 방향마다 하나", - "0b7e6bab12c8ad4c": "{count, plural, other {{source}이(가) 머신 #대에 연결되지 않았습니다.}}", - "dfea515dc1198934": "{count, plural, other {이 앱이 해당 머신에 연결되어 있지 않아 각각 페어링 코드가 필요합니다. 한 대씩 연결하세요.}}", + "c032d479f9bbb166": "링크", + "d4160421f6e651bb": "양방향", + "d3751f456814b2b2": "{count, plural, other {머신 #대에 각각 페어링 코드 필요}}", "e0a8e0b87dca8241": "코드로 한 대 연결…", - "c326a7e66bab5da0": "내 환경", - "86222507d918084b": "링크를 통해 도달", + "ad095a37f818d67e": "연결된 머신", "afc01d2ee8048b4b": "{label}, 선택됨", "aa34f7bc5aaf6bb0": "내 머신 지도", "edb6cb27ff7f446b": "화살표 키로 머신 사이를 이동합니다. Enter는 머신의 세부 정보(경로와 연결)를 엽니다. Space는 여러 개를 한 번에 연결할 머신을 선택합니다. 환경에서 Tab을 누르면 연결 버튼으로 이동합니다. 더하기와 빼기로 확대/축소하고 0으로 지도를 맞춥니다.", @@ -8374,39 +8375,32 @@ "5d252c8bbc3b24d0": "{status}. 링크 알 수 없음", "ec2c609c028d63b4": "{label}을(를) 다른 머신에 연결", "0a72d33781010657": "여기에는 연결할 수 없음", - "287a6aa91e444b27": "{count, plural, other {이 앱이 이 머신 #대에 연결되어 있지 않습니다. 각각 페어링 코드가 필요합니다}}", - "22d1944bbd4d00b4": "{count, plural, other {머신 #개에 연결. 다음 단계에서 선택합니다}}", - "4f10f6354f38106e": "{target} 링크 갱신. 페어링 코드 필요 없음", - "5a25bfd7c3a8e4b4": "{target}에 연결. 페어링 코드 필요 없음", - "b4b893b9c210e0ba": "{target} 링크 갱신. 해당 머신의 페어링 코드 필요", - "052c3f87704b216d": "{target}에 연결. 해당 머신의 페어링 코드 필요", - "e6b05c7e6ef4fef7": "머신에 놓아 {source}을(를) 연결", - "0ef2e932b40f0085": "{source}와(과) {target}은(는) 같은 권한으로 서로 연결되어 있어 지도에서 두 링크를 한 줄로 그립니다. 각각 별개의 링크이며 따로 삭제됩니다.", - "7f045c3477f783cc": "{count, plural, other {링크 #개에 조치가 필요합니다.}}", + "e93eaf3bfa0ff76b": "{count, plural, other {머신 #대에 연결}}", + "96bd315e3441c52a": "{target} 링크 갱신", + "9f752f912897416a": "{target}에 연결", + "b40f4891ccc7af6d": "페어링 코드로 {target} 링크 갱신", + "d51a7a2bb6b8c406": "페어링 코드로 {target}에 연결", + "f4ca5e62fb54a3a7": "머신에 놓아 연결", + "11e67016507a6daa": "링크 2개, 방향마다 하나.", + "352169e91766aeb4": "{count, plural, other {#개에 조치 필요}}", "d53ada50331e6041": "{machines, plural, other {머신 #대}}, {links, plural, =0 {링크 없음} other {링크 #개}}", - "8cb29b21fc19a505": "머신을 선택해 관리하세요. 두 머신을 연결하려면 환경의 더하기를 다른 머신으로 드래그하거나 눌러서 선택하세요. 여러 개를 한 번에 연결하려면 머신을 Shift+클릭하거나 Shift+드래그로 상자를 그린 다음, 더하기를 그중 하나로 드래그하세요.", - "743b93767ec7ebf8": "머신을 선택해 관리하세요.", - "718e9f7ff8f48497": "링크는 머신 한 대까지만 닿습니다. 그 머신이 링크한 다른 머신으로는 이어지지 않습니다.", "3e8441af6148878f": "{date}에 만료", "4daaa2288b63a801": "{count, plural, other {들어오는 연결 #개}}", - "5e7ed49a9fbfbcb4": "{count, plural, other {환경 #개}}, 연결 없음, 연결되지 않음", - "786d62572ebcebdf": "{count, plural, other {{source}에서 연결된 머신 #대}}, {access}, {reachable}대 연결 가능", - "7762644204376a63": "{count, plural, other {머신 #개}}, 각각 {sources}에서 연결됨, {reachable}개 연결 가능", - "166aac696c3ec460": "지도에서 접기", - "d4e68210142d6734": "처음 {shown}개를 지도에 표시", - "069d8ba658617f30": "각각 지도에 표시", + "baf297d0add1d61b": "{count, plural, other {환경 #개}}", + "ddb9150bfa8ce6f0": "링크 없음", + "a780bc462b60c3c0": "접기", + "059c335b1da34f63": "지도에 표시", "c7e1635b229d7249": "이 머신들을 이름으로 필터링", "52a07016be1bea99": "이름으로 필터링", "a7061489aec79ba8": "{count}개 중 {shown}개", "eefe994332120d82": "연결", - "9aca4025e20bef31": "환경 {total}개 중 {connected}개에 연결됨", - "7f3ea6eba251a165": "여기서 나가는 각 선은 환경으로 가는 저장된 경로입니다. 지도에는 이 앱이 연결된 환경의 링크가 표시되며, 도달할 수 없는 환경에는 그려지지 않은 링크가 있을 수 있습니다.", + "c20e4b94dddc33e7": "{total}개 중 {connected}개 연결됨", + "c7a9759d8578279f": "여기서 나가는 각 선은 환경으로 가는 저장된 경로입니다.", "398cee23ca4dabec": "{count, plural, =0 {여기로 링크한 알려진 머신 없음} other {머신 #대에서 링크됨}}", - "4492f856b6539118": "{label}은(는) T3 Connect 계정에 있지만 이 앱에 추가되지 않았습니다. 추가하면 연결하고 보유한 링크를 볼 수 있습니다.", + "79e98f4a48d3df43": "연결하려면 {label}을(를) 이 앱에 추가하세요.", "da2990354cbe0fab": "링크를 통해서만 알려짐", - "5d46435186f86deb": "이 앱은 {label}에 연결되어 있지 않아, {label}이(가) 다른 머신에 가진 링크는 표시되지 않습니다.", - "b943528e12e44252": "이 앱은 지금 {label}에 연결되어 있지 않아, {label}이(가) 다른 머신에 가진 링크는 표시되지 않습니다.", - "f0fa4a3c6960cb17": "{label}에서 연결된 환경이 꺼져 있습니다. 거기서 링크하려면 해당 설정의 실험 기능에서 켜세요.", + "dfaeed73f86107ea": "연결되지 않아 링크가 표시되지 않습니다.", + "2ff64d143a690a99": "{label}에서 링크하려면 해당 머신의 실험 기능 설정에서 연결된 환경을 켜세요.", "eb3226bab4946cfa": "이 앱은 {label}의 링크를 읽을 권한이 없습니다.", "59bb2a50641eb2a9": "{label}의 링크를 불러올 수 없습니다: {error}", "58cb9c075da185fb": "연결된 환경 불러오는 중…", @@ -8756,13 +8750,13 @@ "692450a6537f52a8": "한 방향으로만 연결됨", "78ccf685018ef797": "연결됨", "956b5c20a1fba7c1": "반대 방향으로 연결할 수 없습니다: {reason}", - "e82fad1c68674065": "{count, plural, other {선택한 머신 #개는 연결을 통해서만 알려져 있어 페어링 코드가 필요합니다. 하나씩 연결하세요.}}", + "641c3b24cbc7d86b": "{count, plural, other {머신 #대는 페어링 코드가 필요해 목록에 없습니다.}}", "87433cf138dc3e2c": "{linked, plural, other {머신 #대를 연결했습니다.}}", "d044bb95248da10c": "{total}대 중 {linked}대를 연결했습니다. 실패한 머신은 선택된 상태로 남아 있어 다시 시도할 수 있습니다.", - "64768ee9ecd48309": "{count, plural, other {머신 #대가 반대 방향으로 연결되지 않았습니다. 다시 시도하려면 지도에서 각 링크를 선택하세요.}}", + "079237b461191c9a": "{count, plural, other {머신 #대가 반대 방향으로 연결되지 않았습니다.}}", "86d17c42dae16356": "각 머신에서 {source}(으)로도 반대 방향 연결", - "3fc9f71471e4c0bb": "그러면 각 머신의 에이전트도 같은 권한으로 {source}에서 작업할 수 있습니다. 각각 해당 머신에서 만들어지는 두 번째 링크입니다.", - "e1c55ea1297483f3": "{count, plural, other {선택한 머신 #대는 반대 방향으로 연결할 수 없거나 이미 연결되어 있어 한 방향으로만 연결됩니다.}}", + "23fd4db8faa1a001": "그러면 그 머신의 에이전트도 {source}에서 작업할 수 있습니다.", + "35d59319f62bd505": "{count, plural, other {머신 #대는 한 방향으로만 유지됩니다.}}", "d2fbaffe08b6cf60": "{count, plural, other {머신 #대 연결}}", "8e3378b526d615f4": "여러 개 연결…", "b550d04490078bda": "그러면 이곳의 에이전트가 선택한 각 머신에서 스레드를 시작하고, 메시지를 보내고, 기다릴 수 있습니다. 각 연결은 해당 머신의 공유 및 액세스에서 승인된 클라이언트에 표시되며 그곳에서 취소할 수 있습니다.", @@ -8780,7 +8774,7 @@ "64ac3d1579ca9f5b": "{source}을(를) {target}에 연결", "fb71127e5746a6bc": "그곳의 공유 및 액세스 또는 t3 pair에서", "1e3fee7084791773": "{target}에서 {source}(으)로도 반대 방향 연결", - "a46df5abb1115c63": "그러면 {target}의 에이전트도 같은 권한으로 {source}에서 작업할 수 있습니다. 이는 {target}에서 만들어지는 두 번째 링크입니다.", + "ea34a190b0bd804c": "그러면 {target}의 에이전트도 {source}에서 작업할 수 있습니다.", "ad5ed0ce61b966eb": "{label}을(를) 삭제할까요? 이곳의 에이전트가 그곳에서 더 이상 작업하지 않습니다. 그곳의 세션도 끝내려면 {label}의 공유 및 액세스에서 \"T3 Code · …\"를 취소하세요.", "81c9796bf61b306a": "링크를 삭제할 수 없습니다", "130e51beb6cf5aad": "환경 연결", diff --git a/apps/web/src/i18n/translations/pt-BR.json b/apps/web/src/i18n/translations/pt-BR.json index f9ba8bf1443c4..c982b823f7f51 100644 --- a/apps/web/src/i18n/translations/pt-BR.json +++ b/apps/web/src/i18n/translations/pt-BR.json @@ -8354,29 +8354,30 @@ "219bc3612d646a01": "Remover rota", "b2877341429675aa": "via {route}", "537e7cf4df7a0af1": "Este navegador", + "d18ad97175bd2028": "Shift-clique ou Shift-arraste para selecionar várias", "692153ec34a9a7bd": "Encontrar uma máquina no mapa", "288ab5c45a9539a3": "Encontrar uma máquina", "c263859f8bcc7b1c": "Nenhuma máquina com esse nome", - "1bcc5f963ef39c7b": "{count, plural, one {# resultado. Enter vai até ele} other {# resultados. Enter vai ao primeiro}}", + "ebe6ecf547a0636b": "{count, plural, one {# resultado} other {# resultados}}", "2bb44d78cb85c097": "{count, plural, one {# selecionada} other {# selecionadas}}", "bcf01a26153f6425": "Limpar", - "d18ad97175bd2028": "Shift-clique ou Shift-arraste para selecionar várias", "d9665bd69e7fd4f4": "Vincular várias…", "8d5882faf1e5fb96": "A partir de {source}", + "2b9e6257e6995ada": "Como usar o mapa", + "743b93767ec7ebf8": "Selecione uma máquina para gerenciá-la.", + "49712bceec027141": "Arraste um mais sobre uma máquina para vinculá-las.", + "aba23d86b0f4b66b": "Um vínculo chega a uma máquina e termina ali.", "601e0c9e6a45a54f": "Ajustar o mapa à tela", "feec58f6653f5673": "Como ler as linhas", - "e459bd5c53a993e2": "Rota em uso", "46e0a0c6ff391521": "Em uso", "1151e8a9fb7bdfcf": "Em espera", "a322337b6655de2a": "Sem uso", "e31c7e76ef900ef4": "Login recusado", - "235b3e270162f18b": "Vínculo, mais grosso com mais acesso", - "4ae743f8566a1ef1": "Dois vínculos, um em cada sentido", - "0b7e6bab12c8ad4c": "{count, plural, one {{source} não foi vinculado a # máquina.} other {{source} não foi vinculado a # máquinas.}}", - "dfea515dc1198934": "{count, plural, one {Este app não está conectado a ela, então ela precisa de um código de pareamento.} other {Este app não está conectado a elas, então cada uma precisa de um código de pareamento. Vincule uma de cada vez.}}", + "c032d479f9bbb166": "Vínculo", + "d4160421f6e651bb": "Nos dois sentidos", + "d3751f456814b2b2": "{count, plural, one {# máquina precisa de um código de pareamento} other {# máquinas precisam cada uma de um código de pareamento}}", "e0a8e0b87dca8241": "Vincular uma com um código…", - "c326a7e66bab5da0": "Seus ambientes", - "86222507d918084b": "Alcançadas por um vínculo", + "ad095a37f818d67e": "Máquinas vinculadas", "afc01d2ee8048b4b": "{label}, selecionada", "aa34f7bc5aaf6bb0": "Mapa das suas máquinas", "edb6cb27ff7f446b": "As setas movem entre máquinas. Enter abre os detalhes de uma máquina, com suas rotas e vínculos. Espaço seleciona uma máquina para vincular várias de uma vez. Tab a partir de um ambiente chega ao botão de vincular. Mais e menos dão zoom, zero ajusta o mapa.", @@ -8413,39 +8414,32 @@ "5d252c8bbc3b24d0": "{status}. Vínculos desconhecidos", "ec2c609c028d63b4": "Vincular {label} a outra máquina", "0a72d33781010657": "Não é possível vincular a isto", - "287a6aa91e444b27": "{count, plural, one {Este app não está conectado a # máquina aqui. Ela precisa de um código de pareamento} other {Este app não está conectado a estas # máquinas. Cada uma precisa de um código de pareamento}}", - "22d1944bbd4d00b4": "{count, plural, one {Vincular a # máquina. Escolha qual na próxima etapa} other {Vincular a # máquinas. Escolha quais na próxima etapa}}", - "4f10f6354f38106e": "Renovar o vínculo com {target}. Sem código de pareamento", - "5a25bfd7c3a8e4b4": "Vincular a {target}. Sem código de pareamento", - "b4b893b9c210e0ba": "Renovar o vínculo com {target}. Precisa de um código de pareamento dessa máquina", - "052c3f87704b216d": "Vincular a {target}. Precisa de um código de pareamento dessa máquina", - "e6b05c7e6ef4fef7": "Solte em uma máquina para vincular {source} a ela", - "0ef2e932b40f0085": "{source} e {target} estão vinculados um ao outro com o mesmo acesso, então o mapa desenha os dois vínculos como uma só linha. Cada um é um vínculo próprio e é esquecido separadamente.", - "7f045c3477f783cc": "{count, plural, one {# vínculo precisa de atenção.} other {# vínculos precisam de atenção.}}", + "e93eaf3bfa0ff76b": "{count, plural, one {Vincular a # máquina} other {Vincular a # máquinas}}", + "96bd315e3441c52a": "Renovar o vínculo com {target}", + "9f752f912897416a": "Vincular a {target}", + "b40f4891ccc7af6d": "Renovar o vínculo com {target} com um código de pareamento", + "d51a7a2bb6b8c406": "Vincular a {target} com um código de pareamento", + "f4ca5e62fb54a3a7": "Solte sobre uma máquina para vincular", + "11e67016507a6daa": "Dois vínculos, um em cada sentido.", + "352169e91766aeb4": "{count, plural, one {# precisa de atenção} other {# precisam de atenção}}", "d53ada50331e6041": "{machines, plural, one {# máquina} other {# máquinas}}, {links, plural, =0 {sem vínculos} one {# vínculo} other {# vínculos}}", - "8cb29b21fc19a505": "Selecione uma máquina para gerenciá-la. Para vincular duas máquinas, arraste o mais de um ambiente até outra máquina, ou pressione-o para escolher uma. Para vincular várias de uma vez, use Shift-clique nas máquinas ou Shift-arraste uma caixa ao redor delas e depois arraste o mais até uma delas.", - "743b93767ec7ebf8": "Selecione uma máquina para gerenciá-la.", - "718e9f7ff8f48497": "Um vínculo chega a uma máquina e termina ali. Ele não segue para as máquinas às quais ela está vinculada.", "3e8441af6148878f": "Expira em {date}", "4daaa2288b63a801": "{count, plural, one {# vínculo de entrada} other {# vínculos de entrada}}", - "5e7ed49a9fbfbcb4": "{count, plural, one {# ambiente} other {# ambientes}} sem vínculos, não conectados", - "786d62572ebcebdf": "{count, plural, one {# máquina vinculada} other {# máquinas vinculadas}} a partir de {source}, {access}, {reachable} acessíveis", - "7762644204376a63": "{count, plural, one {# máquina} other {# máquinas}}, cada uma vinculada a partir de {sources}, {reachable} acessíveis", - "166aac696c3ec460": "Recolher no mapa", - "d4e68210142d6734": "Mostrar as primeiras {shown} no mapa", - "069d8ba658617f30": "Mostrar cada uma no mapa", + "baf297d0add1d61b": "{count, plural, one {# ambiente} other {# ambientes}}", + "ddb9150bfa8ce6f0": "Sem vínculos", + "a780bc462b60c3c0": "Recolher", + "059c335b1da34f63": "Mostrar no mapa", "c7e1635b229d7249": "Filtrar estas máquinas por nome", "52a07016be1bea99": "Filtrar por nome", "a7061489aec79ba8": "{shown} de {count}", "eefe994332120d82": "Vincular", - "9aca4025e20bef31": "Conectado a {connected} de {total} ambientes", - "7f3ea6eba251a165": "Cada linha que sai daqui é uma rota salva para um ambiente. O mapa mostra os vínculos dos ambientes aos quais este app está conectado; um que ele não alcança pode ter vínculos que não são desenhados.", + "c20e4b94dddc33e7": "{connected} de {total} conectados", + "c7a9759d8578279f": "Cada linha que sai daqui é uma rota salva para um ambiente.", "398cee23ca4dabec": "{count, plural, =0 {Nenhuma máquina conhecida vincula aqui} one {Vinculada a partir de # máquina} other {Vinculada a partir de # máquinas}}", - "4492f856b6539118": "{label} está na sua conta do T3 Connect, mas não foi adicionada a este app. Adicione-a para conectar e ver os vínculos que ela tem.", + "79e98f4a48d3df43": "Adicione {label} a este app para conectar.", "da2990354cbe0fab": "Conhecida apenas por um vínculo", - "5d46435186f86deb": "Este app não está conectado a {label}, então os vínculos que ela tiver com outras máquinas não são mostrados.", - "b943528e12e44252": "Este app não está conectado a {label} no momento, então os vínculos que ela tiver com outras máquinas não são mostrados.", - "f0fa4a3c6960cb17": "Ambientes vinculados está desativado em {label}. Ative em Ajustes, em Labs, nessa máquina para vincular a partir dela.", + "dfaeed73f86107ea": "Não conectada, então seus vínculos não são mostrados.", + "2ff64d143a690a99": "Para vincular a partir de {label}, ative Ambientes vinculados nos ajustes de Labs dessa máquina.", "eb3226bab4946cfa": "Este app não tem permissão para ler os vínculos de {label}.", "59bb2a50641eb2a9": "Não foi possível carregar os vínculos de {label}: {error}", "58cb9c075da185fb": "Carregando ambientes vinculados…", @@ -8796,13 +8790,13 @@ "692450a6537f52a8": "Vinculada em um sentido", "78ccf685018ef797": "Vinculada", "956b5c20a1fba7c1": "Não foi possível vincular de volta: {reason}", - "e82fad1c68674065": "{count, plural, one {# máquina escolhida só é conhecida por um vínculo, então precisa de um código de pareamento. Vincule-a separadamente.} other {# máquinas escolhidas só são conhecidas por um vínculo, então precisam de um código de pareamento. Vincule-as uma de cada vez.}}", + "641c3b24cbc7d86b": "{count, plural, one {# máquina precisa de um código de pareamento, então não está na lista.} other {# máquinas precisam de um código de pareamento, então não estão na lista.}}", "87433cf138dc3e2c": "{linked, plural, one {# máquina vinculada.} other {# máquinas vinculadas.}}", "d044bb95248da10c": "{linked} de {total} vinculadas. As que falharam continuam selecionadas para você tentar de novo.", - "64768ee9ecd48309": "{count, plural, one {# máquina não pôde vincular de volta. Selecione o vínculo no mapa para tentar de novo.} other {# máquinas não puderam vincular de volta. Selecione cada vínculo no mapa para tentar de novo.}}", + "079237b461191c9a": "{count, plural, one {# máquina não pôde vincular de volta.} other {# máquinas não puderam vincular de volta.}}", "86d17c42dae16356": "Vincular também cada máquina de volta a {source}", - "3fc9f71471e4c0bb": "Os agentes de cada máquina poderão então trabalhar também em {source}, com o mesmo acesso. Cada um é um segundo vínculo, criado naquela máquina.", - "e1c55ea1297483f3": "{count, plural, one {# máquina que você escolheu não pode vincular de volta, ou já vincula: ela é vinculada em um sentido.} other {# máquinas que você escolheu não podem vincular de volta, ou já vinculam: elas são vinculadas em um sentido.}}", + "23fd4db8faa1a001": "Os agentes de lá poderão trabalhar também em {source}.", + "35d59319f62bd505": "{count, plural, one {# máquina continua vinculada em um sentido.} other {# máquinas continuam vinculadas em um sentido.}}", "d2fbaffe08b6cf60": "{count, plural, one {Vincular # máquina} other {Vincular # máquinas}}", "8e3378b526d615f4": "Vincular vários…", "b550d04490078bda": "Os agentes daqui poderão então iniciar threads em cada máquina escolhida, enviar mensagens e aguardá-las. Cada vínculo aparece em Clientes autorizados em Compartilhamento e acesso da respectiva máquina, onde pode ser revogado.", @@ -8820,7 +8814,7 @@ "64ac3d1579ca9f5b": "Vincular {source} a {target}", "fb71127e5746a6bc": "Em Compartilhamento e acesso de lá, ou t3 pair", "1e3fee7084791773": "Vincular também {target} de volta a {source}", - "a46df5abb1115c63": "Os agentes de {target} poderão então trabalhar também em {source}, com o mesmo acesso. É um segundo vínculo, criado em {target}.", + "ea34a190b0bd804c": "Os agentes de {target} poderão trabalhar também em {source}.", "ad5ed0ce61b966eb": "Esquecer {label}? Os agentes daqui deixam de funcionar lá. Revogue \"T3 Code · …\" em Compartilhamento e acesso de {label} para encerrar a sessão lá também.", "81c9796bf61b306a": "Não foi possível esquecer o vínculo", "130e51beb6cf5aad": "Vincular um ambiente", diff --git a/apps/web/src/i18n/translations/ru.json b/apps/web/src/i18n/translations/ru.json index e6b4324aad0c1..11e6e709cb917 100644 --- a/apps/web/src/i18n/translations/ru.json +++ b/apps/web/src/i18n/translations/ru.json @@ -8356,29 +8356,30 @@ "219bc3612d646a01": "Удалить маршрут", "b2877341429675aa": "через {route}", "537e7cf4df7a0af1": "Этот браузер", + "d18ad97175bd2028": "Shift-щелчок или Shift-перетаскивание выбирает несколько", "692153ec34a9a7bd": "Найти машину на карте", "288ab5c45a9539a3": "Найти машину", "c263859f8bcc7b1c": "Нет машины с таким именем", - "1bcc5f963ef39c7b": "{count, plural, one {# совпадение. Enter — перейти к первому} few {# совпадения. Enter — перейти к первому} many {# совпадений. Enter — перейти к первому} other {# совпадения. Enter — перейти к первому}}", + "ebe6ecf547a0636b": "{count, plural, one {# совпадение} few {# совпадения} many {# совпадений} other {# совпадения}}", "2bb44d78cb85c097": "{count, plural, one {Выбрана #} few {Выбрано #} many {Выбрано #} other {Выбрано #}}", "bcf01a26153f6425": "Сбросить", - "d18ad97175bd2028": "Shift-щелчок или Shift-перетаскивание выбирает несколько", "d9665bd69e7fd4f4": "Связать несколько…", "8d5882faf1e5fb96": "С {source}", + "2b9e6257e6995ada": "Как пользоваться картой", + "743b93767ec7ebf8": "Выберите машину, чтобы управлять ею.", + "49712bceec027141": "Перетащите плюс на машину, чтобы привязать их.", + "aba23d86b0f4b66b": "Привязка доходит до одной машины и на ней заканчивается.", "601e0c9e6a45a54f": "Вместить карту в окно", "feec58f6653f5673": "Как читать линии", - "e459bd5c53a993e2": "Используемый маршрут", "46e0a0c6ff391521": "Используется", "1151e8a9fb7bdfcf": "В резерве", "a322337b6655de2a": "Не используется", "e31c7e76ef900ef4": "Вход отклонён", - "235b3e270162f18b": "Привязка: чем больше доступ, тем толще", - "4ae743f8566a1ef1": "Две привязки, по одной в каждую сторону", - "0b7e6bab12c8ad4c": "{count, plural, one {{source} не привязан к # машине.} few {{source} не привязан к # машинам.} many {{source} не привязан к # машинам.} other {{source} не привязан к # машины.}}", - "dfea515dc1198934": "{count, plural, one {Это приложение к ней не подключено, поэтому нужен код сопряжения.} few {Это приложение к ним не подключено, поэтому для каждой нужен код сопряжения. Привязывайте их по одной.} many {Это приложение к ним не подключено, поэтому для каждой нужен код сопряжения. Привязывайте их по одной.} other {Это приложение к ним не подключено, поэтому для каждой нужен код сопряжения. Привязывайте их по одной.}}", + "c032d479f9bbb166": "Привязка", + "d4160421f6e651bb": "В обе стороны", + "d3751f456814b2b2": "{count, plural, one {# машине нужен код сопряжения} few {# машинам нужен код сопряжения для каждой} many {# машинам нужен код сопряжения для каждой} other {# машины нужен код сопряжения для каждой}}", "e0a8e0b87dca8241": "Привязать одну по коду…", - "c326a7e66bab5da0": "Ваши окружения", - "86222507d918084b": "Доступны через привязку", + "ad095a37f818d67e": "Привязанные машины", "afc01d2ee8048b4b": "{label}, выбрано", "aa34f7bc5aaf6bb0": "Карта ваших машин", "edb6cb27ff7f446b": "Стрелки перемещают между машинами. Enter открывает сведения о машине с её маршрутами и связями. Пробел выбирает машину, чтобы связать несколько сразу. Tab из окружения ведёт к его кнопке связывания. Плюс и минус меняют масштаб, ноль вписывает карту.", @@ -8415,39 +8416,32 @@ "5d252c8bbc3b24d0": "{status}. Привязки неизвестны", "ec2c609c028d63b4": "Привязать {label} к другой машине", "0a72d33781010657": "К этому нельзя привязать", - "287a6aa91e444b27": "{count, plural, one {Это приложение не подключено к # машине здесь. Ей нужен код сопряжения} few {Это приложение не подключено к этим # машинам. Каждой нужен код сопряжения} many {Это приложение не подключено к этим # машинам. Каждой нужен код сопряжения} other {Это приложение не подключено к этим # машины. Каждой нужен код сопряжения}}", - "22d1944bbd4d00b4": "{count, plural, one {Связать с # машиной. Выбор на следующем шаге} few {Связать с # машинами. Выбор на следующем шаге} many {Связать с # машинами. Выбор на следующем шаге} other {Связать с # машины. Выбор на следующем шаге}}", - "4f10f6354f38106e": "Обновить привязку к {target}. Код сопряжения не нужен", - "5a25bfd7c3a8e4b4": "Привязать к {target}. Код сопряжения не нужен", - "b4b893b9c210e0ba": "Обновить привязку к {target}. Нужен код сопряжения с той машины", - "052c3f87704b216d": "Привязать к {target}. Нужен код сопряжения с той машины", - "e6b05c7e6ef4fef7": "Отпустите на машине, чтобы привязать к ней {source}", - "0ef2e932b40f0085": "{source} и {target} привязаны друг к другу с одинаковым доступом, поэтому карта рисует обе привязки одной линией. Каждая — отдельная привязка и удаляется отдельно.", - "7f045c3477f783cc": "{count, plural, one {# привязка требует внимания.} few {# привязки требуют внимания.} many {# привязок требуют внимания.} other {# привязки требуют внимания.}}", + "e93eaf3bfa0ff76b": "{count, plural, one {Привязать к # машине} few {Привязать к # машинам} many {Привязать к # машинам} other {Привязать к # машины}}", + "96bd315e3441c52a": "Обновить привязку к {target}", + "9f752f912897416a": "Привязать к {target}", + "b40f4891ccc7af6d": "Обновить привязку к {target} по коду сопряжения", + "d51a7a2bb6b8c406": "Привязать к {target} по коду сопряжения", + "f4ca5e62fb54a3a7": "Отпустите на машине, чтобы привязать", + "11e67016507a6daa": "Две привязки, по одной в каждую сторону.", + "352169e91766aeb4": "{count, plural, one {# требует внимания} few {# требуют внимания} many {# требуют внимания} other {# требуют внимания}}", "d53ada50331e6041": "{machines, plural, one {# машина} few {# машины} many {# машин} other {# машины}}, {links, plural, =0 {нет привязок} one {# привязка} few {# привязки} many {# привязок} other {# привязки}}", - "8cb29b21fc19a505": "Выберите машину, чтобы управлять ею. Чтобы связать две машины, перетащите плюс окружения на другую машину или нажмите его, чтобы выбрать. Чтобы связать несколько сразу, щёлкайте машины с Shift или обведите их рамкой с Shift, затем перетащите плюс на одну из них.", - "743b93767ec7ebf8": "Выберите машину, чтобы управлять ею.", - "718e9f7ff8f48497": "Привязка ведёт к одной машине и на ней заканчивается. Она не распространяется на машины, к которым привязана та.", "3e8441af6148878f": "Истекает {date}", "4daaa2288b63a801": "{count, plural, one {# входящая связь} few {# входящие связи} many {# входящих связей} other {# входящей связи}}", - "5e7ed49a9fbfbcb4": "{count, plural, one {# окружение} few {# окружения} many {# окружений} other {# окружения}} без связей, не подключены", - "786d62572ebcebdf": "{count, plural, one {# машина} few {# машины} many {# машин} other {# машины}}, привязаны из {source}, {access}, доступно: {reachable}", - "7762644204376a63": "{count, plural, one {# машина} few {# машины} many {# машин} other {# машины}}, каждая связана с {sources}, доступно: {reachable}", - "166aac696c3ec460": "Свернуть на карте", - "d4e68210142d6734": "Показать первые {shown} на карте", - "069d8ba658617f30": "Показать каждую на карте", + "baf297d0add1d61b": "{count, plural, one {# окружение} few {# окружения} many {# окружений} other {# окружения}}", + "ddb9150bfa8ce6f0": "Нет привязок", + "a780bc462b60c3c0": "Свернуть", + "059c335b1da34f63": "Показать на карте", "c7e1635b229d7249": "Фильтровать эти машины по имени", "52a07016be1bea99": "Фильтр по имени", "a7061489aec79ba8": "{shown} из {count}", "eefe994332120d82": "Привязать", - "9aca4025e20bef31": "Подключено окружений: {connected} из {total}", - "7f3ea6eba251a165": "Каждая линия отсюда — сохранённый маршрут к окружению. Карта показывает привязки окружений, к которым подключено это приложение; у недоступного окружения могут быть привязки, которые не нарисованы.", + "c20e4b94dddc33e7": "Подключено {connected} из {total}", + "c7a9759d8578279f": "Каждая линия отсюда — сохранённый маршрут к окружению.", "398cee23ca4dabec": "{count, plural, =0 {Известные машины сюда не привязаны} one {Привязки от # машины} few {Привязки от # машин} many {Привязки от # машин} other {Привязки от # машины}}", - "4492f856b6539118": "{label} есть в вашей учётной записи T3 Connect, но не добавлена в это приложение. Добавьте её, чтобы подключиться и увидеть её привязки.", + "79e98f4a48d3df43": "Добавьте {label} в это приложение, чтобы подключиться.", "da2990354cbe0fab": "Известна только по привязке", - "5d46435186f86deb": "Это приложение не подключено к {label}, поэтому привязки {label} к другим машинам не показаны.", - "b943528e12e44252": "Это приложение сейчас не подключено к {label}, поэтому привязки {label} к другим машинам не показаны.", - "f0fa4a3c6960cb17": "На {label} привязанные окружения выключены. Включите их там в настройках, в разделе «Эксперименты», чтобы создавать привязки оттуда.", + "dfaeed73f86107ea": "Нет подключения, поэтому привязки не показаны.", + "2ff64d143a690a99": "Чтобы создавать привязки от {label}, включите там «Привязанные окружения» в настройках, в разделе «Эксперименты».", "eb3226bab4946cfa": "У этого приложения нет права читать привязки {label}.", "59bb2a50641eb2a9": "Не удалось загрузить привязки {label}: {error}", "58cb9c075da185fb": "Загрузка привязанных окружений…", @@ -8797,13 +8791,13 @@ "692450a6537f52a8": "Привязана в одну сторону", "78ccf685018ef797": "Привязана", "956b5c20a1fba7c1": "Не удалось привязать в ответ: {reason}", - "e82fad1c68674065": "{count, plural, one {# выбранная машина известна только по связи, поэтому ей нужен код сопряжения. Свяжите её отдельно.} few {# выбранные машины известны только по связи, поэтому им нужен код сопряжения. Свяжите их по одной.} many {# выбранных машин известны только по связи, поэтому им нужен код сопряжения. Свяжите их по одной.} other {# выбранной машины известны только по связи, поэтому им нужен код сопряжения. Свяжите их по одной.}}", + "641c3b24cbc7d86b": "{count, plural, one {# машине нужен код сопряжения, поэтому её нет в списке.} few {# машинам нужен код сопряжения, поэтому их нет в списке.} many {# машинам нужен код сопряжения, поэтому их нет в списке.} other {# машины нужен код сопряжения, поэтому их нет в списке.}}", "87433cf138dc3e2c": "{linked, plural, one {Привязана # машина.} few {Привязаны # машины.} many {Привязано # машин.} other {Привязано # машины.}}", "d044bb95248da10c": "Привязано {linked} из {total}. Машины с ошибкой остаются выбранными, чтобы можно было повторить попытку.", - "64768ee9ecd48309": "{count, plural, one {# машина не смогла привязаться в ответ. Выберите привязку на карте, чтобы повторить.} few {# машины не смогли привязаться в ответ. Выберите каждую привязку на карте, чтобы повторить.} many {# машин не смогли привязаться в ответ. Выберите каждую привязку на карте, чтобы повторить.} other {# машины не смогли привязаться в ответ. Выберите каждую привязку на карте, чтобы повторить.}}", + "079237b461191c9a": "{count, plural, one {# машина не смогла привязаться в ответ.} few {# машины не смогли привязаться в ответ.} many {# машин не смогли привязаться в ответ.} other {# машины не смогли привязаться в ответ.}}", "86d17c42dae16356": "Также привязать каждую машину в ответ к {source}", - "3fc9f71471e4c0bb": "Тогда агенты на каждой машине смогут работать и на {source} с тем же доступом. Каждая — вторая привязка, созданная на этой машине.", - "e1c55ea1297483f3": "{count, plural, one {# выбранная машина не может привязаться в ответ или уже привязана: она привязывается в одну сторону.} few {# выбранные машины не могут привязаться в ответ или уже привязаны: они привязываются в одну сторону.} many {# выбранных машин не могут привязаться в ответ или уже привязаны: они привязываются в одну сторону.} other {# выбранной машины не могут привязаться в ответ или уже привязаны: они привязываются в одну сторону.}}", + "23fd4db8faa1a001": "Тогда агенты оттуда смогут работать и на {source}.", + "35d59319f62bd505": "{count, plural, one {# машина остаётся привязанной в одну сторону.} few {# машины остаются привязанными в одну сторону.} many {# машин остаются привязанными в одну сторону.} other {# машины остаются привязанными в одну сторону.}}", "d2fbaffe08b6cf60": "{count, plural, one {Привязать # машину} few {Привязать # машины} many {Привязать # машин} other {Привязать # машины}}", "8e3378b526d615f4": "Привязать несколько…", "b550d04490078bda": "После этого агенты отсюда смогут запускать треды на каждой выбранной машине, писать в них и ждать их. Каждая связь появится в разделе «Авторизованные клиенты» в «Общем доступе» соответствующей машины, где её можно отозвать.", @@ -8821,7 +8815,7 @@ "64ac3d1579ca9f5b": "Привязать {source} к {target}", "fb71127e5746a6bc": "Из раздела «Общий доступ» там или через t3 pair", "1e3fee7084791773": "Также привязать {target} в ответ к {source}", - "a46df5abb1115c63": "Тогда агенты на {target} смогут работать и на {source} с тем же доступом. Это вторая привязка, созданная на {target}.", + "ea34a190b0bd804c": "Тогда агенты на {target} смогут работать и на {source}.", "ad5ed0ce61b966eb": "Забыть {label}? Агенты отсюда перестанут там работать. Чтобы завершить сеанс и там, отзовите «T3 Code · …» в разделе «Общий доступ» на {label}.", "81c9796bf61b306a": "Не удалось забыть привязку", "130e51beb6cf5aad": "Привязать окружение", diff --git a/apps/web/src/i18n/translations/sv.json b/apps/web/src/i18n/translations/sv.json index 24a4c83ba6e31..d2f9d6c66a234 100644 --- a/apps/web/src/i18n/translations/sv.json +++ b/apps/web/src/i18n/translations/sv.json @@ -8362,29 +8362,30 @@ "219bc3612d646a01": "Ta bort rutt", "b2877341429675aa": "via {route}", "537e7cf4df7a0af1": "Den här webbläsaren", + "d18ad97175bd2028": "Skift-klicka eller Skift-dra för att välja flera", "692153ec34a9a7bd": "Hitta en maskin på kartan", "288ab5c45a9539a3": "Hitta en maskin", "c263859f8bcc7b1c": "Ingen maskin med det namnet", - "1bcc5f963ef39c7b": "{count, plural, one {# träff. Enter går dit} other {# träffar. Enter går till den första}}", + "ebe6ecf547a0636b": "{count, plural, one {# träff} other {# träffar}}", "2bb44d78cb85c097": "{count, plural, one {# vald} other {# valda}}", "bcf01a26153f6425": "Rensa", - "d18ad97175bd2028": "Skift-klicka eller Skift-dra för att välja flera", "d9665bd69e7fd4f4": "Länka flera…", "8d5882faf1e5fb96": "Från {source}", + "2b9e6257e6995ada": "Så använder du kartan", + "743b93767ec7ebf8": "Välj en maskin för att hantera den.", + "49712bceec027141": "Dra ett plus till en maskin för att länka dem.", + "aba23d86b0f4b66b": "En länk når en maskin och slutar där.", "601e0c9e6a45a54f": "Anpassa kartan till vyn", "feec58f6653f5673": "Så läser du linjerna", - "e459bd5c53a993e2": "Rutt som används", "46e0a0c6ff391521": "Används", "1151e8a9fb7bdfcf": "Reserv", "a322337b6655de2a": "Används inte", "e31c7e76ef900ef4": "Inloggning nekad", - "235b3e270162f18b": "Länk, tjockare med mer åtkomst", - "4ae743f8566a1ef1": "Två länkar, en åt varje håll", - "0b7e6bab12c8ad4c": "{count, plural, one {{source} länkades inte till # dator.} other {{source} länkades inte till # datorer.}}", - "dfea515dc1198934": "{count, plural, one {Den här appen är inte ansluten till den, så den behöver en parkopplingskod.} other {Den här appen är inte ansluten till dem, så var och en behöver en parkopplingskod. Länka dem en i taget.}}", + "c032d479f9bbb166": "Länk", + "d4160421f6e651bb": "Åt båda håll", + "d3751f456814b2b2": "{count, plural, one {# maskin behöver en parkopplingskod} other {# maskiner behöver varsin parkopplingskod}}", "e0a8e0b87dca8241": "Länka en med en kod…", - "c326a7e66bab5da0": "Dina miljöer", - "86222507d918084b": "Nås via en länk", + "ad095a37f818d67e": "Länkade maskiner", "afc01d2ee8048b4b": "{label}, vald", "aa34f7bc5aaf6bb0": "Karta över dina maskiner", "edb6cb27ff7f446b": "Piltangenterna flyttar mellan maskiner. Enter öppnar en maskins detaljer med dess rutter och länkar. Blanksteg väljer en maskin för att länka flera på en gång. Tabb från en miljö når dess länkknapp. Plus och minus zoomar, noll anpassar kartan.", @@ -8421,39 +8422,32 @@ "5d252c8bbc3b24d0": "{status}. Länkar okända", "ec2c609c028d63b4": "Länka {label} till en annan maskin", "0a72d33781010657": "Går inte att länka till detta", - "287a6aa91e444b27": "{count, plural, one {Den här appen är inte ansluten till # dator här. Den behöver en parkopplingskod} other {Den här appen är inte ansluten till de här # datorerna. Var och en behöver en parkopplingskod}}", - "22d1944bbd4d00b4": "{count, plural, one {Länka till # maskin. Välj vilken i nästa steg} other {Länka till # maskiner. Välj vilka i nästa steg}}", - "4f10f6354f38106e": "Förnya länken till {target}. Ingen parkopplingskod behövs", - "5a25bfd7c3a8e4b4": "Länka till {target}. Ingen parkopplingskod behövs", - "b4b893b9c210e0ba": "Förnya länken till {target}. Kräver en parkopplingskod därifrån", - "052c3f87704b216d": "Länka till {target}. Kräver en parkopplingskod därifrån", - "e6b05c7e6ef4fef7": "Släpp på en maskin för att länka {source} till den", - "0ef2e932b40f0085": "{source} och {target} är länkade till varandra med samma åtkomst, så kartan ritar båda länkarna som en linje. Var och en är en egen länk och glöms för sig.", - "7f045c3477f783cc": "{count, plural, one {# länk behöver åtgärdas.} other {# länkar behöver åtgärdas.}}", + "e93eaf3bfa0ff76b": "{count, plural, one {Länka till # maskin} other {Länka till # maskiner}}", + "96bd315e3441c52a": "Förnya länken till {target}", + "9f752f912897416a": "Länka till {target}", + "b40f4891ccc7af6d": "Förnya länken till {target} med en parkopplingskod", + "d51a7a2bb6b8c406": "Länka till {target} med en parkopplingskod", + "f4ca5e62fb54a3a7": "Släpp på en maskin för att länka", + "11e67016507a6daa": "Två länkar, en åt varje håll.", + "352169e91766aeb4": "{count, plural, one {# behöver åtgärdas} other {# behöver åtgärdas}}", "d53ada50331e6041": "{machines, plural, one {# dator} other {# datorer}}, {links, plural, =0 {inga länkar} one {# länk} other {# länkar}}", - "8cb29b21fc19a505": "Välj en maskin för att hantera den. För att länka två maskiner drar du plustecknet på en miljö till en annan maskin, eller trycker på det för att välja en. För att länka flera på en gång, Skift-klicka på maskiner eller Skift-dra en ruta runt dem och dra sedan plustecknet till en av dem.", - "743b93767ec7ebf8": "Välj en maskin för att hantera den.", - "718e9f7ff8f48497": "En länk når en dator och stannar där. Den går inte vidare till de datorer som den datorn länkar till.", "3e8441af6148878f": "Går ut {date}", "4daaa2288b63a801": "{count, plural, one {# länk in} other {# länkar in}}", - "5e7ed49a9fbfbcb4": "{count, plural, one {# miljö} other {# miljöer}} utan länkar, inte anslutna", - "786d62572ebcebdf": "{count, plural, one {# maskin länkad} other {# maskiner länkade}} från {source}, {access}, {reachable} nåbara", - "7762644204376a63": "{count, plural, one {# maskin} other {# maskiner}}, var och en länkad från {sources}, {reachable} nåbara", - "166aac696c3ec460": "Fäll ihop på kartan", - "d4e68210142d6734": "Visa de första {shown} på kartan", - "069d8ba658617f30": "Visa var och en på kartan", + "baf297d0add1d61b": "{count, plural, one {# miljö} other {# miljöer}}", + "ddb9150bfa8ce6f0": "Inga länkar", + "a780bc462b60c3c0": "Fäll ihop", + "059c335b1da34f63": "Visa på kartan", "c7e1635b229d7249": "Filtrera dessa maskiner efter namn", "52a07016be1bea99": "Filtrera efter namn", "a7061489aec79ba8": "{shown} av {count}", "eefe994332120d82": "Länka", - "9aca4025e20bef31": "Ansluten till {connected} av {total} miljöer", - "7f3ea6eba251a165": "Varje linje härifrån är en sparad rutt till en miljö. Kartan visar länkarna för de miljöer som appen är ansluten till; en miljö den inte når kan ha länkar som inte ritas ut.", + "c20e4b94dddc33e7": "{connected} av {total} anslutna", + "c7a9759d8578279f": "Varje linje härifrån är en sparad rutt till en miljö.", "398cee23ca4dabec": "{count, plural, =0 {Ingen känd dator länkar hit} one {Länkad från # dator} other {Länkad från # datorer}}", - "4492f856b6539118": "{label} finns på ditt T3 Connect-konto men är inte tillagd i den här appen. Lägg till den för att ansluta och se vilka länkar den har.", + "79e98f4a48d3df43": "Lägg till {label} i den här appen för att ansluta.", "da2990354cbe0fab": "Känd endast via en länk", - "5d46435186f86deb": "Den här appen är inte ansluten till {label}, så eventuella länkar därifrån till andra datorer visas inte.", - "b943528e12e44252": "Den här appen är inte ansluten till {label} just nu, så eventuella länkar därifrån till andra datorer visas inte.", - "f0fa4a3c6960cb17": "Länkade miljöer är avstängt på {label}. Slå på det i dess inställningar, under Labs, för att länka därifrån.", + "dfaeed73f86107ea": "Inte ansluten, så dess länkar visas inte.", + "2ff64d143a690a99": "Slå på Länkade miljöer i Labs-inställningarna på {label} för att länka därifrån.", "eb3226bab4946cfa": "Den här appen får inte läsa länkarna som {label} har.", "59bb2a50641eb2a9": "Kunde inte läsa in länkarna som {label} har: {error}", "58cb9c075da185fb": "Läser in länkade miljöer…", @@ -8803,13 +8797,13 @@ "692450a6537f52a8": "Länkad åt ett håll", "78ccf685018ef797": "Länkad", "956b5c20a1fba7c1": "Kunde inte länka tillbaka: {reason}", - "e82fad1c68674065": "{count, plural, one {# maskin du valde är bara känd genom en länk och behöver därför en parkopplingskod. Länka den separat.} other {# maskiner du valde är bara kända genom en länk och behöver därför en parkopplingskod. Länka dem en i taget.}}", + "641c3b24cbc7d86b": "{count, plural, one {# maskin behöver en parkopplingskod och visas därför inte i listan.} other {# maskiner behöver en parkopplingskod och visas därför inte i listan.}}", "87433cf138dc3e2c": "{linked, plural, one {Länkade # dator.} other {Länkade # datorer.}}", "d044bb95248da10c": "Länkade {linked} av {total}. De som misslyckades är fortfarande markerade så att du kan försöka igen.", - "64768ee9ecd48309": "{count, plural, one {# dator kunde inte länka tillbaka. Välj länken på kartan för att försöka igen.} other {# datorer kunde inte länka tillbaka. Välj varje länk på kartan för att försöka igen.}}", + "079237b461191c9a": "{count, plural, one {# maskin kunde inte länka tillbaka.} other {# maskiner kunde inte länka tillbaka.}}", "86d17c42dae16356": "Länka även varje dator tillbaka till {source}", - "3fc9f71471e4c0bb": "Agenter på varje dator kan då också arbeta på {source}, med samma åtkomst. Var och en är en andra länk, skapad på den datorn.", - "e1c55ea1297483f3": "{count, plural, one {# dator du valde kan inte länka tillbaka, eller gör det redan: den länkas åt ett håll.} other {# datorer du valde kan inte länka tillbaka, eller gör det redan: de länkas åt ett håll.}}", + "23fd4db8faa1a001": "Agenter där kan då också arbeta på {source}.", + "35d59319f62bd505": "{count, plural, one {# maskin förblir länkad åt ett håll.} other {# maskiner förblir länkade åt ett håll.}}", "d2fbaffe08b6cf60": "{count, plural, one {Länka # dator} other {Länka # datorer}}", "8e3378b526d615f4": "Länka flera…", "b550d04490078bda": "Agenter här kan sedan starta, skicka meddelanden till och vänta på trådar på varje dator du väljer. Varje länk visas under Auktoriserade klienter i den datorns Delning och åtkomst, där den kan återkallas.", @@ -8827,7 +8821,7 @@ "64ac3d1579ca9f5b": "Länka {source} till {target}", "fb71127e5746a6bc": "Från Delning och åtkomst där, eller t3 pair", "1e3fee7084791773": "Länka även {target} tillbaka till {source}", - "a46df5abb1115c63": "Agenter på {target} kan då också arbeta på {source}, med samma åtkomst. Det är en andra länk, skapad på {target}.", + "ea34a190b0bd804c": "Agenter på {target} kan då också arbeta på {source}.", "ad5ed0ce61b966eb": "Glöm {label}? Agenter här slutar arbeta där. Återkalla ”T3 Code · …” under Delning och åtkomst på {label} för att avsluta sessionen där också.", "81c9796bf61b306a": "Kunde inte glömma länken", "130e51beb6cf5aad": "Länka en miljö", diff --git a/apps/web/src/i18n/translations/zh.json b/apps/web/src/i18n/translations/zh.json index 5a111238c035d..dc1808b99a7bf 100644 --- a/apps/web/src/i18n/translations/zh.json +++ b/apps/web/src/i18n/translations/zh.json @@ -8372,29 +8372,30 @@ "219bc3612d646a01": "移除线路", "b2877341429675aa": "通过 {route}", "537e7cf4df7a0af1": "此浏览器", + "d18ad97175bd2028": "按住 Shift 点击或拖动可选择多台", "692153ec34a9a7bd": "在地图上查找机器", "288ab5c45a9539a3": "查找机器", "c263859f8bcc7b1c": "没有该名称的机器", - "1bcc5f963ef39c7b": "{count, plural, other {# 个匹配项。按 Enter 前往第一个}}", + "ebe6ecf547a0636b": "{count, plural, other {# 个匹配项}}", "2bb44d78cb85c097": "{count, plural, other {已选择 # 台}}", "bcf01a26153f6425": "清除", - "d18ad97175bd2028": "按住 Shift 点击或拖动可选择多台", "d9665bd69e7fd4f4": "链接多台…", "8d5882faf1e5fb96": "从 {source}", + "2b9e6257e6995ada": "如何使用地图", + "743b93767ec7ebf8": "选择一台机器进行管理。", + "49712bceec027141": "把加号拖到一台机器上即可关联。", + "aba23d86b0f4b66b": "一条关联只到达一台机器,并在那里终止。", "601e0c9e6a45a54f": "让地图适应视图", "feec58f6653f5673": "如何看这些线", - "e459bd5c53a993e2": "使用中的线路", "46e0a0c6ff391521": "使用中", "1151e8a9fb7bdfcf": "备用", "a322337b6655de2a": "未使用", "e31c7e76ef900ef4": "登录被拒绝", - "235b3e270162f18b": "关联,权限越大线越粗", - "4ae743f8566a1ef1": "两条关联,每个方向一条", - "0b7e6bab12c8ad4c": "{count, plural, other {{source} 未关联到 # 台机器。}}", - "dfea515dc1198934": "{count, plural, other {此应用未连接到这些机器,因此每台都需要配对码。请逐台关联。}}", + "c032d479f9bbb166": "关联", + "d4160421f6e651bb": "双向", + "d3751f456814b2b2": "{count, plural, other {# 台机器各需要一个配对码}}", "e0a8e0b87dca8241": "用配对码关联一台…", - "c326a7e66bab5da0": "你的环境", - "86222507d918084b": "通过关联到达", + "ad095a37f818d67e": "已关联的机器", "afc01d2ee8048b4b": "{label},已选择", "aa34f7bc5aaf6bb0": "你的机器地图", "edb6cb27ff7f446b": "方向键在机器之间移动。Enter 打开机器的详情,包括其路由和链接。空格键选择机器以便一次链接多台。在环境上按 Tab 可到达其链接按钮。加号和减号缩放,零使地图适应视图。", @@ -8431,39 +8432,32 @@ "5d252c8bbc3b24d0": "{status}。关联未知", "ec2c609c028d63b4": "将 {label} 关联到另一台机器", "0a72d33781010657": "无法关联到这里", - "287a6aa91e444b27": "{count, plural, other {此应用未连接到这 # 台机器。每台都需要配对码}}", - "22d1944bbd4d00b4": "{count, plural, other {链接到 # 台机器。在下一步选择具体哪些}}", - "4f10f6354f38106e": "续期到 {target} 的关联。无需配对码", - "5a25bfd7c3a8e4b4": "关联到 {target}。无需配对码", - "b4b893b9c210e0ba": "续期到 {target} 的关联。需要来自它的配对码", - "052c3f87704b216d": "关联到 {target}。需要来自它的配对码", - "e6b05c7e6ef4fef7": "拖放到一台机器上,将 {source} 关联到它", - "0ef2e932b40f0085": "{source} 和 {target} 以相同权限互相关联,因此地图把两条关联画成一条线。每条都是独立的关联,需分别移除。", - "7f045c3477f783cc": "{count, plural, other {# 个关联需要处理。}}", + "e93eaf3bfa0ff76b": "{count, plural, other {关联到 # 台机器}}", + "96bd315e3441c52a": "续期到 {target} 的关联", + "9f752f912897416a": "关联到 {target}", + "b40f4891ccc7af6d": "用配对码续期到 {target} 的关联", + "d51a7a2bb6b8c406": "用配对码关联到 {target}", + "f4ca5e62fb54a3a7": "拖放到一台机器上即可关联", + "11e67016507a6daa": "两条关联,每个方向一条。", + "352169e91766aeb4": "{count, plural, other {# 个需要处理}}", "d53ada50331e6041": "{machines, plural, other {# 台机器}},{links, plural, =0 {没有关联} other {# 个关联}}", - "8cb29b21fc19a505": "选择一台机器以管理它。要链接两台机器,将环境上的加号拖到另一台机器上,或按下它来选择一台。要一次链接多台,按住 Shift 点击机器或按住 Shift 拖出一个框选中它们,然后将加号拖到其中一台上。", - "743b93767ec7ebf8": "选择一台机器进行管理。", - "718e9f7ff8f48497": "关联只到达一台机器并止于此,不会延伸到那台机器所关联的其他机器。", "3e8441af6148878f": "{date} 到期", "4daaa2288b63a801": "{count, plural, other {# 个传入链接}}", - "5e7ed49a9fbfbcb4": "{count, plural, other {# 个环境}},没有链接,未连接", - "786d62572ebcebdf": "{count, plural, other {从 {source} 关联的 # 台机器}},{access},{reachable} 台可访问", - "7762644204376a63": "{count, plural, other {# 台机器}},每台都由 {sources} 链接,{reachable} 台可达", - "166aac696c3ec460": "在地图上折叠", - "d4e68210142d6734": "在地图上显示前 {shown} 台", - "069d8ba658617f30": "在地图上逐台显示", + "baf297d0add1d61b": "{count, plural, other {# 个环境}}", + "ddb9150bfa8ce6f0": "没有关联", + "a780bc462b60c3c0": "收起", + "059c335b1da34f63": "在地图上显示", "c7e1635b229d7249": "按名称筛选这些机器", "52a07016be1bea99": "按名称筛选", "a7061489aec79ba8": "{shown} / {count}", "eefe994332120d82": "关联", - "9aca4025e20bef31": "已连接 {total} 个环境中的 {connected} 个", - "7f3ea6eba251a165": "从这里出发的每条线都是通往某个环境的已保存线路。地图显示此应用已连接环境的关联;无法到达的环境可能有未画出的关联。", + "c20e4b94dddc33e7": "已连接 {connected}/{total}", + "c7a9759d8578279f": "从这里出发的每条线都是通往某个环境的已保存线路。", "398cee23ca4dabec": "{count, plural, =0 {没有已知机器关联到这里} other {被 # 台机器关联}}", - "4492f856b6539118": "{label} 在你的 T3 Connect 账户中,但尚未添加到此应用。添加后即可连接并查看它的关联。", + "79e98f4a48d3df43": "将 {label} 添加到此应用即可连接。", "da2990354cbe0fab": "仅通过关联得知", - "5d46435186f86deb": "此应用未连接到 {label},因此不会显示它到其他机器的关联。", - "b943528e12e44252": "此应用目前未连接到 {label},因此不会显示它到其他机器的关联。", - "f0fa4a3c6960cb17": "{label} 上的关联环境已关闭。请在它的设置中的“实验功能”里开启,才能从它发起关联。", + "dfaeed73f86107ea": "未连接,因此不显示它的关联。", + "2ff64d143a690a99": "要从 {label} 发起关联,请在它的“实验功能”设置中开启关联环境。", "eb3226bab4946cfa": "此应用无权读取 {label} 的关联。", "59bb2a50641eb2a9": "无法加载 {label} 的关联:{error}", "58cb9c075da185fb": "正在加载已关联的环境…", @@ -8813,13 +8807,13 @@ "692450a6537f52a8": "仅单向关联", "78ccf685018ef797": "已关联", "956b5c20a1fba7c1": "无法反向关联:{reason}", - "e82fad1c68674065": "{count, plural, other {你选择的 # 台机器仅通过链接得知,因此需要配对码。请逐台链接。}}", + "641c3b24cbc7d86b": "{count, plural, other {# 台机器需要配对码,因此未列出。}}", "87433cf138dc3e2c": "{linked, plural, other {已关联 # 台机器。}}", "d044bb95248da10c": "已关联 {linked}/{total} 台。失败的机器仍保持选中,你可以重试。", - "64768ee9ecd48309": "{count, plural, other {# 台机器无法反向关联。在地图上选中各条关联即可重试。}}", + "079237b461191c9a": "{count, plural, other {# 台机器无法反向关联。}}", "86d17c42dae16356": "同时让每台机器反向关联到 {source}", - "3fc9f71471e4c0bb": "之后每台机器上的智能体也能以相同权限在 {source} 上工作。每条都是在该机器上创建的第二条关联。", - "e1c55ea1297483f3": "{count, plural, other {你选择的 # 台机器无法反向关联,或已经反向关联:它们只会单向关联。}}", + "23fd4db8faa1a001": "之后那里的智能体也能在 {source} 上工作。", + "35d59319f62bd505": "{count, plural, other {# 台机器保持单向关联。}}", "d2fbaffe08b6cf60": "{count, plural, other {关联 # 台机器}}", "8e3378b526d615f4": "关联多个…", "b550d04490078bda": "这里的智能体随后就能在你选择的每台机器上启动会话、发送消息并等待结果。每个连接将显示在对应机器“共享与访问”的“已授权客户端”中,可在那里撤销。", @@ -8837,7 +8831,7 @@ "64ac3d1579ca9f5b": "将 {source} 关联到 {target}", "fb71127e5746a6bc": "从远端“共享与访问”页面或 t3 pair 获取", "1e3fee7084791773": "同时将 {target} 反向关联到 {source}", - "a46df5abb1115c63": "之后 {target} 上的智能体也能以相同权限在 {source} 上工作。这是在 {target} 上创建的第二条关联。", + "ea34a190b0bd804c": "之后 {target} 上的智能体也能在 {source} 上工作。", "ad5ed0ce61b966eb": "忘记 {label}?此处的智能体将停止在那里工作。在 {label} 的“共享与访问”中撤销“T3 Code · …”,以同时结束那里的连接。", "81c9796bf61b306a": "无法移除关联", "130e51beb6cf5aad": "关联环境", diff --git a/docs/user/remote-access.md b/docs/user/remote-access.md index 5eaeadc0d7a48..d95c1915a0989 100644 --- a/docs/user/remote-access.md +++ b/docs/user/remote-access.md @@ -495,9 +495,11 @@ so the map says so and offers to link one at a time instead. Large setups fold: machines known only through links that share the same linking environments and access levels become one stack, and once this app knows more than 12 environments, the ones that are not connected and have no -links fold by state. Select a stack to list and filter every machine in it; -opening a stack on the map draws its first 24. **Find a machine** above the map -searches by name, and Enter goes to the first match. +links fold by state. Select a stack to list and filter every machine in it. +Opening a stack on the map draws its first 24 below its card: the rest of the +map stays where it is and the map grows taller, so pan or press the fit button +to see all of it. **Find a machine** above the map searches by name, and Enter +goes to the first match. The **?** button above the map lists these gestures. The map draws the links of the machines this app is connected to; a machine it is not connected to may hold links the map cannot show. A link reaches one From be5ba32fe2dec00b4c51005c85bb542cc365f325 Mon Sep 17 00:00:00 2001 From: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com> Date: Fri, 20 Nov 2026 12:40:24 -0800 Subject: [PATCH 09/10] fix(web): link-back and environments map follow what the user picked Review fixes for the environments map. - The link dialog's "Also link B back to A" opt-in is cleared when another machine is picked, and the link back runs only when the forward link reached the picked machine (a typed address can answer as another one). - A single ticked machine known only through a link opens the single link flow, which asks for its code, instead of a batch that cannot list it. - Closing a stack after a pan gives back the canvas height its tray took. - A box selection is hit-tested with the view on release, so a zoom made mid-drag no longer ticks the wrong machines. - Panning no longer re-renders the whole scene: the reveal handler passed to it is stable. - A two-way line with one expired direction offers Link back, and a stack row shows its worst incoming link. - The guide states the access needed to link with no pairing code. Co-Authored-By: Claude Fable 5.2 --- .../components/settings/EnvironmentsMap.tsx | 8 +++++--- .../settings/EnvironmentsMapDetails.tsx | 7 +++++-- .../settings/LinkedEnvironmentsSettings.tsx | 10 ++++++++-- .../settings/environmentsMap.logic.test.ts | 18 ++++++++++++++++++ .../settings/environmentsMap.logic.ts | 14 +++++++++----- docs/user/remote-access.md | 3 ++- 6 files changed, 47 insertions(+), 13 deletions(-) diff --git a/apps/web/src/components/settings/EnvironmentsMap.tsx b/apps/web/src/components/settings/EnvironmentsMap.tsx index 86633841eb4ec..172e2ef917093 100644 --- a/apps/web/src/components/settings/EnvironmentsMap.tsx +++ b/apps/web/src/components/settings/EnvironmentsMap.tsx @@ -52,6 +52,7 @@ import { hasCloudPublicConfig } from "~/cloud/publicConfig"; import { isElectron } from "~/env"; import { useLiveRefresh } from "~/hooks/useLiveRefresh"; import { useNowMinute } from "~/hooks/useNowMinute"; +import { useStableCallback } from "~/hooks/useStableCallback"; import { observeResize } from "~/lib/observeResize"; import { cn } from "~/lib/utils"; import { @@ -723,7 +724,7 @@ function FleetCanvas({ }, [canvas]); // Reads the view inside the updater so the scene's props stay the same while panning. - const reveal = (rect: FleetRect) => { + const reveal = useStableCallback((rect: FleetRect) => { if (size === null) return; setManual((current) => { const shown = current?.key === graphKey ? current.view : fitFleetLayout(layout, size); @@ -747,7 +748,7 @@ function FleetCanvas({ }, }; }); - }; + }); const centre = (rect: FleetRect) => { if (size === null || view === null) return; const scale = Math.max(view.scale, FOUND_MIN_SCALE); @@ -841,7 +842,8 @@ function FleetCanvas({ } if (current.mode !== "box" || current.key !== layoutKey) return; const drawn = boxAt(current, event); - const { origin } = current; + // The box is in screen space: a zoom made mid-drag moved the map under it. + const origin = view ?? current.origin; onTick( fleetNodesInBox(layout, { x: (drawn.x - origin.x) / origin.scale, diff --git a/apps/web/src/components/settings/EnvironmentsMapDetails.tsx b/apps/web/src/components/settings/EnvironmentsMapDetails.tsx index 098a61e1e6d36..38c6d8d5eb93b 100644 --- a/apps/web/src/components/settings/EnvironmentsMapDetails.tsx +++ b/apps/web/src/components/settings/EnvironmentsMapDetails.tsx @@ -34,6 +34,7 @@ import { fleetTwoWayLinks, isLinkEdge, linkNeedsAttention, + linkTroubleRank, } from "./environmentsMap.logic"; import { peerLinkStatusText, useForgetPeerLink } from "./LinkedEnvironmentsSettings"; import { savedBackendStatus } from "./SavedEnvironmentRows"; @@ -184,6 +185,9 @@ export function FleetDetails(props: FleetDetailsProps) { sourceLabel={labelOf(link.from)} targetLabel={labelOf(link.to)} onSelect={selectWithin} + {...(fleetLinkBackOffered(graph, link) + ? { onLinkBack: () => props.onLinkBack(link) } + : {})} /> ))}
    @@ -369,8 +373,7 @@ function StackDetails({ if (node.kind === "target") { const into = incoming.get(id) ?? []; const worst = into.toSorted( - (left, right) => - Number(linkNeedsAttention(right.health)) - Number(linkNeedsAttention(left.health)), + (left, right) => linkTroubleRank(left.health) - linkTroubleRank(right.health), )[0]; return [ { diff --git a/apps/web/src/components/settings/LinkedEnvironmentsSettings.tsx b/apps/web/src/components/settings/LinkedEnvironmentsSettings.tsx index d0a32970ec336..1baefa99a469a 100644 --- a/apps/web/src/components/settings/LinkedEnvironmentsSettings.tsx +++ b/apps/web/src/components/settings/LinkedEnvironmentsSettings.tsx @@ -337,7 +337,9 @@ export function LinkEnvironmentDialog({ alsoLinkBack && backOffer.kind === "offered" && linkBack.source !== null && - targetId !== null + targetId !== null && + // A typed address can answer as another machine: the picked one links back only if it did. + result.value.environmentId === targetId ? await linkWithMintedCode({ machine: linkBack.source, access, @@ -415,7 +417,11 @@ export function LinkEnvironmentDialog({ machines={machines} value={selected} disabled={busy} - onChange={setChoice} + onChange={(next) => { + // The opt-in names one machine: it does not carry over to another. + if (next !== selected) setAlsoLinkBack(false); + setChoice(next); + }} /> ) : null} {machine?.linked ? ( diff --git a/apps/web/src/components/settings/environmentsMap.logic.test.ts b/apps/web/src/components/settings/environmentsMap.logic.test.ts index 4b404806543f3..55cd6baf5521c 100644 --- a/apps/web/src/components/settings/environmentsMap.logic.test.ts +++ b/apps/web/src/components/settings/environmentsMap.logic.test.ts @@ -563,6 +563,14 @@ describe("fleetLinkAction", () => { sourceEnvironmentId: id("cups"), machineIds: members, }); + // One such machine alone, ticked and dropped on, is asked for its code like any other. + expect( + fleetLinkAction(graph, stacks, new Set([node("fs-1")]), node("cups"), node("fs-1")), + ).toMatchObject({ + kind: "single", + sourceEnvironmentId: id("cups"), + offer: { path: "pairing-code", target: { kind: "address" } }, + }); // One the client is connected to among them makes it a batch, which says why for the rest. const mixed = new Set([node("fs-1"), node("fs-2"), node("mbp")]); expect(fleetLinkAction(graph, stacks, mixed, node("cups"), node("mbp"))).toEqual({ @@ -1351,6 +1359,16 @@ describe("fitting the view", () => { expect(closedAgain.view.scale).toBe(panned.view.scale); expect(onScreen(closedAgain.view, face)).toEqual(onScreen(panned.view, face)); expect(closedAgain.height).toBeLessThanOrEqual(size.height); + // The canvas that grew for the tray gives that room back, not just the pre-open size. + const grown = { width, height: opened.height }; + const givenBack = anchorFleetView({ + key: "closed", + from: { key: "open", held: panned, view: panned.view, size: grown, face }, + stack: before.stacks.get(stackId)!, + layout: before, + bounds, + }); + expect(givenBack.height).toBeLessThan(opened.height); } }); diff --git a/apps/web/src/components/settings/environmentsMap.logic.ts b/apps/web/src/components/settings/environmentsMap.logic.ts index 288d467a733d8..da1c9b0fceb84 100644 --- a/apps/web/src/components/settings/environmentsMap.logic.ts +++ b/apps/web/src/components/settings/environmentsMap.logic.ts @@ -1741,10 +1741,14 @@ export function fleetLinkAction( known ||= node.kind !== "target"; } if (environmentIds.size === 0) return null; + if (known) return { kind: "batch", sourceEnvironmentId, environmentIds: [...environmentIds] }; + const [only, ...rest] = machineIds; + if (rest.length > 0 || only === undefined) { + return { kind: "code-only", sourceId: source.id, sourceEnvironmentId, machineIds }; + } // One such machine is the single flow's, which asks for its code. - return known || machineIds.length < 2 - ? { kind: "batch", sourceEnvironmentId, environmentIds: [...environmentIds] } - : { kind: "code-only", sourceId: source.id, sourceEnvironmentId, machineIds }; + const offer = fleetLinkOffer(graph, sourceId, only); + return offer.kind === "link" ? { kind: "single", sourceEnvironmentId, offer } : null; }; const stack = targetId === null ? undefined : stacks.find((entry) => entry.id === targetId); if (stack !== undefined) return batch(stack.memberIds); @@ -1897,7 +1901,7 @@ export function anchorFleetView(input: { readonly face: FleetPoint; }; /** The stack and the map after it. */ - readonly stack: Pick; + readonly stack: Pick; readonly layout: Pick; readonly bounds: { readonly min: number; readonly max: number }; }): FleetHeldView { @@ -1922,7 +1926,7 @@ export function anchorFleetView(input: { y: from.view.y + (from.face.y - stack.face.y) * scale, }; const wanted = Math.ceil(view.y + layout.height * scale + padding); - const opened = stack.rect.height > stack.face.height; + const opened = stack.tray !== null; return { key: input.key, view, diff --git a/docs/user/remote-access.md b/docs/user/remote-access.md index a17a275c1e5c4..31398e952ed7a 100644 --- a/docs/user/remote-access.md +++ b/docs/user/remote-access.md @@ -475,7 +475,8 @@ this app, each environment with one line per route (the one in use is highlighted), and the machines an environment links to. Select a machine to manage it, or switch to **List** for the same controls as rows. To link from the map, drag the plus on an environment onto another machine, or press it and -pick one. If this app is connected to both machines it needs no pairing code. +pick one. If this app is connected to both machines and its session on the +other one manages access there, it needs no pairing code. A link goes one way. To let the other machine's agents work back, tick **Also link … back** when you create the link, or select a one-way link and use From a7aff1db18c4c6f221fdb5995108c489c359e2f9 Mon Sep 17 00:00:00 2001 From: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com> Date: Fri, 20 Nov 2026 12:53:40 -0800 Subject: [PATCH 10/10] docs: linking without a code also needs a known address Co-Authored-By: Claude Fable 5.2 --- docs/user/remote-access.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/user/remote-access.md b/docs/user/remote-access.md index 31398e952ed7a..d5ae0c1a73c5c 100644 --- a/docs/user/remote-access.md +++ b/docs/user/remote-access.md @@ -475,8 +475,9 @@ this app, each environment with one line per route (the one in use is highlighted), and the machines an environment links to. Select a machine to manage it, or switch to **List** for the same controls as rows. To link from the map, drag the plus on an environment onto another machine, or press it and -pick one. If this app is connected to both machines and its session on the -other one manages access there, it needs no pairing code. +pick one. If this app is connected to both machines, knows an address the first +can reach the other at, and its session on the other one manages access there, +it needs no pairing code. A link goes one way. To let the other machine's agents work back, tick **Also link … back** when you create the link, or select a one-way link and use