fix: load and save plugin host settings in the editor and tighten settings row spacing

This commit is contained in:
LukeGus committed 2026-09-29 22:40:01 -05:00
1 parent 1a6f9ffad6
commit 3028ab1176
6 files changed
+66 -10

No files matched your search

+2
View File
@@ -20,6 +20,8 @@
"webUiEndpointLabel": "Endpoint {{number}}",
"webUiIntegration": "Web UI",
"webUiEndpointsSection": "Endpoints",
"webUiNoEndpoints": "No web endpoints yet. Use Add endpoint to create one.",
"webUiEndpointsDisabled": "Turn on Web UI above to add endpoints.",
"webUiRequirementsText": "A direct endpoint is opened by your browser, so its port must be reachable from here. An SSH tunnel is opened by Termix over this host's SSH connection instead, so the port only has to be reachable from the host.",
"enableWebUi": "Enable web endpoints",
"enableWebUiDesc": "Open this host's web interfaces from the sidebar.",
@@ -220,9 +220,17 @@ export function HostEditorWebUiSection({
) : undefined
}
>
<div className="flex flex-col gap-4 py-3">
{enableWebUi && (
<div className="flex flex-col gap-3">
<div className="flex flex-col gap-3 py-3">
{!enableWebUi ? (
<p className="text-xs text-muted-foreground">
{t("hosts.webUiEndpointsDisabled")}
</p>
) : endpoints.length === 0 ? (
<p className="text-xs text-muted-foreground">
{t("hosts.webUiNoEndpoints")}
</p>
) : (
<>
{endpoints.map((endpoint, index) => {
const rowError = webEndpointRowError(endpoint);
return (
@@ -497,7 +505,7 @@ export function HostEditorWebUiSection({
);
})}
{!tunnelAvailable && endpoints.length > 0 && (
{!tunnelAvailable && (
// Shown whenever tunnelling is unavailable, not only once a row
// already asks for it: the Tunnel option renders disabled, and
// a disabled control with no stated reason reads as the
@@ -506,7 +514,7 @@ export function HostEditorWebUiSection({
{t("hosts.webUiAccessTunnelUnavailable")}
</p>
)}
</div>
</>
)}
</div>
</SectionCard>