Commit graph

252 commits

Author SHA1 Message Date
Jack 2a6fee088e Merge branches 'master' and 'master' of https://github.com/Miodec/monkey-type 2021-10-12 15:46:04 +01:00
Jack fbfad6aac2 showing chracter length on quote submit popup 2021-10-12 15:44:10 +01:00
Miodec 2e881a982c fixed support popup not styled. closes #1997 2021-10-12 12:59:43 +01:00
Jack 3e64f30b6a fixed pb tables popup not styled correctly 2021-10-11 19:23:12 +01:00
Jack 9ed2855aa4 added supporter 2021-10-11 16:47:30 +01:00
Jack 50aec0b9e7 added captcha to quote submission 2021-10-11 16:02:27 +01:00
Jack bb490fca9d fixed tags and preset popups not being styled. closes #1988 2021-10-11 14:41:58 +01:00
Jack 5275e16f34 added warning message to quote submission form 2021-10-10 23:44:13 +01:00
Jack cf8d258400
Quote submission (#1984)
* added new-quotes get and add routes

* added new-quotes/approve route to api

* Added front-end for quote submission

* fix language typo, force lowercase language

* Check for duplicate quote

* added unknown language handling to quote-submit

* npm i

* npm i

* language dropdown instead of input field

* mouse down instead click

* styling changes

* moved quotemod check to the controller,
added refuse endpoint,
added ability to approve and edit

* limiting quotes

* added log to quote approve

* added approve quotes button

* typo

* using the correct function, lowered limit

* added quote approve popup

* getting quotes and showing them

* error checking

* error checking

* removed console log

* stylng changes,
added refresh list button

* added disabled class

* styling changes

* handling button clicks
showing langauge and timestamp

* check if user is a quote mod

* approve button handling

* handling quote edit

* showing short quotes in red

* post, not get

* not parsing quote id to int

* parsing to objectid

* updated styling

* fixed lint warnings

* fixed up new quotes dao

* showing loader

* calling function correctly

* typo fix

* fixed wrong path,
fix broken newid,
saving file when file exists,
searching for the quote correctly when attempting to delete

* showing message

* blocking buttons and inputs when waiting for response,
unlocking after response

* deleted workflow

Co-authored-by: lukew3 <lukew25073@gmail.com>
2021-10-10 22:46:35 +01:00
Jack c80759dded missing change. 2021-10-07 19:06:24 +01:00
Jack fad01ae125 renamed layout override to layout emulator 2021-10-07 19:06:05 +01:00
Jack f7d2be17d3 unfocusing words on test finish, focusing the result div
maybe will fix #1921
2021-10-02 00:12:43 +01:00
Jack b461d3f4cd added supporter 2021-10-01 20:33:06 +01:00
Jack 041050c869 added osu and hitmarker sounds 2021-09-30 14:28:24 +01:00
Jack ac23609ab2 added sound on click 5 (typewriter) 2021-09-30 01:06:04 +01:00
SeerLite c323efea26
Rewrite input system to use <input> content (#1325)
* Rewrite input system to use <input> content

* Tab/Escape, Backspace and Enter are always handled by
  $(document).keydown.
* The rest of characters are handled by either $("#wordsInput").on("input")
  (default) or $(document).keydown (layout emulation).
* New special handling for dead keys, compose keys and diacritics in
  general with the new regex Misc.trailingComposeChars.

input-controller.js has been updated to use the above changes:
* handleBackspace() replaced with simplified backspaceToPrevious().
  On PC, a space is immediately re-added to the end of the input to make
  use of the browser/OS's Backspace. This lets the browser handle input-
  specific things like ctrl+backspace.
* handleSpace() refactored a bit to repeat less logic when word is correct
  or incorrect.

* test-ui.js updated to highlight the Misc.trailingComposeChars
correctly, and also refactored a bit to make logic easier to follow.

* AFK checking has also been simplified, now just set with a boolean
flag (TestStats.) setKeypressNotAfk() instead of checking every key and
modifier press (so incrementKeypressMod() was removed as it wasn't used
for anything else).

* Refactor input controller

New function isCharCorrect().

* Remove caps lock backspace setting

Not supported with the input rewrite anymore because we're relying on the
browser's/OS's actual backspace effects. There's no way to emulate this
keypress.

* Refactor input controller

* Reimplement opposite shift mode

* Reimplement the layout emulator

* Fix replay events for input rewrite

Now it's more flexible for a variable amount of backspacing or letter
replacing.

* Pad input with space to handle backspace on mobile

Backspace isn't fired as an event on current mobile browsers, so I worked
around that by adding a permanent space at the start of the input and
treating its removal as a fallback to Backspace to the previous word.

* Force caret to end of input on focus

Fixes initial selection on iOS.

* Use offsetTop from the DOM instead of TestUI

I didn't wanna mess too much with what happens in test-ui.js. Basically,
on a restart after having completed a test, TestUI.activeWordTop is always
wrong for some reason. This caused swipe/instant input after a restart to
always drop the first few characters.

* Prevent pasting on the input

* Revert "Reimplement opposite shift mode"

This reverts commit 9a716ad39b004f0719b05f486465ea03060430ca.

* Use key code to check opposite shift usage

Today I learned what closure actually meant.

* Accept all whitespace as word space
2021-09-30 00:22:38 +01:00
Miodec 5f6b6c15f8 added popup to view all personal bests 2021-09-24 20:22:08 +01:00
Jack c337eac37c balanced words history button spacing 2021-09-21 22:14:16 +01:00
Aaron 971afec8be
Made sure alternate command line shortcut is visible (#1883) by UnrealApex
* Renamed command line setting timer-progress bar

* Made ctrl+shift+p shortcut visible to the user
2021-09-19 00:01:22 +01:00
driazati 0c55dc792f
Remove extra space in "Sign In" link (#1867)
HTML treats newlines as whitespace and collapses it + the spaces down to
a single space which has the underline. This fixes this by tightening up
the `<span>`s

Co-authored-by: driazati <driazati@users.noreply.github.com>
2021-09-17 13:06:26 +01:00
Jack c063012e9e added lazy mode 2021-09-13 17:28:00 +01:00
Zach Skaistis 2b334ba381
fixed esc actually stopping requests on slow connections (#1840) by sphhax
* removed spaces from words in csharp

* blocked escape command sooner for slower connections

* removed deprecated code
2021-09-13 15:45:20 +01:00
Jack 250d8055a2 added a 'last 3 months' date filter 2021-09-12 20:13:34 +01:00
Jack e9fdececc8 added timer to next update 2021-09-10 15:19:25 +01:00
Jack ac1415a5c6 added british english mode 2021-09-08 22:30:40 +01:00
Jack 541d77836f updated layout of account page pb tables 2021-09-08 20:18:33 +01:00
Pranav Sinha d0740e01c7
Removed Typo (#1819) by pran01
* Added a delimiter switch

* Added delimiter to wordfilter

* Delimiter Switch to Delimiter Checkbox

* fixed random input fields styling

* regenerated lockfile to version 2

* brought back example.evn

* removed console logs

* removed garbage code

* reverted back delimiter tagline

* solved newline bug in custom

* removed garbage code

* typo removed

Co-authored-by: Jack <bartnikjack@gmail.com>
2021-09-07 23:54:41 +01:00
Jack e7673576fd changed default to 100
renamed function
made the table initially invisible
2021-09-07 00:57:10 +01:00
Jack 5af7e4346a added buttons to jump to top, jump to user rank
scrolling up loads more
scrolling down loads more
2021-09-06 20:36:38 +01:00
Jack aad64d3415 hidden buttons for now 2021-09-06 17:35:11 +01:00
Jack eccbcfb615 lost stash 2021-09-06 00:00:40 +01:00
Miodec a797aa176a disabled translation for main words 2021-09-05 14:28:26 +01:00
Jack f407c7f208 updated the input types to email to hopefully fix some password managers putting the username in the email field 2021-09-01 16:39:25 +01:00
Aaron 661bca3e6f
Added tooltip to submit review button (#1771) by unrealapex
* Renamed command line setting timer-progress bar

* Added tooltip to quote review submit button

* Update index.html
2021-08-31 14:55:09 +01:00
Jack 58dd2aa097 last unsigned result is now correctly saved 2021-08-29 17:35:26 +01:00
Jack 2f76acb11a changing rate quote icon if quote was already rated. closes #1775 2021-08-29 13:42:45 +01:00
Jack 100cbc00ce added option to update account name 2021-08-28 00:54:12 +01:00
Jack db3d25c7ef added quote rating 2021-08-27 20:09:47 +01:00
Jack 3352d611ea added meta keywords 2021-08-27 00:54:02 +01:00
Jack e7727c5020 fixed domtoimage causing console log errors 2021-08-26 23:08:31 +01:00
Miodec c1ac7b7287 Merge branch 'master' of https://github.com/Miodec/monkeytype 2021-08-26 14:28:07 +01:00
Miodec e11a124212 updated logo 2021-08-26 14:27:51 +01:00
Pranav Sinha 3720d995f5
Removed garbage code after PR#1754 (#1762)
* Added a delimiter switch

* Added delimiter to wordfilter

* Delimiter Switch to Delimiter Checkbox

* fixed random input fields styling

* regenerated lockfile to version 2

* brought back example.evn

* removed console logs

* removed garbage code

* reverted back delimiter tagline

Co-authored-by: Jack <bartnikjack@gmail.com>
2021-08-26 13:36:53 +01:00
Pranav Sinha 3df0230c70
Added a delimiter switch (#1754) by pran01
* Added a delimiter switch

* Added delimiter to wordfilter

* Delimiter Switch to Delimiter Checkbox

* fixed random input fields styling

* regenerated lockfile to version 2

* brought back example.evn

* removed console logs

Co-authored-by: Jack <bartnikjack@gmail.com>
2021-08-25 14:46:37 +01:00
Jack 7b363cb5f1 fixed focus animations 2021-08-22 00:30:13 +01:00
Miodec c442726649 updated preset and discord settings group descriptions 2021-08-21 13:21:46 +01:00
Miodec d9fa296478 removed asd 2021-08-17 18:54:38 +01:00
Miodec f5dd318f79 hiding danger zone account specific sections when not logged in 2021-08-17 18:39:23 +01:00
Miodec ea4f3bcc5d Merge branch 'mongo' 2021-08-17 18:13:04 +01:00
Miodec 68255f5ebe font awesome update 2021-08-16 23:16:03 +01:00