Desktop: first-run setup wizard + FlyWithLua/Web-API/Lua-status guidance

Adds the four onboarding pieces that were missing:
- flywithlua_present Tauri command + wizard step that checks the plugin and
  links the FlyWithLua NG+ download when it's absent.
- Wizard step explaining how to enable X-Plane's Web/REST API (Settings>Network).
- FlyWithLua-Sync status row in the live diagnostics, from /api/health.lua
  ('N Skripte aktiv' / 'FlyWithLua fehlt' / 'kein X-Plane').
- 4-step guided wizard (X-Plane folder → FlyWithLua → Web-API → install+start)
  that auto-opens on first launch and is reachable via the header Einrichten
  button; the final step hands off to the normal server start (auto-installs Lua).

Verified the wizard DOM flow + the dLua status against a live bridge.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-04 02:43:32 +02:00
parent 3d6d3f710e
commit 5f63c5032c
4 changed files with 178 additions and 2 deletions
+14
View File
@@ -97,6 +97,19 @@ fn server_running(state: State<ServerState>) -> bool {
state.child.lock().unwrap().is_some()
}
// Is FlyWithLua NG+ installed in this X-Plane? It's the prerequisite for the
// FMS/terrain sync — the bridge auto-installs OUR scripts into its Scripts
// folder, but only if the plugin itself is present. Checked by the setup wizard.
#[tauri::command]
fn flywithlua_present(path: String) -> bool {
!path.is_empty()
&& PathBuf::from(&path)
.join("Resources")
.join("plugins")
.join("FlyWithLua")
.is_dir()
}
#[tauri::command]
async fn start_server(
app: tauri::AppHandle,
@@ -203,6 +216,7 @@ pub fn run() {
suggest_port,
default_xplane_path,
valid_xplane_path,
flywithlua_present,
server_running,
start_server,
stop_server