update
This commit is contained in:
parent
5ae9b80302
commit
8daef6920c
9 changed files with 158 additions and 135 deletions
17
src/main.rs
17
src/main.rs
|
@ -1,5 +1,8 @@
|
|||
use based::asset::AssetRoutes;
|
||||
use based::auth::User;
|
||||
use based::get_pg;
|
||||
use based::ui::components::Shell;
|
||||
use based::ui::prelude::*;
|
||||
use config::Config;
|
||||
use rocket::routes;
|
||||
|
||||
|
@ -19,9 +22,20 @@ async fn launch() -> _ {
|
|||
|
||||
let _ = User::create("admin".to_string(), "admin", based::auth::UserRole::Admin).await;
|
||||
|
||||
let shell = Shell::new(
|
||||
Nothing(),
|
||||
Nothing(),
|
||||
Background(MinHeight(
|
||||
ScreenValue::screen,
|
||||
Padding(Text("").color(&Gray::_200)).all(ScreenValue::_10),
|
||||
))
|
||||
.color(Gray::_900),
|
||||
)
|
||||
.use_ui();
|
||||
|
||||
rocket::build()
|
||||
.mount_assets()
|
||||
.mount("/", routes![
|
||||
based::htmx::htmx_script_route,
|
||||
routes::index_page,
|
||||
routes::pkg_route,
|
||||
routes::push::upload_pkg,
|
||||
|
@ -36,4 +50,5 @@ async fn launch() -> _ {
|
|||
routes::user::change_password_post
|
||||
])
|
||||
.manage(config)
|
||||
.manage(shell)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue