Change default UI from minimal to suite
This commit is contained in:
parent
718afeb4b6
commit
f12e858f74
2 changed files with 7 additions and 7 deletions
|
|
@ -14,9 +14,9 @@ use std::{fs, path::PathBuf};
|
|||
|
||||
use crate::shared::AppState;
|
||||
|
||||
/// Serve the index page (minimal UI)
|
||||
/// Serve the index page (suite UI)
|
||||
pub async fn index() -> impl IntoResponse {
|
||||
serve_minimal().await
|
||||
serve_suite().await
|
||||
}
|
||||
|
||||
/// Handler for minimal UI
|
||||
|
|
@ -85,7 +85,7 @@ async fn api_health() -> (StatusCode, axum::Json<serde_json::Value>) {
|
|||
/// Configure and return the main router
|
||||
pub fn configure_router() -> Router {
|
||||
let suite_path = PathBuf::from("./ui/suite");
|
||||
let minimal_path = PathBuf::from("./ui/minimal");
|
||||
let _minimal_path = PathBuf::from("./ui/minimal");
|
||||
let state = AppState::new();
|
||||
|
||||
Router::new()
|
||||
|
|
@ -154,10 +154,10 @@ pub fn configure_router() -> Router {
|
|||
"/tasks",
|
||||
tower_http::services::ServeDir::new(suite_path.join("tasks")),
|
||||
)
|
||||
// Fallback for other static files
|
||||
// Fallback for other static files (serve suite by default)
|
||||
.fallback_service(
|
||||
tower_http::services::ServeDir::new(minimal_path.clone()).fallback(
|
||||
tower_http::services::ServeDir::new(minimal_path)
|
||||
tower_http::services::ServeDir::new(suite_path.clone()).fallback(
|
||||
tower_http::services::ServeDir::new(suite_path)
|
||||
.append_index_html_on_directories(true),
|
||||
),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<script>
|
||||
// BotServer URL - configurable via window.BOTSERVER_URL or defaults to same origin port 8088
|
||||
const BOTSERVER_URL =
|
||||
window.BOTSERVER_URL || "http://localhost:8088";
|
||||
window.BOTSERVER_URL || "https://localhost:8088";
|
||||
const BOTSERVER_WS_URL = BOTSERVER_URL.replace(
|
||||
"https://",
|
||||
"wss://",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue