From 85fe8e9172315a05d8765e597b05bfbfa2a58216 Mon Sep 17 00:00:00 2001 From: alemi Date: Tue, 14 May 2024 04:08:06 +0200 Subject: [PATCH] feat(web): nicer register page (but still broken) --- web/src/page/register.rs | 105 +++++++++++++++++++++++++-------------- 1 file changed, 67 insertions(+), 38 deletions(-) diff --git a/web/src/page/register.rs b/web/src/page/register.rs index 04f5c2b..c6c8563 100644 --- a/web/src/page/register.rs +++ b/web/src/page/register.rs @@ -1,48 +1,77 @@ use leptos::*; +use reqwest::Method; use crate::prelude::*; #[component] pub fn RegisterPage() -> impl IntoView { + let auth = use_context::().expect("missing auth context"); + let username_ref: NodeRef = create_node_ref(); + let password_ref: NodeRef = create_node_ref(); + let display_name_ref: NodeRef = create_node_ref(); + let summary_ref: NodeRef = create_node_ref(); + let avatar_url_ref: NodeRef = create_node_ref(); + let banner_url_ref: NodeRef = create_node_ref(); + let (error, set_error) = create_signal(None); view! { -
+
register -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
username
password

display name
summary
avatar url
banner url

-
+
+
{}, + Err(e) => set_error.set(Some( + view! {
{e.to_string()}
} + )), + } + }); + } > +
username
+
+ +
+ +
password
+
+ +
+ +

+

+ +
display name
+
+ +
+ +
summary
+
+ +
+ +
avatar url
+
+ +
+ +
banner url
+
+ +
+ +

+

+ + +
+
+

{error}

} }