diff --git a/functions/index.js b/functions/index.js index 7328a12fc..8454751d4 100644 --- a/functions/index.js +++ b/functions/index.js @@ -62,7 +62,7 @@ function isUsernameValid(name) { if (name === null || name === undefined || name === "") return false; if (/miodec/.test(name.toLowerCase())) return false; if (/bitly/.test(name.toLowerCase())) return false; - if (name.length > 12) return false; + if (name.length > 14) return false; return /^[0-9a-zA-Z_.-]+$/.test(name); } @@ -569,10 +569,15 @@ exports.testCompleted = functions.https.onCall(async (request, response) => { userdata.discordId !== null && userdata.discordId !== undefined ) { - console.log( - `sending command to the bot to update the role for user ${request.uid} with wpm ${obj.wpm}` - ); - updateDiscordRole(userdata.discordId, Math.round(obj.wpm)); + if (verified !== false) { + console.log( + `sending command to the bot to update the role for user ${request.uid} with wpm ${obj.wpm}` + ); + updateDiscordRole( + userdata.discordId, + Math.round(obj.wpm) + ); + } } returnobj.resultCode = 2; } else { @@ -1105,9 +1110,11 @@ async function checkLeaderboards( verified, emailVerified ) { + //lb disable // return { // insertedAt: null, // }; + // try { if (emailVerified === false) return { diff --git a/functions/package-lock.json b/functions/package-lock.json index b26868b3a..62ce36148 100644 --- a/functions/package-lock.json +++ b/functions/package-lock.json @@ -1889,9 +1889,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" }, "lodash.at": { "version": "4.6.0", @@ -2855,13 +2855,15 @@ "http-parser-js": ">=0.5.1", "safe-buffer": ">=5.1.0", "websocket-extensions": ">=0.1.1" + }, + "dependencies": { + "websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==" + } } }, - "websocket-extensions": { - "version": ">=0.1.4", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", - "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==" - }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", diff --git a/public/css/style.scss b/public/css/style.scss index 2a62441a7..e1854d0f3 100644 --- a/public/css/style.scss +++ b/public/css/style.scss @@ -2,6 +2,7 @@ :root { --roundness: 0.25rem; + --font: "Roboto Mono"; } ::placeholder { @@ -28,7 +29,7 @@ input { padding: 0.5rem; font-size: 1rem; line-height: 1rem; - font-family: "Roboto Mono"; + font-family: var(--font); } input[type="color"] { @@ -83,7 +84,7 @@ body { padding: 0; min-height: 100vh; background: var(--bg-color); - font-family: "Roboto Mono"; + font-family: var(--font); color: var(--main-color); // overflow-x: hidden; } @@ -326,6 +327,79 @@ a:hover { } } +#customTextPopupWrapper { + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.75); + position: fixed; + left: 0; + top: 0; + z-index: 1000; + display: grid; + justify-content: center; + align-items: center; + padding: 5rem 0; + + #customTextPopup { + background: var(--bg-color); + border-radius: var(--roundness); + padding: 2rem; + display: grid; + gap: 1rem; + width: 60vw; + + textarea { + background: var(--bg-color); + padding: 1rem; + color: var(--main-color); + border: none; + outline: none; + font-size: 1rem; + font-family: var(--font); + width: 100%; + border-radius: var(--roundness); + resize: vertical; + height: 200px; + color: var(--text-color); + } + + .inputs { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 1rem; + align-items: center; + justify-items: center; + } + + .check { + input { + margin: 0 !important; + cursor: pointer; + width: 0; + height: 0; + display: none; + + &~.customTextRandomCheckbox { + width: 12px; + height: 12px; + background: rgba(0, 0, 0, .1); + border-radius: 2px; + box-shadow: 0 0 0 4px rgba(0, 0, 0, .1); + display: inline-block; + margin: 0 .5rem 0 .25rem; + transition: .25s; + } + + &:checked~.customTextRandomCheckbox { + background: var(--main-color); + } + } + } + + } +} + + #customThemeShareWrapper { width: 100%; height: 100%; @@ -470,7 +544,7 @@ a:hover { border: none; outline: none; font-size: 1rem; - font-family: "Roboto Mono"; + font-family: var(--font); width: 100%; border-radius: var(--roundness); resize: vertical; @@ -498,7 +572,7 @@ a:hover { border: none; outline: none; font-size: 1rem; - font-family: "Roboto Mono"; + font-family: var(--font); width: 100%; border-radius: var(--roundness); } @@ -1140,6 +1214,26 @@ key { } } +#capsWarning { + background: var(--main-color); + color: var(--bg-color); + display: table; + position: absolute; + left: 50%; + top: 66vh; + transform: translateX(-50%) translateY(-50%); + padding: 1rem; + border-radius: var(--roundness); + /* margin-top: 1rem; */ + transition: .25s; + z-index: 999; + pointer-events: none; + + i { + margin-right: .5rem; + } +} + #wordsInput { height: 0; padding: 0; @@ -1688,7 +1782,7 @@ key { text-align: left; border: 0; background: 0; - font-family: "Roboto Mono"; + font-family: var(--font); &:first-child { margin-right: 0.5rem; @@ -1718,12 +1812,13 @@ key { .tabContent { overflow: hidden; height: auto; - max-height: 0px; + // max-height: 0px; + // max-height: 100vh; // transition: max-height .5s ease-in-out; - &.reveal { - max-height: 100vh; - } + // &.reveal { + // max-height: 100vh; + // } .text { align-self: center; diff --git a/public/index.html b/public/index.html index ee0584809..03dab3d74 100644 --- a/public/index.html +++ b/public/index.html @@ -7,7 +7,7 @@