Commit graph

2637 commits

Author SHA1 Message Date
Jack
55e183e7bb
impr: add local storage with schema class to improve type safety (@miodec) (#5763)
!nuf
2024-08-12 17:04:01 +02:00
Walid Mosbahi
38a8529808
impr(commandline): preview error sound on hover (@Bretis2019) (#5769)
* fix: play sound on error  on hover in settings pop up menu

* name

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2024-08-12 16:51:16 +02:00
Miodec
692d3f5920 impr: deep copy constant objects when retrieving them 2024-08-12 15:50:34 +02:00
Christian Fehmer
c6e8f413fc
impr: use tsrest for leaderboard endpoints (@fehmer) (#5717)
!nuf
2024-08-12 14:08:17 +02:00
Breno Queiroz Lima
d7a40c8d5a
fix(save custom text modal): save button not being enabled (@brenob6) (#5759)
* fix: invalid return values

* add: hexToRgb test suite

* test: update hexToRgb test value

* add more tests

* fix: save custom text button not enabled (#5692)

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2024-08-12 12:25:09 +02:00
Miodec
24e94479d3 style: only apply error underline when moving to the next word 2024-08-10 21:45:47 +02:00
Miodec
142b51cc26 style: sliiiightly increase the horizontal word margin 2024-08-10 14:55:47 +02:00
Miodec
002ef8f6bf fix(caret): not working in zen mode 2024-08-10 14:55:47 +02:00
Christian Fehmer
a9caf24427
fix: documentation link in settings (@fehmer) (#5755) 2024-08-09 22:21:18 +02:00
Christian Fehmer
cfea8eef19
refactor: use single client for whole contract on frontend (@fehmer) (#5752)
* refactor: use single client for whole contract on frontend (@fehmer)

* review comments
2024-08-09 22:07:09 +02:00
Miodec
f32846de32 refactor: getLocalPb returns pb object instead of just wpm
also use this function in test logic
also fixes todo
2024-08-09 12:40:15 +02:00
Christian Fehmer
c50535cd0f
impr: use tsrest for public endpoints (@fehmer) (#5716)
!nuf
2024-08-09 12:39:27 +02:00
Miodec
6c9148624e impr: use authentication state instead of the dom
!nuf
2024-08-09 11:55:54 +02:00
Miodec
90e3ad4957 refactor: move psa check to after auth was initialised 2024-08-09 10:45:57 +02:00
Christian Fehmer
0d7e3cf916
fix: don't send authentication if user is not authenticated (@fehmer (#5747) 2024-08-08 19:00:02 +02:00
Christian Fehmer
2d24fc323e
fix: remove tailing slashes from new endpoint urls (@fehmer) (#5745)
!nuf
2024-08-08 18:12:50 +02:00
Christian Fehmer
f6ec006507
impr: use tsrest for psa endpoints (@fehmer) (#5712)
!nuf
2024-08-08 15:10:26 +02:00
Nad Alaba
657d305abc
fix(caret): jumping in word tape mode and RTL position issues (@NadAlaba) (#5726)
* fix(caret): jumping in word tape mode (@NadAlaba)

* fix(caret): diacritics getting caret width of last letter

* fix(caret): hide extra letters in RTL languages

* fix(caret): add space width for non-mono fonts

* optimize getting space width

* refactor assignmet in conditional and remove console.log

* move left calculation in tape mode to getTargetPositionLeft

* no need to calculate left 2 times in tape mode

* prophylactically consider future changes of hide extra letters

* treat blind mode and hide extra letters the same

* change naming and fix tape word

* final refactor

* change naming

* nope, cleaner version doesn't work

* || instead of ?? for letter.offsetTop

* reduce unneeded code

* chore: run anticheat for banned accounts

---------

Co-authored-by: Jack <jack@monkeytype.com>
2024-08-08 13:49:24 +02:00
dependabot[bot]
dfdf3fc6cd
chore(deps-dev): bump typescript from 5.3.3 to 5.5.4 (@dependabot) (#5734) 2024-08-08 12:44:22 +02:00
Miodec
a558a59a5a refactor: change hideExtraLetters from being html based to css based
!nuf
2024-08-05 20:13:52 +02:00
Miodec
41638dd142 style(settings page): fix pace caret buttons text overflow 2024-08-05 19:50:54 +02:00
Miodec
7306cf8a9f feat: last signed out result modal
the website will now show the last signed out result
and ask the user if they want to save or discard it
(instead of always saving)
2024-08-05 14:28:31 +02:00
Miodec
ddebf57454 impr: add "student" to education email regex
!nuf
2024-08-05 12:46:41 +02:00
Miodec
de79d469cb impr: add email typo to the list
!nuf
2024-08-05 12:44:28 +02:00
Miodec
cbd6725ad6 refactor: move pb crown aria-label text update to a function 2024-08-05 12:41:27 +02:00
Miodec
f0441e2b66 chore: remove unused code 2024-08-05 12:26:45 +02:00
Miodec
7b7b1c86ea fix(pb crown): incorrect class names causing ineligible warning or pending state to not show 2024-08-05 12:13:56 +02:00
Adam Sasine
b26cb887e4
feat(funbox): add hexadecimal (@asasine) (#5724)
* feat(funbox): added hexadecimal

* missing list definition

* lower max to 4

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2024-08-05 10:53:03 +02:00
Nad Alaba
738574ed33
impr(pace caret): add tags pb mode (@NadAlaba) (#5715)
* impr(pace caret): add tags pb mode (@NadAlaba)

* update modes notice when clear tags from commandline

* remove all mode because it grabs only 1k results

* short circuit tag.active

* update setting name

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2024-08-02 21:50:56 +02:00
amarnathsama
8c7ece3721
impr(settings): replace sound volume with a slider (@amarnathsama) (#5702)
* replaced sound volume settings with a slider

* used SettingsGroup instead of custom class, minor css change

* use common structure, remove css

* notify if sound volume is out of range

* command input goes from 0 to 1

* fix test

---------

Co-authored-by: Jack <jack@monkeytype.com>
2024-08-02 21:15:40 +02:00
Miodec
8527b33b06 impr: remove ñ from lazy mode replacements
this character is always available on the keyboard, not hidden in a layer or a dead key
2024-08-02 11:11:52 +02:00
Jack
fe50fe1659
fix(frontend api adapter): use abortcontroller.abort when abortsignal.timeout is not available (@miodec) (#5714)
* setTimeout approach

* better approach

* remove console log

* better polyfill check
2024-08-02 10:57:43 +02:00
Miodec
b22e0a407d fix(caret): incorrect placement in tape mode: word 2024-08-02 10:50:33 +02:00
Christian Fehmer
482de29460
fix: not being able to make requests on very old browsers (@fehmer) (#5711) 2024-08-01 13:30:03 +02:00
Christian Fehmer
8a09acd8d5
impr: use tsrest for ape-keys endpoint (@fehmer) (#5706)
!nuf
2024-08-01 13:29:25 +02:00
Miodec
981f9668c9 fix(caret): incorrect placement in tape mode 2024-07-31 18:16:39 +02:00
Miodec
9858d93dc2 fix(config): keymap size not persisting 2024-07-31 18:16:39 +02:00
Rizwan Mustafa
7a4db1ef9c fix(funbox): sometimes generating unrealistic ip addresses (@rizwanmustafa) (#5682)
* fix: fix ipv6 compression

* chore: remove console log

* fix: remove accidental removal of last colon

* refactor: change the IPv6 compression algorithm

* fix: fix problem in compression algorithm while handling one 16 bit 0 field

* chore: move function out into utils/misc.ts

* feat: Add unit tests for compressing ipv6 and move ip-addresses.ts from test to utils

* fix: add a new test case with port and fix compression algorithm

* chore: remove console log

* test: add test case for generation of ipv4 addresses

* chore: changed generation constant from 10 to 1k

* test: add unit tests for generating ipv4, and converting ip address to cidr

* fix: fix wrong upper value

* fix: fix wrong values

* fix: really fix the ranges

* chore: fix a NaN error in test due to compressed ipv6 address being passed
2024-07-31 18:16:39 +02:00
Miodec
f86d6fcf1c fix: repeated tests that use pipe delimiter would not load correctly
closes #5685
2024-07-31 10:28:59 +02:00
Miodec
47438fa8d1 chore(lint): enable no unsafe return 2024-07-30 22:10:30 +02:00
Miodec
20c2fbc116 impr: school email detection regex
!nuf
2024-07-30 22:04:39 +02:00
Miodec
e55cd7bcb6 style(cookie modal): fix incorrect text colors 2024-07-30 21:15:56 +02:00
Jack
fe7a67d0fb
chore: add more eslint rules (#5687)
* duplicate

* no meaningless void

* no-unnecessary-boolean-literal-compare

* prefer includes

* fixes

* type cast

* ignore rule

* backend

* duplicate

* interface > type

* no-confusing-void-expression

* no-unnecessary-type-assertion

* extend plugin

* fix

* ignore
2024-07-30 18:17:58 +02:00
Christian Fehmer
6b9f4a0f18
chore: remove config from shared-types (@fehmer) (#5681)
* chore: remove config from shared-types (@fehmer)

* fix

* remove shared-types/user

* build before test

* fix

* add madge to contracts
2024-07-30 17:37:38 +02:00
Christian Fehmer
6c6e1529a2
impr: use tsrest for presets endpoints (@fehmer) (#5675)
!nuf
2024-07-30 12:58:22 +02:00
butterflycup
c906bfbe26
feat: add keymap size (@butterflycup, @fehmer, @miodec) (#5659) 2024-07-29 14:39:57 +02:00
Miodec
936aac677f fix(caret): blind mode not stopping caret in tape mode word
closes #5672
2024-07-29 13:48:35 +02:00
Miodec
b4fc3da2a6 impr(account page): add icons to titles
also slightly cleans up the css
2024-07-29 13:06:26 +02:00
Miodec
395bfae3aa impr(edit result tags): display unkown tags so that they can be removed from results 2024-07-29 12:33:01 +02:00
Christian Fehmer
7f9f704dcd
impr: use tsrest/zod for config endpoints (@fehmer) (#5649)
!nuf
2024-07-29 11:31:14 +02:00