mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-07 03:00:29 +00:00
feat(install): show copyable install token in server start banner
Color the install URL and add a separate block that prints the install token on its own line so users can copy it without parsing the query string. The token block shows in both the URL and reverse-proxy branches. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
68214575e3
commit
701598a472
1 changed files with 4 additions and 1 deletions
|
|
@ -222,7 +222,7 @@ fn announce_install_mode(bind: &Bind, token: &str, styles: &Styles, printer: Pri
|
|||
match install_url_hint(bind, token) {
|
||||
Some(url) => {
|
||||
fabro_util::printerr!(printer, " Open this URL in your browser to finish setup:");
|
||||
fabro_util::printerr!(printer, " {url}");
|
||||
fabro_util::printerr!(printer, " {}", styles.cyan.apply_to(&url));
|
||||
if let Err(e) = browser::try_open(&url) {
|
||||
fabro_util::printerr!(printer, "");
|
||||
fabro_util::printerr!(printer, " Could not open a browser automatically: {e}");
|
||||
|
|
@ -237,6 +237,9 @@ fn announce_install_mode(bind: &Bind, token: &str, styles: &Styles, printer: Pri
|
|||
}
|
||||
}
|
||||
fabro_util::printerr!(printer, "");
|
||||
fabro_util::printerr!(printer, " If prompted, paste the install token:");
|
||||
fabro_util::printerr!(printer, " {}", styles.bold_cyan.apply_to(token));
|
||||
fabro_util::printerr!(printer, "");
|
||||
fabro_util::printerr!(
|
||||
printer,
|
||||
"{}",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue