This commit is contained in:
JMARyA 2025-01-26 10:52:02 +01:00
parent 5ae9b80302
commit 8daef6920c
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
9 changed files with 158 additions and 135 deletions

View file

@ -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)
}