@@ -3,19 +3,17 @@ use std::env;
33use atty:: Stream ;
44use colored:: { Color , ColoredString , Colorize } ;
55
6- use crate :: settings:: Settings ;
7-
86fn paint ( text : & str , true_color : bool ) -> ColoredString {
97 if true_color {
10- text. bold ( ) . truecolor ( 184 , 20 , 56 )
8+ text. bold ( ) . truecolor ( 70 , 144 , 239 )
119 } else {
12- text. bold ( ) . color ( Color :: Red )
10+ text. bold ( ) . color ( Color :: Blue )
1311 }
1412}
1513
1614/// Prints welcome message
1715#[ rustfmt:: skip]
18- pub fn welcome ( settings : & Settings ) {
16+ pub fn welcome ( ) {
1917 if !atty:: is ( Stream :: Stdout ) {
2018 colored:: control:: set_override ( false ) ;
2119 }
@@ -29,22 +27,11 @@ pub fn welcome(settings: &Settings) {
2927 Err ( _) => true_color = false ,
3028 }
3129
32- println ! ( "{}" , paint( r#" _ _ "# , true_color) ) ;
33- println ! ( "{}" , paint( r#" __ _ __| |_ __ __ _ _ __ | |_ "# , true_color) ) ;
34- println ! ( "{}" , paint( r#" / _` |/ _` | '__/ _` | '_ \| __| "# , true_color) ) ;
35- println ! ( "{}" , paint( r#"| (_| | (_| | | | (_| | | | | |_ "# , true_color) ) ;
36- println ! ( "{}" , paint( r#" \__, |\__,_|_| \__,_|_| |_|\__| "# , true_color) ) ;
37- println ! ( "{}" , paint( r#" |_| "# , true_color) ) ;
38- println ! ( ) ;
39- let ui_link = format ! (
40- "http{}://localhost:{}/dashboard" ,
41- if settings. service. enable_tls { "s" } else { "" } ,
42- settings. service. http_port
43- ) ;
44-
45- println ! ( "{} {}" ,
46- "Access web UI at" . truecolor( 134 , 186 , 144 ) ,
47- ui_link. bold( ) . underline( ) . truecolor( 82 , 139 , 183 ) ) ;
30+ println ! ( "{}" , paint( r#" _________ _________ ________ _________ "# , true_color) ) ;
31+ println ! ( "{}" , paint( r#" __ ____/___________ /________ _/____________ /________ __"# , true_color) ) ;
32+ println ! ( "{}" , paint( r#" _ / _ __ \ __ /_ _ \__ / __ __ \ __ /_ _ \_ |/_/"# , true_color) ) ;
33+ println ! ( "{}" , paint( r#" / /___ / /_/ / /_/ / / __/_/ / _ / / / /_/ / / __/_> < "# , true_color) ) ;
34+ println ! ( "{}" , paint( r#" \____/ \____/\__,_/ \___//___/ /_/ /_/\__,_/ \___//_/|_| "# , true_color) ) ;
4835 println ! ( ) ;
4936}
5037
@@ -54,6 +41,6 @@ mod tests {
5441
5542 #[ test]
5643 fn test_welcome ( ) {
57- welcome ( & Settings :: new ( None ) . unwrap ( ) ) ;
44+ welcome ( ) ;
5845 }
5946}
0 commit comments