diff --git a/assets/css/icecoder.css b/assets/css/icecoder.css index 3075bc7..77ee074 100644 --- a/assets/css/icecoder.css +++ b/assets/css/icecoder.css @@ -9,6 +9,9 @@ body {overflow: hidden; h1 {font-size: 36px; font-weight: normal; color: #888; margin-bottom: 20px} h2 {font-size: 18px; font-weight: normal; color: #fff} +.icon {position: absolute; margin-left: 2px} +.icon-tabler {width: 24px; height: 24px; stroke-width: 1.25; color: #888} + .blackMask {position: fixed; display: table; width: 100%; height: 100%; top: 0; left: 0; visibility: hidden; background-color: rgba(0,0,0,0.8); text-align: center; z-index: 100} .blackMask .popupVCenter {#position: absolute; display: table-cell; #top: 50%; vertical-align: middle; text-align: center} .popupVCenter .popup {#position: relative; #top: -50%; text-align: center; color: #fff; font-size: 10px} diff --git a/assets/images/icons/LICENCE b/assets/images/icons/LICENCE new file mode 100644 index 0000000..10c819f --- /dev/null +++ b/assets/images/icons/LICENCE @@ -0,0 +1,21 @@ +MIT License for https://github.com/tabler/tabler-icons + +Copyright (c) 2020 Paweł Kuna + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/assets/images/icons/alert-triangle.svg b/assets/images/icons/alert-triangle.svg new file mode 100644 index 0000000..c274588 --- /dev/null +++ b/assets/images/icons/alert-triangle.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/lib/login.php b/lib/login.php index 017be24..41ddb1e 100644 --- a/lib/login.php +++ b/lib/login.php @@ -33,7 +33,13 @@ echo $settingPW ? "Setup" : "Login";

';}; ?> - onkeyup="pwStrength(this.value)" onchange="pwStrength(this.value)" onpaste="pwStrength(this.value)">
+ onkeyup="checkCase(event); pwStrength(this.value)" onchange="pwStrength(this.value)" onpaste="pwStrength(this.value)" onkeyup="checkCase(event)">
'. @@ -106,8 +112,19 @@ const pwStrength = function(pw) { return (true === chars && true === upper && true === lower && true === num && true === special); }; +const checkCase = function(evt) { + const key = evt.keyCode ? evt.keyCode : evt.which ? evt.which : evt.charCode; + + // Not caps lock key + if (20 !== key) { + get("capsLockDisplay").style.display = true === evt.getModifierState("CapsLock") + ? "inline-block" + : "none"; + } +}; + // Check if we can submit, else shake requirements -var checkCanSubmit = function() { +const checkCanSubmit = function() { // Password isn't strong enough, shake requirements if(false === pwStrength(get("password").value)) { var posArray = [6, -6, 3, -3, 0];