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