Fixed UI
All checks were successful
Build and Publish Deb Package / build-deb (push) Successful in 47s
Publish Server Image / build-and-push-image (push) Successful in 2m19s

This commit is contained in:
Ultradesu
2026-03-17 15:17:30 +00:00
parent 754097f894
commit cbc5639f99
9 changed files with 90 additions and 24 deletions

View File

@@ -53,6 +53,12 @@ pub fn build_router(root: PathBuf, token: String, oidc: Option<Arc<OidcState>>)
.with_state(state)
}
async fn player_html() -> axum::response::Html<&'static str> {
axum::response::Html(include_str!("player.html"))
#[derive(Clone)]
pub struct AuthUserInfo(pub String);
async fn player_html(
axum::extract::Extension(user_info): axum::extract::Extension<AuthUserInfo>,
) -> axum::response::Html<String> {
let html = include_str!("player.html").replace("<!-- USERNAME_PLACEHOLDER -->", &user_info.0);
axum::response::Html(html)
}