Commit graph

487 commits

Author SHA1 Message Date
Miodec
5bee69a639 impr(server): also dont allow name changing for banned users 2024-04-28 19:33:55 +02:00
Miodec
bfe39c62de impr(server): dont allow banned accounts to reset or delete their data 2024-04-28 16:44:49 +02:00
Miodec
a2078dab17 fix(server): not being able to save custom text shuffle tests 2024-04-28 13:25:04 +02:00
Miodec
36df36be73 feat: add max line width
controls how many characters per line (estimated) to display during the test
literally bullied into adding it back, hope you love me again
2024-04-26 20:01:32 +02:00
Miodec
79e8566f95 refactor(config): remove "show live progress" and move it to "live progress style: off" 2024-04-25 12:58:08 +02:00
Jack
4039ed8b26
refactor: media queries (#5329) 2024-04-24 14:22:41 +02:00
Jack
ccc9a39a99
refactor: custom text logic and modal (#5327) 2024-04-23 16:58:00 +02:00
Sanidhya Singh
cebec73f6d
impr(backend): add ability to send report feedback to user about accepted and rejected reports (sanidhyas3s) (#5298)
!nuf
2024-04-23 11:54:06 +02:00
Miodec
4607297c95 impr(reporting): dont allow users to report the same content multiple times
closes #5288
!nuf
2024-04-08 12:56:58 +02:00
Christian Fehmer
a306ab4f32
impr(profile/account page): show leaderboard rank percentage (fehmer) (#5212) 2024-03-25 12:36:25 +01:00
Miodec
26d61f595f chore: better error message 2024-03-18 12:04:53 +01:00
Miodec
1686287f93 impr(dev): add configurable server response slowdown 2024-03-14 23:04:01 +01:00
Miodec
0ac470656c refactor: move /configuration below the artificial dev slowdown 2024-03-14 22:35:12 +01:00
Christian Fehmer
8eb3206c8a
refactor: get actual rank with the user data instead of using lbmemory (fehmer) (#5189)
Co-authored-by: Jack <jack@monkeytype.com>
2024-03-11 20:29:18 +01:00
Martin Trigaux
1bb0bdffb0
fix(server): config saving with layout that includes a dash (mart-e) (#5193)
* [FIX] Accept layout with dash

At least seht-drai and ergo-l is not compatible

* add regex

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2024-03-11 20:17:10 +01:00
Christian Fehmer
c95e3b2fa8
feat: indicate premium users (fehmer) (#5092)
* feat: indicate premium users

* frontend

* Test multiple userFlags, remove later

* cleanup

* fix flag alignment on profile and leaderboards

* fix name auto scaling

* update screenshot watermark

* update header text

* use userFlags for lbOptOut

* use flex end

* removeo unused code, increase margin

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2024-03-05 16:09:23 +01:00
Christian Fehmer
171133c795
chore: fix eslint errors (fehmer) (#5166)
* fix eslint errors

* better type

* update type

* define type instead of ignoring errors

* add comment

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2024-03-04 15:25:32 +01:00
Christian Fehmer
f7fe0e3f01
impr: better handling of ghost accounts (fehmer) (#5159)
* impr: better handling of ghost accounts

* move deletion to server

* wording
2024-03-04 14:23:33 +01:00
Miodec
f7f09d16b1 fix: error when trying to update result tags 2024-02-29 15:10:48 +01:00
Miodec
a6cc2b5eff chore: throw if recaptcha secret is undefined 2024-02-27 00:43:17 +01:00
Sachin Kumar
1429c2ca8c
impr: save pbs for numbers mode separately (notreallystatic, miodec) (#4946) 2024-02-22 15:07:42 +01:00
Jack
01790d8a3a
refactor: shared user types (#5080)
* move user to shared definitions

this includes whatever user can have on it, tags, presets and so on

* profiles, mail and others

* fix logic

* yeet

* same as master for now

* tsc fixes

* remove comment

* fix tests

* chore: omit ips

* fix(language): remove some unnecessarily capitalised words in german 1k

* fix(typing): first space sometimes soft locking the website

* perf: speed up settings page loading

* fix: use selected typing speed unit on personal best popup (fehmer) (#5070)

* fix: Use selected typing speed unit on personal best popup

* refactor

* refactor

* test coverage

* use Format in more places

* Make config mockable

* dependency injection

* wip

* fix

* test

* touch

* fix(language): typos in russian_10k.json (kae) (#5082)

* Update russian_10k.json

- fixed typos
- removed duplicates

* - fixed extra typos

* remove duplicates

* fix(language): typos in russian_10k.json

* feat: add copy missed words to result screen (fehmer) (#5086)

* feat: Add copy missed words to result screen

* remove margin

* update icons

---------

Co-authored-by: Miodec <jack@monkeytype.com>

* impr(funbox): add 46 group languages to wikipedia funbox (RealCyGuy) (#5078)

* impr: provide all-time LB results during LB update (fehmer) (#5074)

Try to provide LB results during the LB update. There is a very small time-frame where
already running queries might fail during the update. For now we keep the 503 error in this
cases and monitor how often this happens on production.

* impr(funbox): add ` (grave accent, 96) and ~ (tilde, 126) to specials (#5073)

* impr: add testWords and wordsHistory to copy result stats (#5085)

* feat: add testWords and wordsHistory to copy result stats

* fix

* add fe ts dep

---------

Co-authored-by: Christian Fehmer <fehmer@users.noreply.github.com>
Co-authored-by: Andrey Kuznetsov <akuznetsov@outlook.com>
Co-authored-by: Cyrus Yip <cyruscmyip1@gmail.com>
Co-authored-by: fitzsim <fitzsim@fitzsim.org>
2024-02-19 17:15:15 +01:00
Christian Fehmer
bf2c4cc5bb
impr: provide all-time LB results during LB update (fehmer) (#5074)
Try to provide LB results during the LB update. There is a very small time-frame where
already running queries might fail during the update. For now we keep the 503 error in this
cases and monitor how often this happens on production.
2024-02-19 14:59:30 +01:00
Miodec
d6ab4bfb2c chore: omit ips 2024-02-19 00:43:35 +01:00
Miodec
6cb8f52cf2 chore: fix build error 2024-02-18 01:52:03 +01:00
Miodec
b7594ab684 chore: move withobjectid to backend types 2024-02-17 18:42:51 +01:00
Christian Fehmer
a72aa04c53
fix: leaderboard consistency being null (#5055) 2024-02-14 23:28:51 +01:00
Miodec
ee3f9d43a8 chore: ignoring line
for some reason when i use ts-expect-error its saying unnecessary,
but when i remove it i get an error
2024-02-12 16:52:57 +01:00
Jack
084d42c62e
refactor: enable @typescript-eslint/strict (#5028)
* enable rule

* eslint --fix

* fixes

* --fix

* fixes

* fixes

* fixes

* extract into const
2024-02-12 16:46:56 +01:00
Christian Fehmer
5c725f7ee3
fix: leaderboard discord properties being null (fehmer) (#5032) 2024-02-12 13:04:05 +01:00
Miodec
e31613533c refactor(types): result types
move to shared types (#4774)
add types to ape client (#4786)
2024-02-08 17:57:45 +01:00
Miodec
15c697802d refactor(types): leaderboard types
move to shared types (#4774)
add types to ape client (#4786)
2024-02-08 17:44:46 +01:00
Miodec
2dfd7c2a04 chore: checking if key data is longer than 0 2024-02-08 15:34:03 +01:00
Miodec
4ea7cea0ce chore: add a quick way to emulate api delay on localhost 2024-02-08 15:14:55 +01:00
Jack
cdfc7833e3
refactor(types): shared config and preset types (#5024)
* build: include all shared types files instead of just one

* move config property value types to a shared file

* backend build issues

* shared preset and config types
preset and config ape types

* typo

* ignoring unused warnings

* fixed merge
2024-02-08 14:32:04 +01:00
Absalon43
78bb715885
feat(sounds): add fist fight and rubber keys (Absalon43) (#4984)
* Add files via upload

* feat: add support for fist fight and plastic toy sounds

* feat: add support for fist fight and plastic toy sounds

* chore: remove extra semicolon

* feat: less busy punch sound

* feat: add punch misses as error sound

* fix: update punch sounds and make them less aggresive

* fix: Change name of plastic toy to rubber keys

---------

Co-authored-by: arthur-d42 <64164367+arthur-d42@users.noreply.github.com>
Co-authored-by: arthur-d42 <arthurdiness@gmail.com>
2024-02-08 12:01:18 +01:00
Miodec
4f5f28a92d refactor(types): ape keys types
move to shared types (#4774)
add types to ape client (#4786)
2024-02-07 23:13:10 +01:00
Miodec
efb972a659 refactor(types): public types
move to shared types (#4774)
add types to ape client (#4786)
2024-02-07 22:29:16 +01:00
Miodec
65120db1f0 refactor(types): PSA types
move to shared types (#4774)
add types to ape client (#4786)
2024-02-07 19:06:06 +01:00
Jack
f456e1e615
refactor: enable no-floating-promises rule (#5007)
* enable rule

* backend

* fixes

* more fixes

* mooore fixes

* fixes

* fixed double void

* change some voids to await

* await -> void

* remvoe void

* missing return

* awaiting config update
2024-02-07 18:49:12 +01:00
Miodec
020eb7b44e fix: fixing a fix where a previuos fix didnt fix the issue
completed event doesnt have isPb property, so the delete didnt work
2024-02-07 09:51:31 +01:00
Miodec
a11314f11c impr(server): not saving 503 errors to the database 2024-02-07 09:50:43 +01:00
Miodec
ead765d57a fix(server): only saving isPb property in the database if the result was a pb
this was the previous behaviour but #4980 broke it
2024-02-07 09:28:54 +01:00
Miodec
f8109e0d98 chore: fix eslint error 2024-02-06 14:19:50 +01:00
Jack
83a4c0e6aa
refactor: enable strict-boolean-expressions rule (#4992) 2024-02-06 14:01:45 +01:00
Miodec
5cea19e299 chore: add todos 2024-02-05 12:37:30 +01:00
Jack
8b48347764
refactor: result types (#4980)
* further shared improvements
 - moved more types to shared
 - reworked the way results are typed

THIS COULD CHANGE LOGIC, TEST THIS

* removed comment

* update the way completed event is built on the client

* remove unnecessary property

* comment

* move hash check higher

* remove todo

* fix incorrect type

* updated type
remove field if undefined
2024-02-01 11:54:25 +01:00
Jack
0751375ab6
refactor: shared types (miodec) (#4978)
* rework shared types

* revert one small change
2024-01-29 15:53:42 +01:00
Jack
ee629db5b5
build: enable noUncheckedIndexedAccess compiler rule (Miodec) (#4958)
* added rule to backend and fixed all the errors

* setup frontend and start fixing some warnings

* more fixes

* fixes

* fixes

* fixes

* more refactoring

* fixes

* pain

* more pain

* ouch

* mooore

* 10 hours later

* ugghhh

* another one

* last element can be undefined duh

* smol one

* absolute typescript gigachad

* moooore fixes

* chart stuff

* almost done

* its... done

* remove console log

* use for of instead
2024-01-29 13:27:36 +01:00
Miodec
f099ccfe3b fix: email enumeration vulnerability 2024-01-24 13:09:45 +01:00