From aa8cbcef23b20c31eb08a4f869db266a2a8bdc99 Mon Sep 17 00:00:00 2001 From: Shubhranshu Sanjeev Date: Thu, 2 May 2024 11:19:40 +0530 Subject: [PATCH] chore: formatted code with leptosfmt and rustfmt --- .../src/api/context/handlers.rs | 2 +- .../src/api/default_config/handlers.rs | 2 +- crates/frontend/src/components/alert/mod.rs | 2 +- .../default_config_form.rs | 222 ++++++++------- .../dimension_form/dimension_form.rs | 267 +++++++++--------- .../frontend/src/components/drawer/drawer.rs | 5 +- .../src/components/experiment/experiment.rs | 3 +- .../components/function_form/function_form.rs | 7 +- .../src/components/function_form/utils.rs | 2 +- crates/frontend/src/components/mod.rs | 2 +- .../components/override_form/override_form.rs | 13 +- crates/frontend/src/components/toast/mod.rs | 15 +- crates/frontend/src/hoc/layout/layout.rs | 2 +- .../src/pages/Dimensions/Dimensions.rs | 51 ++-- .../pages/default_config/default_config.rs | 239 +++++++++------- .../pages/experiment_list/experiment_list.rs | 11 +- .../frontend/src/pages/function/function.rs | 15 +- .../src/pages/function/function_list.rs | 9 +- crates/service_utils/src/helpers.rs | 2 +- 19 files changed, 485 insertions(+), 386 deletions(-) diff --git a/crates/context_aware_config/src/api/context/handlers.rs b/crates/context_aware_config/src/api/context/handlers.rs index 439339d2..331693cd 100644 --- a/crates/context_aware_config/src/api/context/handlers.rs +++ b/crates/context_aware_config/src/api/context/handlers.rs @@ -523,4 +523,4 @@ async fn bulk_operations( Ok(()) // Commit the transaction })?; Ok(Json(response)) -} \ No newline at end of file +} diff --git a/crates/context_aware_config/src/api/default_config/handlers.rs b/crates/context_aware_config/src/api/default_config/handlers.rs index c435f955..4591493c 100644 --- a/crates/context_aware_config/src/api/default_config/handlers.rs +++ b/crates/context_aware_config/src/api/default_config/handlers.rs @@ -181,4 +181,4 @@ async fn get(db_conn: DbConnection) -> superposition::Result = default_configs.get_results(&mut conn)?; Ok(Json(result)) -} \ No newline at end of file +} diff --git a/crates/frontend/src/components/alert/mod.rs b/crates/frontend/src/components/alert/mod.rs index 6b00f6fd..ac81b8c9 100644 --- a/crates/frontend/src/components/alert/mod.rs +++ b/crates/frontend/src/components/alert/mod.rs @@ -66,4 +66,4 @@ pub fn alert(alert: Alert) -> impl IntoView { {alert.text} } -} \ No newline at end of file +} diff --git a/crates/frontend/src/components/default_config_form/default_config_form.rs b/crates/frontend/src/components/default_config_form/default_config_form.rs index feef3a6e..393783e3 100644 --- a/crates/frontend/src/components/default_config_form/default_config_form.rs +++ b/crates/frontend/src/components/default_config_form/default_config_form.rs @@ -181,72 +181,79 @@ where - { + set_config_type.set("number".to_string()); + } + "decimal" => { + set_config_type.set("decimal".to_string()); + } + "boolean" => { + set_config_type.set("boolean".to_string()); + } + "enum" => { + set_config_type.set("enum".to_string()); + set_config_pattern + .set(format!("{:?}", vec!["android", "web", "ios"])); + } + "pattern" => { + set_config_type.set("pattern".to_string()); + set_config_pattern.set(".*".to_string()); + } + _ => { + set_config_type.set("other".to_string()); + set_config_pattern.set("".to_string()); + } + }; + } - - - - - - - + + + + + + + + +
@@ -275,7 +282,8 @@ where
-
@@ -300,9 +308,7 @@ where