diff --git a/plugins/web-endpoint/locales/en.json b/plugins/web-endpoint/locales/en.json index 6e633f96d..592190658 100644 --- a/plugins/web-endpoint/locales/en.json +++ b/plugins/web-endpoint/locales/en.json @@ -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.", diff --git a/plugins/web-endpoint/src/frontend/HostEditorWebUiSection.tsx b/plugins/web-endpoint/src/frontend/HostEditorWebUiSection.tsx index 65e128cca..ec7c8dafb 100644 --- a/plugins/web-endpoint/src/frontend/HostEditorWebUiSection.tsx +++ b/plugins/web-endpoint/src/frontend/HostEditorWebUiSection.tsx @@ -220,9 +220,17 @@ export function HostEditorWebUiSection({ ) : undefined } > -
+ {t("hosts.webUiEndpointsDisabled")} +
+ ) : endpoints.length === 0 ? ( ++ {t("hosts.webUiNoEndpoints")} +
+ ) : ( + <> {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")} )} -