feat(examples): add saas settings page fallback

Make the SaaS tutorial's settings route render a distinct full-page fallback while the enhanced handler still swaps the generated page panel and pushes history. This proves page-swap shape without relying only on the enhanced interaction path.

req: examples/001

req: page_swap/002
This commit is contained in:
slhx agent
2026-06-05 10:19:30 +02:00
parent a428097e0e
commit 5ab5846b01
3 changed files with 74 additions and 21 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ use axum::Router;
use futures_util::stream;
use hemx::IntoEffect;
use hemx_axum::{runtime_js, sse, EffectResponse, InteractionRequest};
use hemx_saas_example::{home_page, live_status, registry, ui, AppContext};
use hemx_saas_example::{home_page, live_status, registry, settings_page, ui, AppContext};
use std::collections::BTreeMap;
use std::convert::Infallible;
@@ -37,7 +37,7 @@ async fn home(State(ctx): State<AppContext>) -> impl IntoResponse {
}
async fn settings(State(ctx): State<AppContext>) -> impl IntoResponse {
axum::response::Html(home_page(&ctx).into_string())
axum::response::Html(settings_page(&ctx).into_string())
}
async fn interact(