From 05a84f1653b7c6b9e7ab2fe0cc78ede185436ac2 Mon Sep 17 00:00:00 2001 From: mateuszpiorowski Date: Tue, 25 Apr 2023 23:52:27 +0200 Subject: [PATCH] finished --- client/fly.toml | 4 +- .../lib/components/LoadingComponent.svelte | 2 +- client/src/lib/form/Button.svelte | 2 +- client/src/lib/icons/GithubIcon.svelte | 1 + client/src/lib/icons/MailIcon.svelte | 18 +++ client/src/routes/auth/+page.svelte | 149 +++++++++++++----- service-notes/src/notes_service.rs | 3 - service-posts/fly.toml | 4 +- service-users/fly.toml | 4 +- service-utils/fly.toml | 4 +- 10 files changed, 139 insertions(+), 52 deletions(-) create mode 100644 client/src/lib/icons/MailIcon.svelte diff --git a/client/fly.toml b/client/fly.toml index 29696498..d9de5e07 100644 --- a/client/fly.toml +++ b/client/fly.toml @@ -9,8 +9,8 @@ primary_region = "arn" [http_service] internal_port = 3000 force_https = true - auto_stop_machines = true - auto_start_machines = true + auto_stop_machines = false + auto_start_machines = false [checks] [checks.alive] diff --git a/client/src/lib/components/LoadingComponent.svelte b/client/src/lib/components/LoadingComponent.svelte index 2f272c27..ffccb5e2 100644 --- a/client/src/lib/components/LoadingComponent.svelte +++ b/client/src/lib/components/LoadingComponent.svelte @@ -5,7 +5,7 @@
{:else if $$slots.icon} -
+
{/if} diff --git a/client/src/lib/icons/GithubIcon.svelte b/client/src/lib/icons/GithubIcon.svelte index 77e01066..c7bef64b 100644 --- a/client/src/lib/icons/GithubIcon.svelte +++ b/client/src/lib/icons/GithubIcon.svelte @@ -6,5 +6,6 @@ > diff --git a/client/src/lib/icons/MailIcon.svelte b/client/src/lib/icons/MailIcon.svelte new file mode 100644 index 00000000..ac15b06e --- /dev/null +++ b/client/src/lib/icons/MailIcon.svelte @@ -0,0 +1,18 @@ + + + + + diff --git a/client/src/routes/auth/+page.svelte b/client/src/routes/auth/+page.svelte index 24210422..5791e28b 100644 --- a/client/src/routes/auth/+page.svelte +++ b/client/src/routes/auth/+page.svelte @@ -1,22 +1,29 @@ +{#if loading} +
+ +
+{/if} +
@@ -96,12 +150,26 @@

Sign in so You can say "I use Rust"

- +
+ + +
@@ -117,6 +185,9 @@ bind:value={email} />
diff --git a/service-notes/src/notes_service.rs b/service-notes/src/notes_service.rs index ee6d5515..a6e842c1 100644 --- a/service-notes/src/notes_service.rs +++ b/service-notes/src/notes_service.rs @@ -188,8 +188,6 @@ impl NotesService for MyService { #[cfg(debug_assertions)] println!("CreateNote = {:?}", request); let start = std::time::Instant::now(); - - // start transaction let pool = self.pool.clone(); let mut tx = pool.begin().await.map_err(sqlx::Error::into_status)?; @@ -197,7 +195,6 @@ impl NotesService for MyService { let user_id = Uuid::parse_str(¬e.user_id).map_err(|e| Status::internal(e.to_string()))?; - // do it 100 times query("INSERT INTO notes (title, content, \"userId\") VALUES ($1, $2, $3) RETURNING *") .bind(note.title.clone()) .bind(note.content.clone()) diff --git a/service-posts/fly.toml b/service-posts/fly.toml index b6c2b397..cd7fde60 100644 --- a/service-posts/fly.toml +++ b/service-posts/fly.toml @@ -14,8 +14,8 @@ primary_region = "arn" [http_service] internal_port = 443 force_https = true - auto_stop_machines = true - auto_start_machines = true + auto_stop_machines = false + auto_start_machines = false [[services]] protocol = "tcp" diff --git a/service-users/fly.toml b/service-users/fly.toml index fa6d4796..30e0182d 100644 --- a/service-users/fly.toml +++ b/service-users/fly.toml @@ -14,8 +14,8 @@ primary_region = "arn" [http_service] internal_port = 443 force_https = true - auto_stop_machines = true - auto_start_machines = true + auto_stop_machines = false + auto_start_machines = false [[services]] protocol = "tcp" diff --git a/service-utils/fly.toml b/service-utils/fly.toml index 8b0fe54a..f4aad90a 100644 --- a/service-utils/fly.toml +++ b/service-utils/fly.toml @@ -18,8 +18,8 @@ primary_region = "arn" [http_service] internal_port = 443 force_https = true - auto_stop_machines = true - auto_start_machines = true + auto_stop_machines = false + auto_start_machines = false [[services]] protocol = "tcp"