feat: new UI

This commit is contained in:
2024-09-24 13:49:17 +01:00
parent c8da87e0dd
commit 9bcdeabda8
55 changed files with 6732 additions and 189 deletions

View File

@ -134,7 +134,11 @@ async fn delete_file(
#[rocket::get("/")]
pub async fn root() -> Result<NamedFile, Status> {
if let Ok(f) = NamedFile::open("./ui/index.html").await {
#[cfg(debug_assertions)]
let index = "./ui_src/dist/index.html";
#[cfg(not(debug_assertions))]
let index = "./ui/index.html";
if let Ok(f) = NamedFile::open(index).await {
Ok(f)
} else {
Err(Status::InternalServerError)