style: fix leptosfmt commands
This commit is contained in:
1 parent
0d4b769491
commit
1b6d7f21f7
1 file changed
+28
-19
+28
-19
@@ -158,18 +158,20 @@ 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
|
||||||
|
.get()
|
||||||
|
.map(|submission: StudentInfo| {
|
||||||
let reactive_info = StudentInfoReactive::new(submission);
|
let reactive_info = StudentInfoReactive::new(submission);
|
||||||
|
|
||||||
let select_value = RwSignal::new(String::from("Math"));
|
let select_value = RwSignal::new(String::from("Math"));
|
||||||
let chk_select = RwSignal::new(vec!["Testing 2".into()]);
|
let chk_select = RwSignal::new(vec!["Testing 2".into()]);
|
||||||
|
|
||||||
let elements_disabled = RwSignal::new(false);
|
let elements_disabled = RwSignal::new(false);
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<div class="flex flex-row">
|
<div class="flex flex-row">
|
||||||
<Panel>
|
<Panel>
|
||||||
<p>"Testing paragraph! This panel should be the same size as the other."</p>
|
<p>
|
||||||
|
"Testing paragraph! This panel should be the same size as the other."
|
||||||
|
</p>
|
||||||
</Panel>
|
</Panel>
|
||||||
<Panel>
|
<Panel>
|
||||||
<Row>
|
<Row>
|
||||||
@@ -183,43 +185,50 @@ pub fn HomePage() -> impl IntoView {
|
|||||||
label="First Name:"
|
label="First Name:"
|
||||||
placeholder="John"
|
placeholder="John"
|
||||||
disabled=elements_disabled
|
disabled=elements_disabled
|
||||||
value=reactive_info.first_name />
|
value=reactive_info.first_name
|
||||||
|
/>
|
||||||
<OutlinedTextField
|
<OutlinedTextField
|
||||||
label="Last Name:"
|
label="Last Name:"
|
||||||
placeholder="Smith"
|
placeholder="Smith"
|
||||||
disabled=elements_disabled
|
disabled=elements_disabled
|
||||||
value=reactive_info.last_name />
|
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()
|
||||||
|
.map(|s| s.into())
|
||||||
|
.collect()
|
||||||
value=select_value
|
value=select_value
|
||||||
disabled=elements_disabled
|
disabled=elements_disabled
|
||||||
/>
|
/>
|
||||||
<CheckboxList
|
<CheckboxList
|
||||||
selected=chk_select
|
selected=chk_select
|
||||||
items=vec!["Testing 1", "Testing 2"]
|
items=vec!["Testing 1", "Testing 2"]
|
||||||
.into_iter().map(|s| s.into()).collect()
|
.into_iter()
|
||||||
disabled=elements_disabled />
|
.map(|s| s.into())
|
||||||
|
.collect()
|
||||||
|
disabled=elements_disabled
|
||||||
|
/>
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
<ActionButton
|
<ActionButton on:click=move |_| {
|
||||||
on:click=move |_| {
|
console_log(
|
||||||
console_log(format!("Found value {:?}", chk_select.get()).as_str());
|
format!("Found value {:?}", chk_select.get()).as_str(),
|
||||||
submit_action.dispatch(CreateSampleSubmission {
|
);
|
||||||
|
submit_action
|
||||||
|
.dispatch(CreateSampleSubmission {
|
||||||
student_info: reactive_info.capture(),
|
student_info: reactive_info.capture(),
|
||||||
subject: user_claims.get().unwrap().claims.subject.clone()
|
subject: user_claims.get().unwrap().claims.subject.clone(),
|
||||||
});
|
});
|
||||||
}
|
}>"Submit"</ActionButton>
|
||||||
>
|
|
||||||
"Submit"
|
|
||||||
</ActionButton>
|
|
||||||
</Row>
|
</Row>
|
||||||
</Panel>
|
</Panel>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user