diff --git a/web/src/app.rs b/web/src/app.rs index 9bc310b..9f2a307 100644 --- a/web/src/app.rs +++ b/web/src/app.rs @@ -99,6 +99,8 @@ pub fn App() -> impl IntoView { } /> } /> + + } /> diff --git a/web/src/control.rs b/web/src/control.rs index 0b29649..4e49f42 100644 --- a/web/src/control.rs +++ b/web/src/control.rs @@ -10,7 +10,7 @@ pub fn Navigator() -> impl IntoView { - + } } diff --git a/web/src/page.rs b/web/src/page.rs index 3e02b2a..324675b 100644 --- a/web/src/page.rs +++ b/web/src/page.rs @@ -196,3 +196,39 @@ pub fn TimelinePage(name: &'static str, tl: Timeline) -> impl IntoView { } } + +#[component] +pub fn DebugPage() -> impl IntoView { + let url_ref: NodeRef = create_node_ref(); + let (object, set_object) = create_signal(serde_json::Value::String( + "use this view to fetch remote AP objects and inspect their content".into()) + ); + let auth = use_context::().expect("missing auth context"); + view! { +
+ debug +
+ + + + + +
+ (&url, auth).await { + Ok(x) => set_object.set(x), + Err(e) => set_object.set(serde_json::Value::String(e.to_string())), + } + }); + } /> +
+
+
+				{move || serde_json::to_string_pretty(&object.get()).unwrap_or("unserializable".to_string())}
+			
+
+ } +}