Add-host: default repo username to hostname; always show htpasswd snippet
The pending page suppressed the htpasswd snippet when repo_username was blank — but with --private-repos the username is required for auth, and operators routinely leave the field blank assuming the system will pick something sensible. * handleUIAddHostPost defaults repo_username to the typed hostname when blank. Matches what --private-repos expects (URL path segment == username). * pending_host.html: snippet now renders whenever a password is present (always true after the generate-on-blank logic landed earlier). * Form help-text updated to describe the default explicitly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
the host detail.
|
||||
</p>
|
||||
|
||||
{{if and $page.RepoUsername $page.RepoPassword}}
|
||||
{{if $page.RepoPassword}}
|
||||
<div class="snippet mt-6 panel" style="border-color: color-mix(in oklch, var(--warn), transparent 60%);">
|
||||
<div class="snippet-head" style="background: color-mix(in oklch, var(--warn), transparent 92%);">
|
||||
<span>
|
||||
|
||||
Reference in New Issue
Block a user