Commit Graph

883 Commits

Author SHA1 Message Date
Kalle
0383d4a3e9 Fix picking (Unlisted team) crashing 2022-11-19 20:17:36 +02:00
Remmy Cat Stock
0bfa16eb3f Re-enable bulk edit controls for map pools when logged out 2022-11-19 16:29:55 +01:00
Kalle
045cb5ce83 Preview maplist generator toggle for admins 2022-11-19 17:14:12 +02:00
Kalle
29057d60db Download participants as Discord list button 2022-11-19 16:59:36 +02:00
Kalle
9d7cd816c9 Color role Lohi command 2022-11-19 01:33:58 +02:00
Kalle
cc994776f4 Better ordering for TO Tools teams
Closes #1127
2022-11-16 19:30:42 +02:00
Kalle
e2dedf0526 Add Q&A about Patreon 2022-11-16 19:05:26 +02:00
William Lam
2da0738dc6
Ability Chunks Required section in Build Analyzer (#1120)
* Added Ability Chunks Required section in Build Analyzer

* Renamed a variable to be more precisely correct

* Added reference

* Removed some extra Javadoc comments

* Prettier fix

* We now only render the AbilityChunksRequired section only if the main abilities array contains a value other than "UNKNOWN"

* Improved React keys naming for performance reasons

* Ability Chunks map is now converted to an array & sorted by value (descending) before it gets rendered as visual components

* Fixed typing error

* Moved logical function to a new file in the analyzer module called abilityChunksCalc.ts
- Refactored for loop content to be cleaner
- Removed & changed some comments

* More for loop refactoring

* We now pass the entire build into abilityChunksCalc.ts

* Refactored map() to flatMap() so we avoid unknowns/null/undefined

* Refactored code to process mainAbilities and subAbilities

* Fixed subability list construction logic & typing in updateAbilityChunksMap()

* Got my first unit test working

* Added working unit tests, also changed sort order slightly

* Added a "real" build for testing

* Removed residual console.warn() call

* Moved constants to abilityChunksCalc.ts

* Ability chunk calculation is now correct for sub abilities

* Uncommented tests & improved their descriptions

* Rearranged expected output to match sorted order for clarity (even though it doesn't have to be)

* Fixed Prettier error

* Spacing

* Moved comments around

* More spacing

* Prettier error on test file

* Improved check in the tests

* Added a second "real" build to tests for good measure

* Added error message to empty array test

* Updated comments again

* More comments updated

* Update test name

* Ability Chunks section is now shown if we have at least one selected ability (handles edge case for primary slot-only abilities being the only chosen ability)
2022-11-16 00:10:48 +02:00
Kalle
7bce94d97e Show Plus Voting % to patrons 2022-11-15 18:04:37 +02:00
Kalle
dd3377e7f3 TO Tools roster link to user page 2022-11-15 00:45:42 +02:00
Kalle
ef0866a1b9 Fix linebreaks not working in calendar event description 2022-11-13 15:15:13 +02:00
Kalle
077df1ec98 Fix all teams showing without map pool 2022-11-13 14:45:04 +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
William Lam
f6990e93eb
Fixed "Map Pool" title in events to use the appropriate localization value (#1118) 2022-11-12 10:41:55 +02:00
Kalle
bae922b289 Add translator 2022-11-08 22:08:39 +02:00
Remmy Cat Stock
9762c7aa4d
Improve plus suggestion comment validation (#1101) 2022-11-06 10:08:36 +01:00
Remmy Cat Stock
4d84c1ad91
Fixed route translations issue detected by useTranslation 2022-11-05 14:51:02 +01: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
a6f62fa7b3 Improve date inputs UI when creating / editing events 2022-11-05 14:44:08 +01:00
Remmy Cat Stock
88e0649e79 Set default date for new events to the next full hour 2022-11-05 14:44:08 +01:00
Remmy Cat Stock
b4f8e4402e Make date input more reliable by handling invalid dates and different browser behaviours 2022-11-05 14:44:08 +01:00
Kalle
6ff4efdc20 Add American Spanish language
Closes #985

Just in-game names are different. Rest is copied from EU translation.
2022-11-03 22:10:24 +02:00
William Lam
0d8b88ea5a
All articles page (#1072)
* Added new Article route that renders all Articles (with a reasonable upper limit for now).
- Also added a GoToPageBanner for the main Articles page (/a) on the front page. This is placed above the ArticlesPeek component
- Used the sendou_love navItem icon for the moment (this can be replaced at any time once a new art asset is added)

* Fixed Prettier CI pipeline error

* Ran `npm run check-translation-jsons` to update missing Translations for new key added

* Update public/locales/en/front.json

Co-authored-by: Kalle <38327916+Sendouc@users.noreply.github.com>

* French localizations

* Removed unnecessary comment

* Converted h2 to h1 tags for Main Articles page

Co-authored-by: Kalle <38327916+Sendouc@users.noreply.github.com>

* Moved GoToPageBanner element for main articles page to below ArticlesPeek element

* Refactored some files so that the articles prop is passed into ArticlesPeek
- Also added the Articles header title in common.json

* Updated translation-progress.md

* Cleaned up data type for articles prop in ArticlesPeek

* Fixed React hydration error for translations on imported articles
- Added in SendouRouteHandle component on new Articles main page

* GoToPageBanner now optionally accepts a `navItem` parameter. It does not render the image if navItem is not passed into it

* Removed <Outlet /> JSX element on the main Articles page

* Removed sendou_love navItem on GoToPageBanner for articles page

* Fixed spacing issue by grouping ArticlesPeek and its corresponding GoToPageBanner element into a `stack` div

* Fixed pipeline error

* Update translation again

Co-authored-by: Kalle <38327916+Sendouc@users.noreply.github.com>
2022-11-01 08:57:44 +02:00
Illya9999
bcf60a4890
Only allow numbers as discrim (#1085) 2022-10-31 19:50:00 +02:00
William Lam
09851faf83
New Date entry on the new Calendar page is now based off the previous one (#1070)
* Issue 858: On the new calendar page adding a new Date entry with the "Add" button will now insert a new date with an offset of +24 hours of the previous row's date value.

* Added comment to ignore the TSLint "object can be null" error

* Changed `var` to `const`

* Fixed Prettier checks in CI pipeline

* Fixed Typecheck CI pipeline error

* Moved getDateWithHoursOffset() function to app/utils/dates.ts

* Added new line at end of file

* Added getValidNewDateIfInvalid() function. This retrieves a valid date. If invalid, get a new Date object.
- So now, if we intentionally/accidentally delete the data in the Calendar's DateInput element, it will be reset to the current Date/Time

* Refactored DateInput component's update state mechanism to be handled by an onChange() function defined in the parent component that is passed to the child

* Prettier formatting so that the new CI pipeline won't output errors at me

* Removed unused imported types

* Removed the datesCount React Hook & refactored accordingly

* Removed unused loader-related variables

* DateInput onChange prop is now optional

* Instead of generating a new Array, iterate over DateInput's inputState's array instead

* Fix potential undefined error

* DatesInputState: refactored to remove index & access the index during iteration with map() 2nd arg

* Properly initialized state for pre-existing events =)
- Also added TODO comments for improving date input handling (1082)

* Prettier formatting

* Uncommented console.warn()

* Touched up comment
2022-10-31 03:59:51 +01:00
Remmy Cat Stock
ad61df057c
Load gear translations needed for build cards on index route 2022-10-31 00:14:48 +01:00
William Lam
3099db8914
Hide Highlights section if the user has exactly 1 result on their profile
* Issue 1068:  Hide Highlights section if the user has exactly 1 result on their profile

* Moved the logic so that we only hide the "Choose Highlights" button if the user has exactly 1 result & they have exactly 1 highlight selected

* Updated logic to hide the Highlights section if the user only has 1 total result

* Prettier fix
2022-10-30 15:59:36 +01:00
Kalle
e97fcd4e99 Remove Cypress tests
Planned to be replaced with Playwright maybe?
Just removing in the meanwhile so they don't confuse people.
Or that people won't accidentally develop new.
2022-10-30 02:15:15 +03:00
Kalle
60a0495b9d Support for blob 4 shots in analyzer
+ fixed L-3 showing curling damage in multiples.
+ fixed "1 hit" typoed to "1 hits"

Closes #1065
2022-10-29 21:04:34 +03:00
Kalle
085ef8abe5
Run checks on PR made (#1063)
* Run checks on PR made

* Prettify

* Refine criteria

* Bruh
2022-10-29 10:44:35 +03:00
Igor
327df35380
Disable double torpedos in analyzer (#1058)
* Note about torpedo

* no magic numbers -> constant
2022-10-29 10:17:27 +03:00
Remmy Cat Stock
d5677cf7e8
Remove useOnce hook 2022-10-27 23:12:48 +02:00
Kalle
aaaf6b318c Add front page translations for preloading 2022-10-27 23:18:55 +03:00
Remmy Cat Stock
d1b1367651
Add event search to map pool templates 2022-10-27 13:31:37 +02:00
Remmy Cat Stock
0a85ad08d2
Add recent events 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
Remmy Cat Stock
3b18598288
Introduce utility MapPool class 2022-10-27 13:31:36 +02:00
Remmy Cat Stock
de9aefa996
Unify MapPoolSelector components 2022-10-27 13:31:36 +02:00
Kalle
e6c25967e9 Analyzer add link to Obj DMG page when OS selected
Closes #1039
2022-10-27 09:43:56 +03:00
Kalle
672fa07152 Update Build Analyzer to patch 1.2.0 2022-10-27 09:14:02 +03:00
Kalle
4353b30f7e Add object-damage-calculator page title 2022-10-26 17:30:40 +03:00
Kalle
b4762d6455 Fix crash when no damage data on obj dmg calc 2022-10-26 17:29:32 +03:00
Kalle
01b0b55e51 Add patch badge to obj dmg calc page 2022-10-26 09:07:35 +03:00
Kalle
019e455c61 Allow access to obj dmg calc page 2022-10-26 09:01:34 +03:00
Kalle
4e9e3527ae Rename object dmg calc page 2022-10-26 09:01:14 +03:00
Kalle
bf4b6fab13 Add object dmg calc to nav and front page 2022-10-26 09:00:43 +03:00
Kalle
7a936fd4bc Fix damage table showing translation key 2022-10-25 17:43:13 +03:00
Kalle
2ab4acde77 Object damage acronyms explanation 2022-10-25 17:40:43 +03:00
Kalle
08161b9346 Object damage calculator mobile layout 2022-10-25 00:21:59 +03:00
Kalle
6eea2edb7b Add splatted by RP user stat to analyzer (ss) 2022-10-24 19:32:53 +03:00
Kalle
12bd09cb14 Add splatted by RP user stat to analyzer 2022-10-24 19:24:26 +03:00
Kalle
3c69208ced Objective damage calc page title 2022-10-24 00:27:53 +03:00
Kalle
1671653839 Objective damage calc i18n 2022-10-24 00:25:16 +03:00
Kalle
6f1a4935a9 Add object shredder to damage table 2022-10-23 22:36:04 +03:00
Kalle
d487af683a Object damage filter by damage type 2022-10-23 12:50:25 +03:00
Kalle
14f7507e2c Make damage use rounding that matches data struct 2022-10-23 12:01:05 +03:00
Kalle
86a5e9ee2a Objective damage table change SPU/BRU 2022-10-23 11:59:03 +03:00
Kalle
3fe59c1a88 Table layout to work with any number of data cols 2022-10-23 11:18:57 +03:00
Kalle
cca225c780 Remove calculations from component code 2022-10-23 11:13:02 +03:00
Kalle
9708043463 Add distance to obj dmg table headers 2022-10-23 10:50:53 +03:00
Kalle
b448c19b71 Object damages with calculation 2022-10-22 16:43:31 +03:00
Kalle
89e525307f Merge branch 'rewrite' of https://github.com/Sendouc/sendou.ink into rewrite 2022-10-22 12:50:28 +03:00
Kalle
63a80c8ecd Object damage hitpoints initial 2022-10-22 11:43:19 +03:00
Remmy Cat Stock
3ce7c00d5b
Detect active nav item via route handle instead of path matching 2022-10-21 18:29:23 +02:00
Remmy Cat Stock
85fda204c0
Refactor breadcrumbs into a component that uses route handles 2022-10-21 00:48:58 +02:00
Remmy Cat Stock
db4f633a47
Add type for route handles 2022-10-21 00:48:10 +02:00
Remmy Cat Stock
76afa161fc
Implement user result highlights UI 2022-10-18 23:41:01 +02:00
Kalle
586c27eaa7 Object damage calculator page initial 2022-10-18 01:12:52 +03:00
Remmy Cat Stock
974b65b642
Fix edit badge dialog flickering 2022-10-16 10:17:33 +02:00
Remmy Cat Stock
9f7faa2054
Improve result placement display with custom medal icons 2022-10-15 13:17:04 +02:00
Kalle
1a8ede563e Fix map list generation crash if small map pool 2022-10-15 11:54:06 +03:00
Kalle
7ccfe79984 Add title to maps page 2022-10-14 23:16:56 +03:00
Remmy Cat Stock
a215e0b3e1 Fix overflow for user results table on narrow viewports 2022-10-13 23:03:42 +02:00
Remmy Cat Stock
8aea2c19a8 Add participants count to user results table 2022-10-13 23:03:15 +02:00
Kalle
a368877e08
Merge pull request #1009 from remmycat/result-tab-count
Add results count to user page tab
2022-10-13 23:45:30 +03:00
Kalle
3b4b498750 Translation chore 2022-10-13 23:41:40 +03:00
Kalle
ae3f706f24 Maps page translated 2022-10-13 23:22:26 +03:00
Kalle
f81ac674e1 Link to iplabs 2022-10-13 22:38:46 +03:00
Kalle
31d233025a Copy to clipboard button 2022-10-13 22:26:28 +03:00
Kalle
b473e64e12 MapPoolSelector a bit better mobile layout 2022-10-13 21:56:15 +03:00
Kalle
6b49d06f57 Maps preparation for prod 2022-10-13 21:45:36 +03:00
Kalle
8470bf228e Map pool on tournament page 2022-10-13 21:39:40 +03:00
Kalle
0f2a5ee728 Remove action related code from maps page 2022-10-13 20:36:02 +03:00
Remmy Cat Stock
45cc8cea1f Add results count to user page tab 2022-10-13 18:55:53 +02:00
Kalle
4108637a30 Save map pool in edit calendar event page 2022-10-13 19:22:23 +03:00
Kalle
bdba03a5d8 Datalist on maplist page initial 2022-10-11 20:14:32 +03:00
Kalle
6770b8e214 Map pool from server 2022-10-09 19:06:22 +03:00
Kalle
e00c7cf531 Submit map pool initial 2022-10-09 12:27:09 +03:00
Kalle
20a5beb119 Add function 50% SZ toggle 2022-10-09 10:55:11 +03:00
Kalle
b1042f8e37 Generates map lists 2022-10-09 00:58:19 +03:00
Kalle
d654594ed8 Remove bad custom urls script 2022-10-08 10:36:28 +03:00
Kalle
d5bdd42188 Don't show map list makes in prod yet 2022-10-08 10:14:48 +03:00
Kalle
8ff23fb068
Merge pull request #997 from halp-pat/987
Stat Card values should be on the same line
2022-10-06 20:58:46 +03:00
Kalle
34e134acaf Maps with serializing to URL 2022-10-06 20:54:14 +03:00
Kalle
87bca7aa44 Maps page initial 2022-10-06 20:54:14 +03:00
[Halp!]Pat
469439eec2 Stat Card values should be on the same line 2022-10-05 10:18:08 -07:00
Kalle
d4ef59e64c Add in-progress zh translation 2022-10-03 20:29:29 +03:00
Kalle
16ad28d617 Run speed while shooting stats
Closes #963
2022-10-02 21:14:56 +03:00
Kalle
73e31da398 Validate no motion sens set if no stick sens set 2022-10-02 12:29:54 +03:00
Kalle
7b038d87d9 Extra infos on user page 2022-10-02 12:20:19 +03:00
Kalle
a4614a61f7 Profile edit form can submit sens 2022-10-02 11:39:16 +03:00
Kalle
5706bfd812 Add IGN inputs 2022-10-02 10:44:45 +03:00
Kalle
5e617e7914 Custom URL submitting error handling 2022-10-02 00:43:55 +03:00
Kalle
ff857f3369 Custom URL url redirects and replacements 2022-10-02 00:25:13 +03:00
Kalle
34c8e45684 Fix user page crashing if invalid link 2022-10-01 20:39:10 +03:00
Kalle
709d20bf13 Set custom url in profile edit 2022-10-01 20:38:40 +03:00
Kalle
9133803661 Add Charakiga to translators 2022-10-01 11:44:53 +03:00
Kalle
34c1b0e71a User custom url, ign & sens initial 2022-09-29 23:26:31 +03:00
Kalle
2c330620fb Add button to analyzer to build card 2022-09-27 21:53:12 +03:00
Kalle
2495edc5b7 Rename Popover trigger prop
Closes #893
2022-09-27 21:21:21 +03:00
Kalle
456ed5e95b Add translator 2022-09-27 21:14:49 +03:00
Kalle
24461f75aa Fix weapon deslugifying not working w/ other langs 2022-09-25 16:36:23 +03:00
Kalle
9b28490450 Add builds peek to front page 2022-09-25 15:33:00 +03:00
Kalle
a5fad589e8 Add limit + load more logic to builds page 2022-09-25 14:55:20 +03:00
Kalle
a589b6b903 Add owner to BuildCard 2022-09-25 13:11:03 +03:00
Kalle
88c1fa5b9e Refactor BuildCard to take attributes in one obj 2022-09-25 12:58:22 +03:00
Kalle
3e9b5a1da9 BuildsCards on builds page initial 2022-09-25 12:48:32 +03:00
Kalle
76dce82714 Add title to builds page 2022-09-25 12:03:02 +03:00
Kalle
a9c8daa360 Builds page Add build button 2022-09-25 11:53:51 +03:00
Kalle
fe7237ba4c Builds page breadcrumbs 2022-09-25 11:47:39 +03:00
Kalle
24330b72ed Working links on build index page 2022-09-25 11:05:51 +03:00
Kalle
494e5af5f7 Builds index page initial 2022-09-25 00:29:49 +03:00
Kalle
fe67eb8df7 Add translators to contributions
Closes #932
2022-09-24 14:51:24 +03:00
Kalle
42c9f3292c Fix typoed translation key 2022-09-24 11:49:45 +03:00
Kalle
72fda5e718 Fix ' not showing correctly on FAQ page
Closes #934
2022-09-24 10:55:54 +03:00
Kalle
de3307f031 Fix StatCategory bottom text not mobile friendly 2022-09-22 21:48:21 +03:00
Kalle
945f0e267c Align stat card values 2022-09-22 00:44:56 +03:00
Kalle
829e564eb6 Add BRU Beakon effect 2022-09-21 00:17:59 +03:00
Kalle
18a7f7edae Add Squid Surge IA effect 2022-09-20 23:42:01 +03:00
Kalle
2d9dd3f91e Build Analyzer to prod! 2022-09-20 20:48:41 +03:00
Kalle
a2f2af1f62 Analyzer mobile layout 2022-09-20 20:41:37 +03:00
Kalle
37738ad8e5 Add Tacticooler effect 2022-09-19 23:36:40 +03:00
Kalle
d5ddc97e7c Ink Vac SPU effect 2022-09-19 20:27:48 +03:00
Kalle
059d738340 Wave Breaker SPU effect 2022-09-19 17:58:38 +03:00
Kalle
5b64515976 Booyah Bomb SPU effect 2022-09-18 21:26:59 +03:00
Kalle
2be14cda3b Ink Storm SPU effect 2022-09-18 21:14:47 +03:00
Kalle
cabdbd1da4 Tenta Missiles SPU effect 2022-09-18 21:14:47 +03:00
Kalle
502240ad23 Zipcaster SPU effects 2022-09-18 21:14:47 +03:00
Kalle
6ef1b0c55b Big Bubbler SPU effects 2022-09-18 21:14:47 +03:00
Kalle
64d2a64b5f Trizooka paint and damage radius effect 2022-09-18 21:14:47 +03:00
Kalle
34a77b6506 Special duration stat 2022-09-18 21:14:47 +03:00
Kalle
2fa5a63a6d Make sure main weapon category isn't rendered empty 2022-09-18 21:14:47 +03:00
Kalle
bb9eb2be31 More descriptive jump RNG reduction stat 2022-09-18 21:14:47 +03:00
Kalle
de3a7995b2 Add popover and explain IA jump RNG reduce 2022-09-18 21:14:47 +03:00
Kalle
b601c0421c IA jump RNG reduction effect 2022-09-18 21:14:47 +03:00
Kalle
8539205f71 Bomb Heavy/Light damage 2022-09-18 21:14:47 +03:00
Kalle
40679764a9 Add RP/NS icons to modified by row 2022-09-18 21:14:47 +03:00
Kalle
d10d4bf0c5 Calculate own use of RP 2022-09-18 21:14:47 +03:00
Kalle
3b8582d455
Merge pull request #949 from DoubleCookies/i-946
Other default value + empty onChange
2022-09-18 20:53:28 +03:00
Kalle
4eeac475de Allow browsing analyzer in prod for a few users 2022-09-18 12:00:39 +03:00