diff --git a/web/src/app.rs b/web/src/app.rs index 9bc310ba..9f2a3071 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 0b296490..4e49f42d 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 3e02b2a6..324675b6 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())}
+			
+
+ } +}