From 15ad3dfb94f4c1550001a6f02f5763e88cf457c9 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 30 Nov 2024 14:07:23 +0100 Subject: [PATCH] holy cow it works --- .gitignore | 2 +- .idea/runConfigurations/Backend.xml | 4 +- Caddyfile | 3 +- holycow_backend/Cargo.lock | 1 + holycow_backend/Cargo.toml | 1 + .../down.sql | 1 + .../2024-11-29-145528_readd usernames/up.sql | 1 + .../down.sql | 1 + .../up.sql | 1 + holycow_backend/src/config.rs | 2 + holycow_backend/src/database/model.rs | 63 ++++++-- holycow_backend/src/database/schema.rs | 1 + holycow_backend/src/main.rs | 13 +- holycow_backend/src/routes/matches.rs | 142 +++++++++++++++++- holycow_backend/src/routes/results.rs | 35 ++++- holycow_backend/src/telegram/mod.rs | 1 - holycow_backend/src/telegram/webapp.rs | 8 - holycow_frontend/next.config.ts | 4 +- .../src/app/[telegramId]/profile/page.tsx | 3 + .../src/app/[telegramId]/report/page.tsx | 16 ++ holycow_frontend/src/app/page.tsx | 40 +++-- holycow_frontend/src/app/report/page.tsx | 107 ------------- .../src/components/LoadingBox.module.css | 13 ++ .../src/components/LoadingBox.tsx | 19 +++ holycow_frontend/src/components/ReportBox.tsx | 97 ++++++++++++ .../src/components/ReportBoxInteractive.tsx | 56 +++++++ holycow_frontend/src/holycow.ts | 12 ++ holycow_frontend/src/telegram.ts | 1 + 28 files changed, 490 insertions(+), 158 deletions(-) create mode 100644 holycow_backend/migrations/2024-11-29-145528_readd usernames/down.sql create mode 100644 holycow_backend/migrations/2024-11-29-145528_readd usernames/up.sql create mode 100644 holycow_backend/migrations/2024-11-29-151839_ununique matchnames/down.sql create mode 100644 holycow_backend/migrations/2024-11-29-151839_ununique matchnames/up.sql delete mode 100644 holycow_backend/src/telegram/webapp.rs create mode 100644 holycow_frontend/src/app/[telegramId]/profile/page.tsx create mode 100644 holycow_frontend/src/app/[telegramId]/report/page.tsx delete mode 100644 holycow_frontend/src/app/report/page.tsx create mode 100644 holycow_frontend/src/components/LoadingBox.module.css create mode 100644 holycow_frontend/src/components/LoadingBox.tsx create mode 100644 holycow_frontend/src/components/ReportBox.tsx create mode 100644 holycow_frontend/src/components/ReportBoxInteractive.tsx create mode 100644 holycow_frontend/src/holycow.ts diff --git a/.gitignore b/.gitignore index 11ee758..4c49bd7 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -.env.local +.env diff --git a/.idea/runConfigurations/Backend.xml b/.idea/runConfigurations/Backend.xml index adc1c75..cfded65 100644 --- a/.idea/runConfigurations/Backend.xml +++ b/.idea/runConfigurations/Backend.xml @@ -3,7 +3,9 @@