From 0a95647b8e30721656dd4612aaab44cf7117e3dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Sat, 29 Aug 2026 14:12:17 +0100 Subject: [PATCH] once a server has a domain, stop asking for another MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A form offering work nobody came to do. Both servers were pointed at, both had certificates, and the block still showed two empty fields and two buttons — the second address for one site is the rare case, and it lives in Proxy Manager with the rest of the picture. So the field appears only while that server has nothing, and the forward address goes with them: once both are pointed somewhere it configures nothing. `min-w-0` on the input, because a flex child refuses to shrink below its content by default, which is what was pushing "Point here" off the edge of the card. Co-Authored-By: Claude Opus 5 --- web/ProxiesBlock.tsx | 68 +++++++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 23 deletions(-) diff --git a/web/ProxiesBlock.tsx b/web/ProxiesBlock.tsx index 1f8c729..40eb0ad 100644 --- a/web/ProxiesBlock.tsx +++ b/web/ProxiesBlock.tsx @@ -283,31 +283,50 @@ export const ProxiesBlock = ({ servers }: { servers: Server[] }) => { ))} -
- setDomains((current) => ({ ...current, [server.name]: event.target.value }))} - placeholder={server.name === 'production' ? 'www.example.com' : 'dev.example.com'} - className="w-full font-mono text-xs" - autoComplete="off" - spellCheck={false} - /> - -
+ {/* + Only while there is nothing here. + + A server with a domain has been set up, and the field asking for another is a form offering + work nobody came to do — the second address for one site is the rare case, and it lives in + Proxy Manager with the rest of the picture. + + `min-w-0` on the input: without it a flex child refuses to shrink below its content, and the + button beside it gets pushed off the edge of the card. + */} + {mine.length === 0 && ( +
+ setDomains((current) => ({ ...current, [server.name]: event.target.value }))} + placeholder={server.name === 'production' ? 'www.example.com' : 'dev.example.com'} + className="min-w-0 flex-1 font-mono text-xs" + autoComplete="off" + spellCheck={false} + /> + +
+ )} ); }; + // Nothing left to point anywhere: every server already has a domain. + const anythingToCreate = servers.some((server) => !(hosts ?? []).some((host) => host.forward_port === server.port)); + return ( {!hosts ? null : ( @@ -316,8 +335,10 @@ export const ProxiesBlock = ({ servers }: { servers: Server[] }) => { - {/* Shown, not hidden: it is a guess made from other people's configuration, and NPM being in a - container is exactly why `127.0.0.1` would fail in a way that looks like the site is down. */} + {/* Shown while it is still needed, because it is a guess made from other people's configuration + and NPM being in a container is exactly why `127.0.0.1` would fail in a way that looks like + the site is down. Once both servers have a domain it configures nothing, so it goes. */} + {anythingToCreate && (
NPM reaches this machine at { spellCheck={false} />
+ )}

Certificates are proved over DNS with the key Officer holds for the domain, so a name works