diff --git a/internal/site/src/components/add-system.tsx b/internal/site/src/components/add-system.tsx index e3a8e1b0f..949d7bdd1 100644 --- a/internal/site/src/components/add-system.tsx +++ b/internal/site/src/components/add-system.tsx @@ -123,14 +123,10 @@ export const SystemDialog = ({ setOpen, system }: { setOpen: (open: boolean) => setHostValue(system?.host ?? "") }} > - + - {system ? ( - Edit System - ) : ( - Add System - )} + {system ? Edit System : Add System} Docker @@ -139,40 +135,55 @@ export const SystemDialog = ({ setOpen, system }: { setOpen: (open: boolean) => - {/* Docker (set tab index to prevent auto focusing content in edit system dialog) */} - - - - Copy the - docker-compose.yml content for the agent - below, or register agents automatically with a{" "} - setOpen(false)} - href={getPagePath($router, "settings", { name: "tokens" })} - className="link" - > - universal token - - . - - - - {/* Binary */} - - - - Copy the installation command for the agent below, or register agents automatically with a{" "} - setOpen(false)} - href={getPagePath($router, "settings", { name: "tokens" })} - className="link" - > - universal token - - . - - - + {/* Keep both translations in the same grid cell so tab changes do not resize the dialog. */} + +
+ {/* Docker (set tab index to prevent auto focusing content in edit system dialog) */} + +

+ + Copy the + docker-compose.yml content for the agent + below, or register agents automatically with a{" "} + setOpen(false)} + href={getPagePath($router, "settings", { name: "tokens" })} + className="link" + > + universal token + + . + +

+
+ {/* Binary */} + +

+ + Copy the installation command for the agent below, or register agents automatically with a{" "} + setOpen(false)} + href={getPagePath($router, "settings", { name: "tokens" })} + className="link" + > + universal token + + . + +

+
+
+
- {/* Docker */} - - - copyDockerCompose(isUnixSocket ? hostValue : port.current?.value, publicKey, token) - } - icon={} - dropdownItems={[ - { - text: t({ message: "Copy docker run", context: "Button to copy docker run command" }), - onClick: async () => - copyDockerRun(isUnixSocket ? hostValue : port.current?.value, publicKey, token), - icons: [DockerIcon], - }, - ]} - /> - - {/* Binary */} - - } - onClick={async () => copyLinuxCommand(isUnixSocket ? hostValue : port.current?.value, publicKey, token)} - dropdownItems={[ - { - text: t({ message: "Homebrew command", context: "Button to copy install command" }), - onClick: async () => - copyLinuxCommand(isUnixSocket ? hostValue : port.current?.value, publicKey, token, true), - icons: [AppleIcon, TuxIcon], - }, - { - text: t({ message: "Windows command", context: "Button to copy install command" }), - onClick: async () => - copyWindowsCommand(isUnixSocket ? hostValue : port.current?.value, publicKey, token), - icons: [WindowsIcon], - }, - { - text: t({ message: "FreeBSD command", context: "Button to copy install command" }), - onClick: async () => - copyLinuxCommand(isUnixSocket ? hostValue : port.current?.value, publicKey, token), - icons: [FreeBsdIcon], - }, - { - text: t`Manual setup instructions`, - url: "https://beszel.dev/guide/agent-installation#binary", - icons: [ExternalLinkIcon], - }, - ]} - /> - +
+ {/* Docker */} +
+ + copyDockerCompose(isUnixSocket ? hostValue : port.current?.value, publicKey, token) + } + icon={} + dropdownItems={[ + { + text: t({ message: "Copy docker run", context: "Button to copy docker run command" }), + onClick: async () => + copyDockerRun(isUnixSocket ? hostValue : port.current?.value, publicKey, token), + icons: [DockerIcon], + }, + ]} + /> +
+ {/* Binary */} +
+ } + onClick={async () => + copyLinuxCommand(isUnixSocket ? hostValue : port.current?.value, publicKey, token) + } + dropdownItems={[ + { + text: t({ message: "Homebrew command", context: "Button to copy install command" }), + onClick: async () => + copyLinuxCommand(isUnixSocket ? hostValue : port.current?.value, publicKey, token, true), + icons: [AppleIcon, TuxIcon], + }, + { + text: t({ message: "Windows command", context: "Button to copy install command" }), + onClick: async () => + copyWindowsCommand(isUnixSocket ? hostValue : port.current?.value, publicKey, token), + icons: [WindowsIcon], + }, + { + text: t({ message: "FreeBSD command", context: "Button to copy install command" }), + onClick: async () => + copyLinuxCommand(isUnixSocket ? hostValue : port.current?.value, publicKey, token), + icons: [FreeBsdIcon], + }, + { + text: t`Manual setup instructions`, + url: "https://beszel.dev/guide/agent-installation#binary", + icons: [ExternalLinkIcon], + }, + ]} + /> +
+
{/* Save */} - +