Commit graph

418 commits

Author SHA1 Message Date
Christian Fehmer
e5e03b603f
feat: Allow more results for premium users (fehmer) (#4767)
* wip: More results and filters for premium users

* use offset+limit instead of beforeTimestamp, add configuration for max results for regular/premium users

* add isPremium to /users response

* cleanup

* review comments

* review comments

* update base config

* update premium data type

* add undefined check

* interface name

* add start timestamp

* refactor

* move function to util, rename params, use isFinite

* merge fix

* fixed tests

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2023-11-10 13:55:35 +00:00
Bruce Berrios
e84f9ec5b7
refactor: add shared types (Bruception) (#4769)
* sharing is caring?

* replace 5 year old package with a more modern one

* ignore firebase config

* update import/resolver settings so that we no longer have to ignore @backend imports

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2023-11-09 14:03:56 +00:00
Christina Hanson
6b77f81201
feat(funbox): add mode that doubles each letter (LyricLy) (#4771)
* feat: add mode that doubles each letter to funbox

* increase difficulty

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2023-11-09 13:56:37 +00:00
Miodec
9b8c452064 impr: remove words which might trigger false positives for profanity 2023-11-08 14:37:48 +00:00
Miodec
52ea0a6cbd impr: add local api server configuration cache 2023-11-07 16:34:05 +00:00
Miodec
daaab016e2 impr(account page): add button which hides results on the account graph
when results are hidden, accuracy scale will be maximised to fit the graph height
2023-11-06 15:08:48 +00:00
Christian Fehmer
5ce886677b
docs: fix swagger documentation (fehmer) (#4766) 2023-11-06 13:05:45 +00:00
Miodec
78ecdcf91e impr(quick restart): add "enter" as an option to quick restart 2023-11-02 14:07:54 +00:00
Miodec
8942ee2813 refactor: add firebase 500 handling 2023-10-27 14:46:32 +01:00
Miodec
47c8668069 impr: allow low accuracy scores to be submitted if opted out of leaderboards 2023-10-27 14:17:20 +01:00
Miodec
e3ce7b2458 refactor: allow apekeys if endpoint is public
This partially reverts 923f69ab55.
This is because we sometimes still need the decoded token in public endpoints.

If an endpoint doesnt accept ape keys BUT its public, we dont return a 401 error.
2023-10-25 16:00:03 +01:00
Miodec
d5c8f0dafd impr(server): remove discord roles on account reset
closes #4730
2023-10-20 12:38:00 +01:00
Aaron
3a4d8effdb
fix(server): rework 'revoke all tokens' flow (hattorius) (#4717)
* Remove tokens from cache

* Async method not necessary

* Whoops

* Better naming

* smol name change

* uncomment settings section

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2023-10-16 16:57:14 +01:00
Christian Fehmer
0f6884a5be
impr: detect development mode based on config instead of window.location (fehmer) (#4703)
* impr: detect development mode based on config instead of window.location

* Allow access to /configure on the backend using non-local ip

* Use webpack define plugin

* take BACKEND_URL from env
2023-10-09 18:46:40 +01:00
Miodec
0c3b6e4d8c impr(funbox): rework backwards funbox
closes #4711
2023-10-09 18:07:07 +01:00
Miodec
8e2dff43be chore: add alternative config schema for the transition period 2023-10-02 17:48:37 +01:00
W0LFB0MB
fa01558876
impr(sound): add support for various error sounds (W0LFB0MB) (#4679)
* Add files via upload

* Delete frontend/static/sound/error/triangle.wav

* Delete frontend/static/sound/error/damage.wav

* modified error sound code to support multiple sound options and added two error sound alternatives

* added compatability for previous users of the error sound, converts legacy true/false config values to 1 or off

* fixed opiton names and values in commandline

* fix: auto switch theme behavior & footer theme indicator (#4677)

* fix: auto switch theme behavior & footer indicator

Changing manually to a preset or custom theme now
turns auto switch theme mode off with a notification.
And now the auto switch mode does override the custom
theme as well (statement in settings also updated) if it
is the later one set.
Fixes #4659, that is the footer theme is now correctly
displayed with auto switch themes as well.

* removed unnecessary function

---------

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

* fixed off config value

* moved compatibilty code to replaceLegacyValues

---------

Co-authored-by: Sanidhya Singh <sanidhyas3s@gmail.com>
Co-authored-by: Miodec <jack@monkeytype.com>
2023-10-02 16:09:30 +01:00
Miodec
923f69ab55 impr(server): don't return errors for public endpoints when providing authorization 2023-09-26 14:44:45 +01:00
Miodec
89e8fef2b3 feat(funbox): add backwards funbox
closes #4661
2023-09-26 14:36:51 +01:00
Miodec
443a6a59ee fix(server): catching possible errors to provide better messages to the client 2023-09-04 13:15:41 +02:00
Miodec
babd92d6e2 fix(badge): make sure the 365 streak badge is not awarded multiple times 2023-09-04 09:17:26 +02:00
Miodec
2a478a0440 impr(badge): add all year long badge, awarded on 365 day streak 2023-09-03 13:03:26 +02:00
Miodec
b9351c6d9d fix(server): make sure to lowercase email when updating 2023-09-01 19:14:40 +02:00
Miodec
0a163582bd refactor: duplicating object to make sure old streak is logged 2023-08-31 20:25:24 +02:00
Miodec
87e882b94d feat(security): add revoke all tokens button
With this, user can sign out all sessions if they think their account has bee compromised.
2023-08-31 14:05:21 +02:00
Miodec
4c74d33786 fix(server): incorrect return type for all time lb rank 2023-08-23 00:00:53 +02:00
Danish arora
0086398073
impr: show min speed if not qualified for daily lb (HyperDanisH, Miodec) (#4519) 2023-08-21 14:06:32 +02:00
Brian Evans
f67860ee2a
perf: use async file system read API in new quotes (mrbrianevans) (#4560) 2023-08-21 11:09:55 +02:00
PizzaTheGreat
5a7eb2ab1d
chore: typo (everypizza1) (#4556) 2023-08-18 17:21:08 +02:00
Miodec
3445f51cde impr(server): increase tag limit to 15 2023-08-18 11:42:41 +02:00
Miodec
b88673b1bf chore: id instead of name 2023-08-17 21:45:59 +02:00
Miodec
dc7f70d55f chore: remove logs 2023-08-17 21:34:04 +02:00
Miodec
7f7d3339fd feat(server): add github webhook api route 2023-08-17 21:33:08 +02:00
Miodec
97f518f15b fix: ensure funboxes are eligible for daily lbs 2023-08-11 16:38:18 +02:00
Miodec
88f4141588 removing more legacy properties 2023-08-10 17:12:36 +02:00
Christian Fehmer
0d5cd3eb02
Added highlight modes next word, next two words and next three words (#4516) fehmer
* Added highlight modes next word, next two words and next three words

* updating active element to make sure change is visible when applied from the commandline

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2023-08-10 15:05:07 +02:00
Miodec
d6babe0194 fixed incorrect definition 2023-08-08 14:12:42 +02:00
Miodec
bd93852762 added legacy config to remove 2023-08-08 12:17:07 +02:00
Miodec
f34e45d676 updated funbox difficulty 2023-08-07 18:17:21 +02:00
Miodec
4cbcf6a96b added code that will unset any legacy values that are still in the db config 2023-08-07 01:28:18 +02:00
Miodec
0960d32a1a removing user from auth if no data was found in the db 2023-08-06 22:19:54 +02:00
Christian Fehmer
1f4df9199d
Added configuration for typing speed unit, removed alwaysShowCPM (#4492) fehmer
* Added configuration for typing speed unit, removed alwaysShowCPM

* review comments

* fix live-burst, activityChart and results-pb label

* Added support for typing speed unit in account histogram chart

* trigger build

* Update account.ts

* Fix chart scaling and wpm/rawWpm hovers on result page
fix chart scaling and bucket size on account page

* refactor histogramChartData to support 0.5 steps

* Revert dynamic scaling on accounts/result graph

* Refactor histogramChartData to an int[]

* Fix cutoff in account history

* Fix labels on result page

* Limit result chart label to two decimals

* renamed show average wpm to show average speed

* fix scaling on accounts history graph (again),   not adding an easteregg 🤫

* hiding by default

* fix scaling on accounts history graph episode three

* move typingSpeedUnit related functions out of Misc

* updating account page if typing speed unit changes

* updating result page if changing units on the result page

* missing buton change

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2023-08-04 13:22:27 +02:00
Christian Fehmer
b50b473aba
Added crt mode to the funbox (#4465) fahmer
* Added crt mode to the funbox

* remove borders, move screen glow to body, remove lines animation

* removes white flash on test restart, keep crt mode on result page

* cleanup removal of funbox css

* fix white flash when disabling crt mode, fix background

* use actual color for text glow

* fix rendering issue with glow

* adds glow to input, buttons, logo and carets

* prefix new variables with -crt, update themes to fit crt mode

* adds glow to textarea, avatar and fix glow in focus mode

* fix typo in lavender theme

* move crt related stylesheets to separate file, add scanline div on demand

* add applyGlobalCss to keep the theme active on pages outsite the test page

* made sure crt works globally
added a clear global function
calling apply global and clear global when toggling funboxes
delaying globalcss apply because about page for some reason doesnt like funbox css files

* add glow to banner

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2023-07-31 16:32:33 +02:00
Miodec
50c96006c2 removed duplicate header 2023-07-25 17:47:17 +02:00
Miodec
59c34fc988 only allowing 100 submissions per language 2023-07-25 17:00:29 +02:00
Miodec
753d9649e8 updated response schema 2023-07-25 16:43:00 +02:00
Miodec
574532f280 added endpoint to check if quote submission is enabled 2023-07-25 16:40:29 +02:00
Miodec
2e8c58365f sending client version in headers
logging which client versions are getting errors
closes #4475
2023-07-25 15:46:46 +02:00
Miodec
ebcc212605 catching drop errors, should fix #4440 2023-07-21 13:04:18 +02:00
Miodec
685668a6b8 todo 2023-07-18 19:18:55 +02:00