chore: various style changes throughout the app
This commit is contained in:
1 parent
081d4ca5ca
commit
0b2dc1b0c1
4 files changed
+36
-28
No files matched your search
@@ -8,7 +8,7 @@ pub fn ActionButton(
|
|||||||
) -> impl IntoView {
|
) -> impl IntoView {
|
||||||
view! {
|
view! {
|
||||||
<button
|
<button
|
||||||
class="m-1.5 p-2.5 rounded-lg font-semibold text-white transition-all duration-400 cursor-pointer"
|
class="m-1.5 p-2.5 min-w-20 rounded-lg font-semibold text-white transition-all duration-400 cursor-pointer"
|
||||||
class=(["bg-red-800", "hover:bg-red-900"], move || !disabled.get())
|
class=(["bg-red-800", "hover:bg-red-900"], move || !disabled.get())
|
||||||
class=(["bg-gray-600", "pointer-events-none"], move || disabled.get())
|
class=(["bg-gray-600", "pointer-events-none"], move || disabled.get())
|
||||||
r#type=button_type
|
r#type=button_type
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ pub fn Radio(
|
|||||||
/>
|
/>
|
||||||
// This div displays the box for the checkbox, and applies some styling to the child
|
// This div displays the box for the checkbox, and applies some styling to the child
|
||||||
// span element.
|
// span element.
|
||||||
<div class="relative inline-block h-5 w-5 m-1 mr-2 rounded-full border border-gray-300 bg-white
|
<div class="relative inline-block h-5 w-5 m-1 mr-2 rounded-full border border-gray-400 bg-white
|
||||||
transition-bg duration-200 peer-checked:bg-red-700 peer-checked:border-red-700
|
transition-bg duration-200 peer-checked:bg-red-700 peer-checked:border-red-700
|
||||||
[&>span]:opacity-0 peer-checked:[&>span]:opacity-100
|
[&>span]:opacity-0 peer-checked:[&>span]:opacity-100
|
||||||
peer-disabled:bg-gray-600/33 peer-disabled:border-gray-600
|
peer-disabled:bg-gray-600/33 peer-disabled:border-gray-600
|
||||||
@@ -107,7 +107,7 @@ fn RadioOther(
|
|||||||
/>
|
/>
|
||||||
// This div displays the box for the checkbox, and applies some styling to the child
|
// This div displays the box for the checkbox, and applies some styling to the child
|
||||||
// span element.
|
// span element.
|
||||||
<div class="relative inline-block min-h-5 min-w-5 h-5 w-5 m-1 mr-2 rounded-full border border-gray-300 bg-white
|
<div class="relative inline-block min-h-5 min-w-5 h-5 w-5 m-1 mr-2 rounded-full border border-gray-400 bg-white
|
||||||
transition-bg duration-200 peer-checked:bg-red-700 peer-checked:border-red-700
|
transition-bg duration-200 peer-checked:bg-red-700 peer-checked:border-red-700
|
||||||
[&>span]:opacity-0 peer-checked:[&>span]:opacity-100
|
[&>span]:opacity-0 peer-checked:[&>span]:opacity-100
|
||||||
peer-disabled:bg-gray-600/33 peer-disabled:border-gray-600
|
peer-disabled:bg-gray-600/33 peer-disabled:border-gray-600
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ pub fn AuthCallbackPage() -> impl IntoView {
|
|||||||
|
|
||||||
view! {
|
view! {
|
||||||
<div class="flex flex-col w-full mx-auto items-center justify-center">
|
<div class="flex flex-col w-full mx-auto items-center justify-center">
|
||||||
<p>"Completing the login process..."</p>
|
<p class="text-xl font-bold mt-10 mx-auto">"Logging you in..."</p>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -175,26 +175,7 @@ fn ScholarshipList(
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
view! {
|
let modal_on_click_continue = move |_| {
|
||||||
<dialog node_ref=delete_dialog_ref class="m-auto p-2">
|
|
||||||
<h2 class="text-2xl font-bold">"Confirm Deletion"</h2>
|
|
||||||
<p>
|
|
||||||
"Are you sure you want to delete "
|
|
||||||
{move || {
|
|
||||||
pending_delete
|
|
||||||
.get()
|
|
||||||
.map(|s| {
|
|
||||||
s.data
|
|
||||||
.get("name")
|
|
||||||
.unwrap_or(&ValueType::String(None))
|
|
||||||
.as_string()
|
|
||||||
.unwrap_or_default()
|
|
||||||
.unwrap_or("<no name found>".to_string())
|
|
||||||
})
|
|
||||||
}} "?"
|
|
||||||
</p>
|
|
||||||
<ActionButton
|
|
||||||
on:click=move |_| {
|
|
||||||
let subject = pending_delete
|
let subject = pending_delete
|
||||||
.get()
|
.get()
|
||||||
.map(|s| s.subject.clone())
|
.map(|s| s.subject.clone())
|
||||||
@@ -205,12 +186,36 @@ fn ScholarshipList(
|
|||||||
scholarship_id: subject,
|
scholarship_id: subject,
|
||||||
provider_id: provider_id.get().unwrap_or_default(),
|
provider_id: provider_id.get().unwrap_or_default(),
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
disabled=modal_disabled
|
|
||||||
|
view! {
|
||||||
|
<dialog
|
||||||
|
node_ref=delete_dialog_ref
|
||||||
|
class="m-auto p-5 rounded-lg shadow-xl/50
|
||||||
|
backdrop:backdrop-blur-xs backdrop:transition-backdrop-filter"
|
||||||
>
|
>
|
||||||
"Confirm"
|
<h2 class="text-2xl font-bold">"Confirm Deletion"</h2>
|
||||||
|
<p class="mb-3">
|
||||||
|
"Are you sure you want to delete "
|
||||||
|
{move || {
|
||||||
|
pending_delete
|
||||||
|
.get()
|
||||||
|
.map(|s| {
|
||||||
|
s.data
|
||||||
|
.get("name")
|
||||||
|
.unwrap_or(&ValueType::String(None))
|
||||||
|
.as_string()
|
||||||
|
.unwrap_or_default()
|
||||||
|
.unwrap_or("this unnamed scholarship".to_string())
|
||||||
|
})
|
||||||
|
}} "?"
|
||||||
|
</p>
|
||||||
|
<div class="flex mx-auto items-center justify-center">
|
||||||
|
<ActionButton on:click=modal_on_click_continue disabled=modal_disabled>
|
||||||
|
"Yes"
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
<ActionButton on:click=move |_| pending_delete.set(None)>"Cancel"</ActionButton>
|
<ActionButton on:click=move |_| pending_delete.set(None)>"No"</ActionButton>
|
||||||
|
</div>
|
||||||
</dialog>
|
</dialog>
|
||||||
<div class="w-75">
|
<div class="w-75">
|
||||||
<Panel>
|
<Panel>
|
||||||
@@ -631,6 +636,7 @@ fn ScholarshipForm(
|
|||||||
data_map=chips_data
|
data_map=chips_data
|
||||||
values=gpa_ids
|
values=gpa_ids
|
||||||
displayed_text=gpa_text
|
displayed_text=gpa_text
|
||||||
|
allows_multiple=false
|
||||||
/>
|
/>
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
@@ -649,6 +655,7 @@ fn ScholarshipForm(
|
|||||||
data_map=chips_data
|
data_map=chips_data
|
||||||
values=comm_ids
|
values=comm_ids
|
||||||
displayed_text=comm_text
|
displayed_text=comm_text
|
||||||
|
allows_multiple=false
|
||||||
/>
|
/>
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
@@ -658,6 +665,7 @@ fn ScholarshipForm(
|
|||||||
data_map=chips_data
|
data_map=chips_data
|
||||||
values=res_ids
|
values=res_ids
|
||||||
displayed_text=res_text
|
displayed_text=res_text
|
||||||
|
allows_multiple=false
|
||||||
/>
|
/>
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
|
|||||||
Reference in new issue
Block a user