Commit graph

1303 commits

Author SHA1 Message Date
Miodec
40423baa2a test: fix missing mocks breaking tests 2024-05-28 17:38:54 +02:00
Miodec
0c38d99bde fix(backend): use correct function
!nuf
2024-05-28 17:23:54 +02:00
Miodec
aa2466a0d1 feat(result): disallow stop on error letter from getting new pbs 2024-05-28 17:10:51 +02:00
Miodec
8e057e3cb6 impr(server): move password update from client to server
this allows us to make sure to invalidate user tokens on password change

!nuf
2024-05-28 11:06:14 +02:00
Miodec
313468cee3 chore: remove unnecessary import 2024-05-28 11:06:14 +02:00
Miodec
f7a97505db refactor(backend): revoke tokens, update email
move revoke tokens function from delete user to its own funciton (together with removing from cache)
remove authutil calls from dal and move them to the controller layer
make sure to revoke tokens on email change
2024-05-28 11:06:14 +02:00
Christian Fehmer
fd3fc7ca47
test: fix flaky tests on user creation (fehmer) (#5434) 2024-05-24 12:33:44 +02:00
Christian Fehmer
d9767ebc97
fix: testActivity not removed on account reset (fehmer) (#5427) 2024-05-23 10:53:23 +02:00
Miodec
3255654921 impr: add admin endpoint to send forgot password email
!nuf
2024-05-20 15:35:52 +02:00
Christian Fehmer
4589bbf679
feat: maintain hashed blocklist of banned usernames, emails and discordids (fehmer) (#5371)
* feat: maintain blocklist of banned usernames and email (fehmer)

* update privacy policy

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2024-05-20 12:21:14 +02:00
Miodec
b17803918b chore: migration log 2024-05-17 22:20:54 +02:00
Miodec
c164b84291 chore: better migration script logs 2024-05-17 16:57:27 +02:00
Christian Fehmer
d9e975b286
fix: migration breaking tests (fehmer) (#5397)
!nuf
2024-05-15 16:20:09 +02:00
Christian Fehmer
59615fb02c
feat(account page): add test activity graph (fehmer, Singh233) (#5309)
* wip

* wip frontend

* cleanup

* wip

* refactoring

* wip

* first working version

* wip

* update calendar with new result

* add migration script

* dates are hard

* fix naming inconsistencies

* requested changes on migration

* timezones

* update date-fns, use date-fns/utc

* resolve cyclic dependency by extracting test activity calender into new file

* cleanup

* fix increment

* fix

* tests

* test coverage

* test migration

* migration more logging

* migration add unique index on uid if missing

* update legend styling

* 53 columns

* wip

* move dropdown and legend to the top
add dropdown border
yeet hotpink
invisible filler boxes
remove year from month format

* responsive update

* lowercase months

* handle current year, fix tests

* handle year change

* make days square again

* handle newly created users correctly

* move css

* add wrapper for easier styling
rework some font sizes/widths
reorder styles

* media queries

* align

* rework styling once more

* dont commit debug

* add days full to fill the space a bit

* show partial months

* hover on 0 tests

* start dynamic calendar on sunday

* no activity

* hover

* remove label on fillers

* remove label on fillers

* fix months, update tests for months

* adjust tests to new requirements

* cleanup

* fix migration

* impr(commandline): add "add/remove quote to favorites" commands

closes #5368

* chore: remove daily lb which is no longer in the backend

* fix: dropdown element flashing for couple frames on page load

* feat(language): add japanese romaji 1k (nthngnssmnnglss)

* fix: optional chaining

!nuf

* fix(words generator): infinite custom text tests not working correctly

* chore: missing languages in list and group files

* fix(language): remove duplicates

!nuf

* add readline sync to confirm

* gh action complaints

* unnecessary check

* premium only

* add years to drop down only if premium

* Update setup-tests.ts

* test fix

* cleanup

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2024-05-15 15:23:36 +02:00
Christian Fehmer
059c9e271b
test: update to vitest 1.6.0, use v8 coverage provider (#5389) 2024-05-13 13:25:21 +02:00
Christian Fehmer
0dab2ecd7e
impr: build docker images for linux/arm64 on release (#5369)
!nuf
2024-05-13 11:53:46 +02:00
Miodec
c1e4fb3722 chore: allow user deletion again 2024-05-06 13:35:54 +02:00
Miodec
2f3fc419b8 chore: remove unused code 2024-05-05 18:11:36 +02:00
Jack
79f77b80eb
refactor: live stats (#5352) 2024-05-02 17:33:17 +02:00
Miodec
b2e563429b impr(server): dont allow banned users to unlink from discord 2024-04-30 21:19:30 +02:00
Miodec
7f04503921 impr(max line width): setting the value to 0 will now always align the words to the width of the container 2024-04-30 21:00:02 +02:00
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
Christian Fehmer
9bdbf5c595
test: replace jest with vitest on backend (fehmer) (#5314)
* test: replace jest with vitest on backend

* fix
2024-04-17 13:39:10 +02:00
Nad Alaba
bdc19de2ec
build(backend): fix dev script flags not being processed (NadAlaba) (#5296) 2024-04-09 11:58:28 +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
9432602727
impr: add selfhosting using docker only (fehmer) (#5170)
* impr: add selfhosting using docker only

* add recaptcha config and docs

* add documentation on the backend-configuration.json file, remove ---redacted--- from example config

---------

Co-authored-by: Jack <jack@monkeytype.com>
2024-03-12 12:02:13 +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
b4af0917b2
chore: improve docker files for local development (#5157) 2024-03-04 16:10:22 +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
Paul Ebose
a0416d3eba
impr(dev): allow docker compose to start the backend server (plbstl, Miodec) (#4995)
* chore: allow backend docker compose to start the api-server alongside redis & mongodb

* chore: update node versions in docker compose

* chore: add an extra compose file in backend

* docs: update advanced contribution guide with docker compose changes

* add docker script
support server_open env variable

* move files

* npm scripts
rename file

* add docker ignore

* fix redis not working

* rename file

* mounting root instead

* update docs

* update docs table of contents

* restart on fail

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2024-02-28 14:17:09 +01:00
Miodec
a6cc2b5eff chore: throw if recaptcha secret is undefined 2024-02-27 00:43:17 +01:00
Miodec
c51e2a47e4 chore: missing field in example env 2024-02-27 00:42:06 +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