Skip to content

Commit b07e38e

Browse files
committed
no emojis on windows
bad terminal support
1 parent 50d2299 commit b07e38e

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

src/webserver/http.rs

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -666,21 +666,28 @@ fn log_welcome_message(config: &AppConfig) {
666666
let port = listen_on.port();
667667
let ip = listen_on.ip();
668668
if ip.is_unspecified() {
669-
format!("http://localhost:{port}\n\
670-
(also accessible from other devices using your IP address)")
669+
format!(
670+
"http://localhost:{port}\n\
671+
(also accessible from other devices using your IP address)"
672+
)
671673
} else {
672674
format!("http://{ip}:{port}")
673675
}
674676
};
675677

678+
let (sparkle, link, computer, rocket) = if cfg!(target_os = "windows") {
679+
("", "", "", "")
680+
} else {
681+
("✨", "🔗", "💻", "🚀")
682+
};
683+
let version = env!("CARGO_PKG_VERSION");
684+
let web_root = config.web_root.display();
685+
676686
println!(
677-
"✨ SQLPage v{} is ready! ✨\n\n\
678-
View your website at:\n🔗 {}\n\n\
679-
Create your pages with SQL files in:\n💻 {}\n\n\
680-
Happy coding! 🚀",
681-
env!("CARGO_PKG_VERSION"),
682-
address_message,
683-
config.web_root.display()
687+
"{sparkle} SQLPage v{version} is ready! {sparkle}\n\n\
688+
View your website at:\n{link} {address_message}\n\n\
689+
Create your pages with SQL files in:\n{computer} {web_root}\n\n\
690+
Happy coding! {rocket}"
684691
);
685692
}
686693

0 commit comments

Comments
 (0)