Commit Graph

59 Commits

Author SHA1 Message Date
Kalle
c8ea75ebb6
SQL solution migration to Kysely + getting rid of routes folder (#1530)
* Kysely initial

* Badges initial

* Badge routes migrated

* Badges migrated

* Calendar work

* Fix one type problem

* Calendar work

* findResultsByUserId work

* Calendar reworking finished

* PlusSuggestions work

* Migrated suggestions

* Builds progress

* Migrated builds

* Admin migrated

* Migrate articles

* User search

* Faster getUser

* Selectable/insertable as global

* Refresh prod db script + patronTier index

* identifierToUserId

* updateProfile

* findByIdentifier

* More indexes

* User upsert

* upsertLite

* findAllPlusMembers

* updateResultHighlights

* updateMany

* User finished migration

* Fix types

* Fix PlusVotingResult typing

* PlusVotingRepository WIP

* Migrated resultsByMonthYear

* Migrated plusVotes (done with db. related migrations)

* Plus code to features folder

* Fix TODOs

* Export

* Fix range

* Migrate some user pages

* Move rest user routes

* Move /play

* Map list generator

* Front page

* Move map list generation logic

* Move plus voting logic

* Info

* API

* Adjust TODOs

* theme

* Auth

* Remove TODO
2023-11-04 13:15:36 +02:00
Kalle
24875c1fb4
SendouQ real(er) time with notifications (#1525)
* Initial

* Move code

* More events implemented

* Auto refresh take in account recent revalidates

* Add sound effects

* Add creds

* Settings

* Add error handling

* Add envs
2023-10-18 18:33:17 +03:00
Kalle
dab6b00c2d Update Prettier 2023-08-26 22:38:11 +03:00
Kalle
fd7d1ea2dc
User search (#1468)
* Initial

* Search users from API

* Better feeling search

* Fix TODO

* Search via url, discord id & id

* Load initial user

* UserSearch on admin page

* UserSearch on tournaments page

* UserSearch for badges

* Plus suggestions

* Vod page

* Remove unused code

* Fix test
2023-08-26 22:10:01 +03:00
Kalle
d4b9dcd516
Weapon usage (#1466)
* Initial

* Finished?

* Remove comment
2023-08-22 21:16:28 +03:00
Kalle
823034a0a1 SendouQ feedback changes 2023-08-15 17:51:29 +03:00
Kalle
6cee16492c Make it possible to disable login 2023-08-13 10:59:08 +03:00
Kalle
e7bbb565be
SendouQ (#1455)
* Tables

* Clocks

* Maplist preference selector

* Fix SSR

* Nav icon

* RankedOrScrim

* Map pool

* Create group

* Redirect logic

* Persist map pool

* Advance from preparing page

* Rename query

* Fix merge

* Fix migration order

* Seed groups

* Find looking groups SQL

* Renders something

* More UI work

* Back to 30min

* Likes/dislikes

* Always return own group

* Fix like order

* 3 tc/rm/cb -> 2

* Show only 3 weapons

* Pass group size

* Handle both liked and liked by same group

* Fix SQL

* Group preference frontend work

* Morphing

* Styling

* Don't show group controls if not manager

* Give/remove manager

* Leave group

* Leave with confirm

* Delete likes when morphing groups

* Clocks consistency

* Remove bad invariant

* Persist settings to local storage

* Fix initial value flashing

* Fix never resolving loading indicator

* REFRESH_GROUP

* Flip animations

* Tweaks

* Auto refresh logic

* Groups of 4 seed

* Reduce throwing

* Load full groups initial

* Create match

* Match UI initial

* Score reporter initial

* Push footer down on match page

* Score reporter knows when set ended

* Score reporting untested

* Show score after report

* Align better

* Look again with same group functionality

* More migrations

* Team on match page

* Show confirmer before reporting score

* Report weapons

* Report weapos again by admin + skill changing

* Handle no tiebreaker given to MapPool

* Remove unranked

* Remove support for "team id skill"

* no-wrap -> nowrap

* Preparing page work

* Use common GroupCard component

* Add some metas

* MemberAdder in looking page

* Fix GroupCard actions

* Fix SZ only map list including other modes

* Add season info

* Prompt login

* Joining team

* Manage group on preparing page

* Manage group on preparing page

* Seed past matches

* Add to seed

* No map list preference when full group + fix expiry

* Fix skill matchesCount calculation

* Tiers initial work

* Some progress on tiers

* Tiering logic

* MMR in group cards

* Name to challenge

* Team MMR

* Big team rank icons

* Adjust todos

* Match score report with confirm

* Allow regular members to report score

* Handle reporting weapons edge cases

* Add tier images

* Improve GroupCard spacing

* Refactor looking page

* Looking mobile UI

* Calculate skill only for current season

* Divide groups visually when reporting weapons

* Fix match page weapons sorting

* Add cache to user skills+tier calculation

* Admin report match score

* Initial leaderboard

* Cached leaderboard

* Weapon category lb's

* Populate SkillTeamUser in SendouQ

* Team leaderboard filtered down

* Add TODOs

* Seasons initlal

* Season weapons initial

* Weapons stylized

* Show rest weapons as +

* Hide peak if same as current

* Load matches SQL initial

* Season matches UI initial

* Take user id in account

* Add weapons

* Paginated matches

* Fix pages count logic

* Scroll top on data change

* Day headers for matches

* Link from user page to user seasons page

* Summarize maps + ui initial

* Map stats

* Player info tabs

* MMR chart

* Chart adjustments

* Handle basing team MMR on player MMR

* Set initial MMR

* Add info about discord to match page

* Season support to tournaments

* Get tournament skills as well for the graph

* WIP

* New team rating logic + misc other

* tiered -> tiered.server

* Update season starting time

* TODOs

* Add rules page

* Hide elements correctly when off-season

* Fix crash when only one player with skill

* How-to video

* Fix StartRank showing when not logged in

* Make user leaderboard the default

* Make Skill season non-nullable

* Add suggested pass to match

* Add rule

* identifierToUserIds helper

* Fix tiers not showing
2023-08-12 22:42:54 +03:00
Kalle
d08a69311d Rename useSimplePagination hook 2023-07-30 11:10:53 +03:00
Kalle
7b18a0cfc7
Art tags (#1420)
* Have clicking pagination dots do a thing

* Add tag frontend

* Backend

* Render tags

* Filter by tag

* Persist big art to search params

* Filter by tags on the common art page

* Linking tags + user tags
2023-07-12 16:25:46 +03:00
Kalle
dad6c8ea2c Fix it being possible to get empty paginated list 2023-07-10 10:16:12 +03:00
Kalle
35168111a6
Art (#1412)
* Add to nav

* Allow nav items on front page to take full width

* Initial+

* Fix vods page title

* Add page title

* Common art type

* ArtGrid to a different component

* User arts page initial

* Add art tab to user page

* Preview initial

* Fix art counting

* Fix link and onclick overlapping

* Link to user art page to arts they made

* Artist role initial

* Show description

* Make toggle in art page saved in search params

* Add white-space pre-wrap to plus comments

Not sure why it was removed in the first place?

* Commission open / text and edit those

* Add simple pagination

* New art link display logic

* New art initial

* Upload art

* Hide art from side nav too

* Show banner when waiting for approval

* Edit art

* Fix art sub nav link not showing active

* Relocate unvalidated art text

* Delete art

* Extract ImagePreview component

* Eliminate some layout shift

* BigImageDialog extract component + prevent layout shift

* i18n

* Fix unused var

* Fix tests
2023-07-09 11:48:28 +03:00
Kalle
efb95bd93f Remove badges page entry animation 2023-07-01 12:52:19 +03:00
Kalle
78f7baf075 Revalidate subscribe pages on tab back + resub 2023-05-20 00:19:55 +03:00
Kalle
ef78d3a2c2
Tournament full (#1373)
* Got something going

* Style overwrites

* width != height

* More playing with lines

* Migrations

* Start bracket initial

* Unhardcode stage generation params

* Link to match page

* Matches page initial

* Support directly adding seed to map list generator

* Add docs

* Maps in matches page

* Add invariant about tie breaker map pool

* Fix PICNIC lacking tie breaker maps

* Only link in bracket when tournament has started

* Styled tournament roster inputs

* Prefer IGN in tournament match page

* ModeProgressIndicator

* Some conditional rendering

* Match action initial + better error display

* Persist bestOf in DB

* Resolve best of ahead of time

* Move brackets-manager to core

* Score reporting works

* Clear winner on score report

* ModeProgressIndicator: highlight winners

* Fix inconsistent input

* Better text when submitting match

* mapCountPlayedInSetWithCertainty that works

* UNDO_REPORT_SCORE implemented

* Permission check when starting tournament

* Remove IGN from upsert

* View match results page

* Source in DB

* Match page waiting for teams

* Move tournament bracket to feature folder

* REOPEN_MATCH initial

* Handle proper resetting of match

* Inline bracket-manager

* Syncify

* Transactions

* Handle match is locked gracefully

* Match page auto refresh

* Fix match refresh called "globally"

* Bracket autoupdate

* Move fillWithNullTillPowerOfTwo to utils with testing

* Fix map lists not visible after tournament started

* Optimize match events

* Show UI while in progress to members

* Fix start tournament alert not being responsive

* Teams can check in

* Fix map list 400

* xxx -> TODO

* Seeds page

* Remove map icons for team page

* Don't display link to seeds after tournament has started

* Admin actions initial

* Change captain admin action

* Make all hooks ts

* Admin actions functioning

* Fix validate error not displaying in CatchBoundary

* Adjust validate args order

* Remove admin loader

* Make delete team button menancing

* Only include checked in teams to bracket

* Optimize to.id route loads

* Working show map list generator toggle

* Update full tournaments flow

* Make full tournaments work with many start times

* Handle undefined in crud

* Dynamic stage banner

* Handle default strat if map list generation fails

* Fix crash on brackets if less than 2 teams

* Add commented out test for reference

* Add TODO

* Add players from team during register

* TrustRelationship

* Prefers not to host feature

* Last before merge

* Rename some vars

* More renames
2023-05-15 22:37:43 +03:00
Kalle
a1ceff1fd2 Filter builds on user builds page Closes #1243 2023-04-23 15:19:17 +03:00
Kalle
6da896a617 Map Planner: Persist to IndexedDB 2023-01-15 22:12:01 +02:00
William Lam
c8e707488b
Implemented some dynamic background sizing & positioning calculations for the Map Planner (#1200)
* Implemented a relatively simple dynamic background sizing calculation for the Map Planner

* Moved useWindowsSize() hook usage near the top of Planner() function

* Removed some dead space above the background image

* Adjustments

* Added a *lot* of math to adjust image spawn location based on the background image size & position, which are based on the current window size & position
- Moved the background image stuff to its own React Hook, usePlannerBg()

* Fix Prettier issue

* Added another comment

* Fixed typing for the usePlannerBg hook
- Also improved comments & some variable names to be cleaner/more consistent

Co-authored-by: Kalle <38327916+Sendouc@users.noreply.github.com>
2023-01-08 11:24:44 +02:00
Kalle
1170dc0bd0 Team: Manage roster page 2023-01-06 16:33:37 +02:00
Kalle
aea7406586
Map Planner (#1145)
* Initial

* Add images

* Tweaks

* Proper sized bg image and weapons

* Stage bg picker

* Outlined weapon images for planner

* First version

* Lint

* Add alt and title to weapon
2022-11-23 17:38:38 +02:00
Kalle
ecd5a2a2f7
TO Tools (#1077)
* Add DB tables

* Toggle TO Tools in new calendar event page

* TO tools page initial

* Add counter pick map pool UI

* Save tie breaker map pool

* Save team name

* Layout initial

* Load users own team

* Make team name input required

* Rename team

* Divide to sections

* Submit team map pool

* New style for counter pick map pool section expand

* Fix tiebreaker map pool not saved when new event made

* Split to many forms

* According for team name

* Small UI consistency tweaks

* Add explanation to tie breaker maps

* Remove redundant prop

* Fix new calendar event todos

* Use required hidden input component in new build page

* Fix to tools page showing even when toToolsEnabled = 0

* Delete team

* Map list generation tests initial

* Add tournament map list generation tests

* First version of map list generation

* Add seeded RNG

* Rearrange files

* Generation with strats initial

* Default map pool + allow one team not to have any maps

* Implement map generation via backtracking

* Make order of stages irrelevant

* Add one more TODO

* Seed

* Fixes

* Tournament map list generator initial

* More functional maplist

* Fix any

* Persist in search params initial

* Add date to calendar seed

* Revert "Persist in search params initial"

This reverts commit f01a9e6982.

* Allow admin to start tournament

* Rate maplist instead of optimal / suboptimal

* Add fallback if map list generation errors out

* Hide TO Tools if not admin

* Submit team roster and delete members

* Teams page

* Give roster s p a c e

* Clear user combobox on sent + layout tweaks

* Gracefully handle updating after tournament has started

* Add title

* Persist map list in search params

* Add i18n
2022-11-13 14:41:13 +02:00
Remmy Cat Stock
2fa18547b0 Wrap useTranslation to detect missing translations on the route 2022-11-05 14:45:12 +01:00
Remmy Cat Stock
d5677cf7e8
Remove useOnce hook 2022-10-27 23:12:48 +02:00
Remmy Cat Stock
d1b1367651
Add event search to map pool templates 2022-10-27 13:31:37 +02:00
Remmy Cat Stock
edd3a1d91b
Improve MapPoolSelector UI 2022-10-27 13:31:36 +02:00
Kalle
53fa0147c7 Get users to combobox via useSWR 2022-08-07 12:07:32 +03:00
Kalle
00a6ab8be1 Animate badges page entrance 2022-07-25 22:00:35 +03:00
Kalle
63d9a5b53b Set translated title on client side for FAQ 2022-07-17 11:52:35 +03:00
Kalle
4df089573e Remove desktop menu 2022-06-30 17:41:58 +03:00
Kalle
07cc6699f2 Relative time voting timing info 2022-06-11 21:53:34 +03:00
Kalle
77cadcb06d Move useUser to modules/auth 2022-06-11 11:34:25 +03:00
Kalle
ef2d56327d Stricters Typescript 2022-06-10 01:02:59 +03:00
Kalle
185295d54e
User page initial with SQLite3 (#822)
* Clean away prisma migrations

* Way to migrate WIP

* SQLite3 seeding script initial

* Fetch tournament data in loader

* CheckinActions new loader data model

* Virtual banner text color columns

* Logged in user

* Count teams

* ownTeam

* Map pool tab fully working

* Teams tab

* Fix timestamp default

* Register page

* Manage team page

* Camel case checkedInTimestamp

* Clean slate

* Add .nvmrc

* Add favicon

* Package lock file version 2

* Update tsconfig

* Add Tailwind

* Add StrictMode

* Add background color

* Auth without DB

* Revert "Add Tailwind"

This reverts commit 204713c602.

* Auth with DB

* Switch back to tilde absolute import

* Import layout

* Camel case for database columns

* Move auth routes to folder

* User popover links working

* Import linters

* User page initial

* User edit page with country

* Script to delete db files before migration in dev

* Remove "youtubeName" column

* Correct avatar size on desktop

* Fix SubNav not spanning the whole page

* Remove duplicate files

* Update README
2022-05-16 17:52:54 +03:00
Kalle
03da81a84c
New navigation (#821)
* Menu skeleton

* Menu with nav icons

* Menu opens and closes

* More menu icons + links work

* Menu closes on navigation

* Blurred menu

* Remove other nav

* Rounded nav

* Fix menu alignment for Safari

* Close on click outside

* Disable body scroll when menu open

* SubNav for tournament

* Use grid

* Make images same size again

* Remove comment

* Different style mobile nav

* Readd InfoBanner elements

* Move menu css to layout.css

* Move admin command input top left

* Page title from loader

* Fix error when getting pageTitle

* Fix CI
2022-04-30 11:10:09 +03:00
Kalle
b84917133b Edit match if winner unchanged 2022-04-21 17:34:39 +03:00
Kalle
270e00fbe1 Upgrade deps 2022-04-15 18:22:36 +03:00
Kalle
54147404c9 Fix start page crash before check-in starts 2022-04-02 20:03:29 +03:00
Kalle
e2dda84d83 Introduce eslint-plugin-react-hooks 2022-03-30 19:58:08 +03:00
Kalle
c0e4f01097 Bracket real time solution SSE -> Socket.io 2022-03-29 23:55:42 +03:00
Kalle
8d647eaeff Use React Context for sharing socket 2022-03-29 23:40:08 +03:00
Kalle
9b775dcf41 Unread indicator for chat 2022-03-27 14:22:01 +03:00
Kalle
f536918d09 Chat SSE -> socket.io 2022-03-25 00:42:29 +02:00
Kalle
2b0bdf9d92 Polling 30 -> 20 seconds 2022-02-27 10:55:00 +02:00
Kalle
244f6aab8a Fix team MMR calculation 2022-02-27 10:49:49 +02:00
Kalle
52822569de Fix lint 2022-02-18 08:26:29 +02:00
Kalle
026bd67b78 Add polling to looking 2022-02-17 09:51:07 +02:00
Kalle
b24a7f4d98 Refactor SSE logic 2022-02-13 13:29:12 +02:00
Kalle (Sendou)
b9a79103a2 Close modal on click outside 2022-01-19 18:27:01 +02:00
Kalle (Sendou)
d530e9383c Switch common hooks from /utils to /hooks 2022-01-16 22:03:53 +02:00
Kalle (Sendou)
be147a9c1f When match ends -> events 2022-01-14 08:49:02 +02:00