mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-19 11:25:56 +00:00
Fix the dashboard tab: large answers, damaged history files, browser link and realm drop-down
The dashboard now runs through a small launcher that avoids the immediate socket shutdown that cut answers above 64 KB on Windows, supplies the missing level-builds file, removes history files zeroed by a crash, is addressed as 127.0.0.1 and opens in the browser through its own command. The realm drop-down is hidden while both worlds start together. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
838cc07e73
commit
1acbcc2bb5
6 files changed
+121
-7
No files matched your search
@@ -377,6 +377,15 @@ async fn dashboard_install(app: AppHandle, state: State<'_, AppState>, id: Strin
|
||||
blocking(move || coa_core::dashboard::install(&root, &|step| { let _ = app.emit("dashboard-progress", step); })).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn dashboard_open(state: State<'_, AppState>, id: String) -> std::result::Result<(), UiError> {
|
||||
let root = path_of(&state, &id)?;
|
||||
let status = blocking(move || Ok(coa_core::dashboard::status(&root))).await?;
|
||||
if !status.running { return Err(Error::Invalid("The dashboard is not running.".into()).into()); }
|
||||
tauri_plugin_opener::open_url(&status.url, None::<&str>).map_err(|e| Error::Invalid(e.to_string()))?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn dashboard_start(state: State<'_, AppState>, id: String) -> std::result::Result<coa_core::dashboard::Status, UiError> {
|
||||
let root = path_of(&state, &id)?;
|
||||
@@ -1598,6 +1607,7 @@ pub fn run() {
|
||||
dashboard_status,
|
||||
dashboard_install,
|
||||
dashboard_start,
|
||||
dashboard_open,
|
||||
dashboard_stop,
|
||||
backup_location,
|
||||
set_backup_location,
|
||||
|
||||
Reference in new issue
Block a user