From 03e6e867ef9427b32c8af26eff12985d928f723a Mon Sep 17 00:00:00 2001 From: Lu Yang Date: Thu, 22 Aug 2024 22:04:13 +0100 Subject: [PATCH] style changes --- lapdev-dashboard/src/audit_log.rs | 156 +++++++++++++------------- lapdev-dashboard/src/organization.rs | 2 +- lapdev-dashboard/src/usage.rs | 159 ++++++++++++++------------- 3 files changed, 161 insertions(+), 156 deletions(-) diff --git a/lapdev-dashboard/src/audit_log.rs b/lapdev-dashboard/src/audit_log.rs index b6b9197..915f088 100644 --- a/lapdev-dashboard/src/audit_log.rs +++ b/lapdev-dashboard/src/audit_log.rs @@ -150,91 +150,93 @@ pub fn AuditLogView() -> impl IntoView {

{"View your organization's audit logs"}

-
- - to - - -
- { move || if let Some(error) = error.get() { - view! { -
- { error } -
- }.into_view() - } else { - view!{}.into_view() - }} - -
- - {"Showing "} - - {move || format!("{}-{}", audit_logs.with(|a| if a.records.is_empty() {0} else {1} + a.page * a.page_size ), audit_logs.with(|a| if a.records.is_empty() {0} else {a.records.len() as u64} + a.page * a.page_size ))} - - {" of "} - {move || audit_logs.with(|a| a.total_items)} - +
-

{"rows per page"}

- - + Search + +
+ { move || if let Some(error) = error.get() { + view! { +
+ { error } +
+ }.into_view() + } else { + view!{}.into_view() + }} - - - - = a.num_pages)) - class=("cursor-pointer", move || !audit_logs.with(|a| a.page + 1 >= a.num_pages)) - class=("hover:bg-gray-100", move || !audit_logs.with(|a| a.page + 1 >= a.num_pages)) - on:click=next_page - > - +
+ + {"Showing "} + + {move || format!("{}-{}", audit_logs.with(|a| if a.records.is_empty() {0} else {1} + a.page * a.page_size ), audit_logs.with(|a| if a.records.is_empty() {0} else {a.records.len() as u64} + a.page * a.page_size ))} + + {" of "} + {move || audit_logs.with(|a| a.total_items)} +
+

{"rows per page"}

+ + + + + + + = a.num_pages)) + class=("cursor-pointer", move || !audit_logs.with(|a| a.page + 1 >= a.num_pages)) + class=("hover:bg-gray-100", move || !audit_logs.with(|a| a.page + 1 >= a.num_pages)) + on:click=next_page + > + + +
-
-
- Time - User - Action - Resource -
+
+ Time + User + Action + Resource +
- + + } } - } - /> + /> +
} } diff --git a/lapdev-dashboard/src/organization.rs b/lapdev-dashboard/src/organization.rs index 43fceef..c290209 100644 --- a/lapdev-dashboard/src/organization.rs +++ b/lapdev-dashboard/src/organization.rs @@ -357,7 +357,7 @@ pub fn DeleteOrgModal( } }
-

{"1. You'll lose all the projects in this organization and this cannot be restored."}

+

{"1. You'll lose all the projects and workspaces in this organization and this cannot be restored."}

{"2. All organization members will lose access to this organization and all the associated workspaces."}

diff --git a/lapdev-dashboard/src/usage.rs b/lapdev-dashboard/src/usage.rs index acfedc1..8f675d5 100644 --- a/lapdev-dashboard/src/usage.rs +++ b/lapdev-dashboard/src/usage.rs @@ -156,91 +156,94 @@ pub fn UsageView() -> impl IntoView {

{"View your organization's usage"}

-
- - to - - -
- { move || if let Some(error) = error.get() { - view! { -
- { error } -
- }.into_view() - } else { - view!{}.into_view() - }} -
- - {"Showing "} - - {move || format!("{}-{}", usage.with(|u| if u.records.is_empty() {0} else {1} + u.page * u.page_size ), usage.with(|u| if u.records.is_empty() {0} else {u.records.len() as u64} + u.page * u.page_size ))} - - {" of "} - {move || usage.with(|u| u.total_items)} - -

{"Total Cost:"}{move || usage.with(|u| format_cost(u.total_cost))}

-
-

{"rows per page"}

- - - - - - = u.num_pages)) - class=("cursor-pointer", move || !usage.with(|u| u.page + 1 >= u.num_pages)) - class=("hover:bg-gray-100", move || !usage.with(|u| u.page + 1 >= u.num_pages)) - on:click=next_page +
+
+ + to + + +
+ { move || if let Some(error) = error.get() { + view! { +
+ { error } +
+ }.into_view() + } else { + view!{}.into_view() + }} +
+ + {"Showing "} + + {move || format!("{}-{}", usage.with(|u| if u.records.is_empty() {0} else {1} + u.page * u.page_size ), usage.with(|u| if u.records.is_empty() {0} else {u.records.len() as u64} + u.page * u.page_size ))} + + {" of "} + {move || usage.with(|u| u.total_items)} +

{"Total Cost:"}{move || usage.with(|u| format_cost(u.total_cost))}

+
+

{"rows per page"}

+ + + + + + + = u.num_pages)) + class=("cursor-pointer", move || !usage.with(|u| u.page + 1 >= u.num_pages)) + class=("hover:bg-gray-100", move || !usage.with(|u| u.page + 1 >= u.num_pages)) + on:click=next_page + > + + +
-
-
- Resource Type - Resource Name - Cost - User -
+
+ Resource Type + Resource Name + Cost + User +
- + + } } - } - /> + /> +
} }