From e66937208a88a20b450346256e2e3ce8bc092608 Mon Sep 17 00:00:00 2001 From: pir8bay Date: Mon, 10 Jun 2024 10:08:51 +0300 Subject: [PATCH 1/5] added demo feature --- public/images/chevron.svg | 6 ++++++ src/index.tsx | 4 ++-- src/pages/auth/login.tsx | 28 +++++++++++++++++++++++++--- 3 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 public/images/chevron.svg diff --git a/public/images/chevron.svg b/public/images/chevron.svg new file mode 100644 index 00000000..96421a23 --- /dev/null +++ b/public/images/chevron.svg @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/src/index.tsx b/src/index.tsx index 01a890a5..3c04a4d6 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -28,8 +28,8 @@ render( )} > - - + + diff --git a/src/pages/auth/login.tsx b/src/pages/auth/login.tsx index 05c6852f..c22974b6 100644 --- a/src/pages/auth/login.tsx +++ b/src/pages/auth/login.tsx @@ -1,9 +1,15 @@ import { getGoogleAuthUrl, getAppleAuthUrl, getGitHubAuthUrl } from '~/api/auth' +import { setAccessToken } from '~/api/auth/client' import Button from '~/components/material/Button' import Typography from '~/components/material/Typography' export default function Login() { + const loginAsDemoUser = function() { + setAccessToken('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NDg1ODI0NjUsIm5iZiI6MTcxNzA0NjQ2NSwiaWF0IjoxNzE3MDQ2NDY1LCJpZGVudGl0eSI6IjBkZWNkZGNmZGYyNDFhNjAifQ.g3khyJgOkNvZny6Vh579cuQj1HLLGSDeauZbfZri9jw'); + window.location.href = window.location.origin; + }; + return (
@@ -31,7 +37,7 @@ export default function Login() {
+ +
) From 866c7d11f77cbd91bbbe0f6196126e604c6b85e7 Mon Sep 17 00:00:00 2001 From: Sarem Hailemeskel <166467953+pir8bay@users.noreply.github.com> Date: Mon, 10 Jun 2024 08:52:08 +0000 Subject: [PATCH 2/5] switched to google fonts --- public/images/chevron.svg | 6 ------ src/pages/auth/login.tsx | 14 +++++--------- 2 files changed, 5 insertions(+), 15 deletions(-) delete mode 100644 public/images/chevron.svg diff --git a/public/images/chevron.svg b/public/images/chevron.svg deleted file mode 100644 index 96421a23..00000000 --- a/public/images/chevron.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - \ No newline at end of file diff --git a/src/pages/auth/login.tsx b/src/pages/auth/login.tsx index c22974b6..6df89bfe 100644 --- a/src/pages/auth/login.tsx +++ b/src/pages/auth/login.tsx @@ -5,7 +5,7 @@ import Button from '~/components/material/Button' import Typography from '~/components/material/Typography' export default function Login() { - const loginAsDemoUser = function() { + const loginAsDemoUser = function () { setAccessToken('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NDg1ODI0NjUsIm5iZiI6MTcxNzA0NjQ2NSwiaWF0IjoxNzE3MDQ2NDY1LCJpZGVudGl0eSI6IjBkZWNkZGNmZGYyNDFhNjAifQ.g3khyJgOkNvZny6Vh579cuQj1HLLGSDeauZbfZri9jw'); window.location.href = window.location.origin; }; @@ -101,16 +101,12 @@ export default function Login() { class="h-13 gap-4 hover:bg-gray-200" onclick={loginAsDemoUser} trailing={ - + + chevron_right + } > - Try the demo + Try the demo From 6b43dba2c798867c72555d34457e8467ea47be54 Mon Sep 17 00:00:00 2001 From: Cameron Clough Date: Wed, 12 Jun 2024 01:10:39 +0100 Subject: [PATCH 3/5] fix indent --- src/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 3c04a4d6..01a890a5 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -28,8 +28,8 @@ render( )} > - - + + From aeb434020ad0e968d540cb9c7f143233552fb22f Mon Sep 17 00:00:00 2001 From: Cameron Clough Date: Wed, 12 Jun 2024 01:16:58 +0100 Subject: [PATCH 4/5] remove unknown class --- src/pages/auth/login.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/auth/login.tsx b/src/pages/auth/login.tsx index 6df89bfe..8226cdf1 100644 --- a/src/pages/auth/login.tsx +++ b/src/pages/auth/login.tsx @@ -98,7 +98,7 @@ export default function Login() {