File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,21 @@ fn root_favicon(state: &State<ServerState>) -> Option<(ContentType, Vec<u8>)> {
8686 get_file ( "favicon.ico" . into ( ) , state)
8787}
8888
89+ #[ get( "/dark.css" ) ]
90+ fn root_dark ( state : & State < ServerState > ) -> Option < ( ContentType , Vec < u8 > ) > {
91+ get_file ( "dark.css" . into ( ) , state)
92+ }
93+
94+ #[ get( "/logo.png" ) ]
95+ fn root_logo ( state : & State < ServerState > ) -> Option < ( ContentType , Vec < u8 > ) > {
96+ get_file ( "logo.png" . into ( ) , state)
97+ }
98+
99+ #[ get( "/manifest.json" ) ]
100+ fn root_manifest ( state : & State < ServerState > ) -> Option < ( ContentType , Vec < u8 > ) > {
101+ get_file ( "manifest.json" . into ( ) , state)
102+ }
103+
89104#[ get( "/" ) ]
90105fn server_info ( config : & State < AWConfig > , state : & State < ServerState > ) -> Json < Info > {
91106 #[ allow( clippy:: or_fun_call) ]
@@ -136,6 +151,10 @@ pub fn build_rocket(server_state: ServerState, config: AWConfig) -> rocket::Rock
136151 root_css,
137152 root_js,
138153 root_static,
154+ // custom static files
155+ root_dark,
156+ root_logo,
157+ root_manifest
139158 ] ,
140159 )
141160 . mount ( "/api/0/info" , routes ! [ server_info] )
You can’t perform that action at this time.
0 commit comments