style: fix leptosfmt commands

This commit is contained in:
alphafetus committed 2025-08-28 11:23:41 -04:00
1 parent 0d4b769491
commit 1b6d7f21f7
1 file changed
+75 -66
+75 -66
View File
@@ -158,73 +158,82 @@ pub fn HomePage() -> impl IntoView {
// Replace this fallback with a real loading screen. // Replace this fallback with a real loading screen.
<Suspense fallback=Loading> <Suspense fallback=Loading>
{move || { {move || {
server_resource.get().map(|submission: StudentInfo| { server_resource
let reactive_info = StudentInfoReactive::new(submission); .get()
.map(|submission: StudentInfo| {
let reactive_info = StudentInfoReactive::new(submission);
let select_value = RwSignal::new(String::from("Math"));
let chk_select = RwSignal::new(vec!["Testing 2".into()]);
let elements_disabled = RwSignal::new(false);
let select_value = RwSignal::new(String::from("Math")); view! {
let chk_select = RwSignal::new(vec!["Testing 2".into()]); <div class="flex flex-row">
<Panel>
let elements_disabled = RwSignal::new(false); <p>
"Testing paragraph! This panel should be the same size as the other."
view! { </p>
<div class="flex flex-row"> </Panel>
<Panel> <Panel>
<p>"Testing paragraph! This panel should be the same size as the other."</p> <Row>
</Panel> <p>
<Panel> "Current user's reported full name from the API: "
<Row> {reactive_info.first_name}" "{reactive_info.last_name}
<p> </p>
"Current user's reported full name from the API: " </Row>
{reactive_info.first_name}" "{reactive_info.last_name} <Row>
</p> <OutlinedTextField
</Row> label="First Name:"
<Row> placeholder="John"
<OutlinedTextField disabled=elements_disabled
label="First Name:" value=reactive_info.first_name
placeholder="John" />
disabled=elements_disabled <OutlinedTextField
value=reactive_info.first_name /> label="Last Name:"
<OutlinedTextField placeholder="Smith"
label="Last Name:" disabled=elements_disabled
placeholder="Smith" value=reactive_info.last_name
disabled=elements_disabled />
value=reactive_info.last_name /> <OutlinedTextField
<OutlinedTextField label="Contact Email"
label="Contact Email" placeholder="temp@region15.org"
placeholder="temp@region15.org" disabled=elements_disabled
disabled=elements_disabled value=reactive_info.student_email
value=reactive_info.student_email /> />
</Row> </Row>
<Row> <Row>
<Select <Select
value_list = vec!["Math", "English", "Science"] value_list=vec!["Math", "English", "Science"]
.into_iter().map(|s| s.into()).collect() .into_iter()
value = select_value .map(|s| s.into())
disabled=elements_disabled .collect()
/> value=select_value
<CheckboxList disabled=elements_disabled
selected = chk_select />
items = vec!["Testing 1", "Testing 2"] <CheckboxList
.into_iter().map(|s| s.into()).collect() selected=chk_select
disabled=elements_disabled /> items=vec!["Testing 1", "Testing 2"]
</Row> .into_iter()
<Row> .map(|s| s.into())
<ActionButton .collect()
on:click=move |_| { disabled=elements_disabled
console_log(format!("Found value {:?}", chk_select.get()).as_str()); />
submit_action.dispatch(CreateSampleSubmission { </Row>
student_info: reactive_info.capture(), <Row>
subject: user_claims.get().unwrap().claims.subject.clone() <ActionButton on:click=move |_| {
}); console_log(
} format!("Found value {:?}", chk_select.get()).as_str(),
> );
"Submit" submit_action
</ActionButton> .dispatch(CreateSampleSubmission {
</Row> student_info: reactive_info.capture(),
</Panel> subject: user_claims.get().unwrap().claims.subject.clone(),
</div> });
} }>"Submit"</ActionButton>
}) </Row>
</Panel>
</div>
}
})
}} }}
</Suspense> </Suspense>
</Authenticated> </Authenticated>