diff --git a/brain/views/dash/forms/init-backup.twig b/brain/views/dash/forms/init-backup.twig new file mode 100644 index 0000000..b157efa --- /dev/null +++ b/brain/views/dash/forms/init-backup.twig @@ -0,0 +1,16 @@ +
+ + + +
+
+ +
+ + +
+

+ +

+ +
diff --git a/brain/views/dash/forms/init-fresh.twig b/brain/views/dash/forms/init-fresh.twig new file mode 100644 index 0000000..58450e3 --- /dev/null +++ b/brain/views/dash/forms/init-fresh.twig @@ -0,0 +1,15 @@ +
+ + + +
+
+ + + + + + +

+ +
diff --git a/brain/views/dash/forms/reset.twig b/brain/views/dash/forms/reset.twig new file mode 100644 index 0000000..c250fa1 --- /dev/null +++ b/brain/views/dash/forms/reset.twig @@ -0,0 +1,21 @@ +
+ + + +
+
+ + + + +
+

+ Use this to get your secret to verify it's you. If your email is set up, the secret will be sent there. If not, the form will be updated automatically(but please set up your email, once you reset your password). +

+ +

+
diff --git a/brain/views/dash/init.twig b/brain/views/dash/init.twig index 00c6240..79f5b71 100644 --- a/brain/views/dash/init.twig +++ b/brain/views/dash/init.twig @@ -5,44 +5,20 @@ {% endblock %} {% block stylesheets %} - + {% endblock %} {% block mainContent %} -
-
-
-
- - - - - - - -

- -
- -
-
-
- - -
- - -
-

- -

- -
-
-
-
- {% endblock %} - - {% block javascripts %} - +
+
+ {% apply spaceless %} + {{ include("dash/forms/init-fresh.twig") }} + {% endapply %} +
+
+ {% apply spaceless %} + {{ include("dash/forms/init-backup.twig") }} + {% endapply %} +
+
{% endblock %} diff --git a/brain/views/dash/page-edit.twig b/brain/views/dash/page-edit.twig index 23e1d89..1612863 100644 --- a/brain/views/dash/page-edit.twig +++ b/brain/views/dash/page-edit.twig @@ -197,7 +197,7 @@ {{ include("dash/partials/editor.twig") }} {% endapply %}
- +
 					
 			    
diff --git a/brain/views/dash/reset-password.twig b/brain/views/dash/reset-password.twig index 330faa5..5e47794 100644 --- a/brain/views/dash/reset-password.twig +++ b/brain/views/dash/reset-password.twig @@ -5,33 +5,14 @@ {% endblock %} {% block stylesheets %} - + {% endblock %} {% block mainContent %} -
-
-
-
- -
-
-
-
- {% endblock %} + + {% endblock %} diff --git a/public/assets/css/dash/forms.css b/public/assets/css/dash/forms.css index 2c0df70..222abfe 100644 --- a/public/assets/css/dash/forms.css +++ b/public/assets/css/dash/forms.css @@ -50,5 +50,5 @@ select { ::placeholder { font: 25px var(--base-type); - color: var(--white); + color: var(--black); } diff --git a/public/assets/css/dash/init.css b/public/assets/css/dash/init.css index c2ba87e..a3b88c2 100644 --- a/public/assets/css/dash/init.css +++ b/public/assets/css/dash/init.css @@ -1,6 +1,9 @@ /* LOGIN */ -section[role="login"] { +section[role="login"], +section[role="password-reset"], +section[role="restore-fresh"], +section[role="restore-backup"] { margin: 15% auto; padding: 10px; width: 500px; @@ -8,6 +11,13 @@ section[role="login"] { display: grid; grid-template-columns: 28.5% 1fr; gap: 10px; + visibility: visible; +} + +section[role="restore-backup"] { + display: none; + visibility: hidden; + color: var(--white); } section[role="login"] form input { @@ -35,20 +45,69 @@ section[role="login"] form a { font-weight: 600; } -/* LOGIN */ +/* PASSWORD-RESET */ + +section[role="password-reset"] form button { + padding: 10px 5px; + width: 82%; +} + +section[role="password-reset"] form input { + width: 95%; + height: 30px; + padding: 5px; + margin-bottom: 10px; +} + +/* SITE RESTORE */ + +section[role="restore-fresh"] form button { + padding: 10px 5px; + width: 82%; +} + +section[role="restore-fresh"] form input { + width: 95%; + height: 30px; + padding: 5px; + margin-bottom: 10px; +} + +section[role="restore-backup"] form button { + padding: 10px 5px; + width: 82%; +} + +section[role="restore-backup"] form input { + width: 95%; + height: 30px; + padding: 5px; + margin-bottom: 10px; +} + +/* RESPONSIVE */ @media only screen and (max-width: 500px) { - section[role="login"] { + section[role="login"], + section[role="password-reset"], + section[role="restore-fresh"], + section[role="restore-backup"] { width: 97%; } } @media only screen and (max-width: 375px) { - section[role="login"] { + section[role="login"], + section[role="password-reset"], + section[role="restore-fresh"], + section[role="restore-backup"] { grid-template-columns: 1fr; } - section[role="login"] img { + section[role="login"] img, + section[role="password-reset"] img, + section[role="restore-fresh"] img, + section[role="restore-backup"] img { width: 50px; } } diff --git a/public/assets/scripts/Start.js b/public/assets/scripts/Start.js index 46e0a9b..ee65801 100644 --- a/public/assets/scripts/Start.js +++ b/public/assets/scripts/Start.js @@ -2866,7 +2866,7 @@ class $e6c02983873e6cdf$var$TextEditor extends (0, $68b475f2a0292491$export$2e2b } break; case "edit-image": - this.caretPos = (0, $bba420c8ea874359$export$5880b8b5730aff45)(this.textEditor).pos; + //this.caretPos = position(this.textEditor).pos; this.emitEvent($0d6abf40542266b3$export$80082ca64f03d0e9); break; case "submit-save": @@ -7640,7 +7640,7 @@ class $5ec7c34d3cbf8bc6$export$2e2bcd8739ae039 { // methods //-------------------------- start() { - if (document.getElementById("login") || document.getElementById("dash-init")) { + if (document.getElementById("login") || document.querySelector('[role="site-restore"]')) { var options = document.getElementsByClassName("init-option"); for(let index = 0; index < options.length; index++)options[index].addEventListener("click", (e)=>this.handleOptions(e)); if (document.getElementById("login")) document.getElementById("login-btn").addEventListener("click", (e)=>this.handleLogin(e)); @@ -7771,15 +7771,15 @@ class $5ec7c34d3cbf8bc6$export$2e2bcd8739ae039 { handleOptions(e) { e.stopPropagation(); e.preventDefault(); - let init = document.getElementById("dash-init"); - let restore = document.getElementById("dash-restore"); + let init = document.querySelector('[role="restore-fresh"]'); + let restore = document.querySelector('[role="restore-backup"]'); if (e.target.id === "init-switch-restore") { init.style.display = "none"; init.style.visibility = "hidden"; - restore.style.display = "flex"; + restore.style.display = "grid"; restore.style.visibility = "visible"; } else { - init.style.display = "flex"; + init.style.display = "grid"; init.style.visibility = "visible"; restore.style.display = "none"; restore.style.visibility = "hidden"; diff --git a/src/com/Base.js b/src/com/Base.js index 91002df..8a7a0bb 100644 --- a/src/com/Base.js +++ b/src/com/Base.js @@ -20,7 +20,10 @@ export default class Base { // methods //-------------------------- start() { - if (document.getElementById('login') || document.getElementById('dash-init')) { + if ( + document.getElementById('login') || + document.querySelector('[role="site-restore"]') + ) { var options = document.getElementsByClassName('init-option'); for (let index = 0; index < options.length; index++) { options[index].addEventListener('click', e => this.handleOptions(e)); @@ -187,16 +190,16 @@ export default class Base { handleOptions(e) { e.stopPropagation(); e.preventDefault(); - let init = document.getElementById('dash-init'); - let restore = document.getElementById('dash-restore'); + let init = document.querySelector('[role="restore-fresh"]'); + let restore = document.querySelector('[role="restore-backup"]'); if (e.target.id === 'init-switch-restore') { init.style.display = 'none'; init.style.visibility = 'hidden'; - restore.style.display = 'flex'; + restore.style.display = 'grid'; restore.style.visibility = 'visible'; } else { - init.style.display = 'flex'; + init.style.display = 'grid'; init.style.visibility = 'visible'; restore.style.display = 'none'; diff --git a/src/com/ui/TextEditor.js b/src/com/ui/TextEditor.js index 8c7f485..d5c4976 100644 --- a/src/com/ui/TextEditor.js +++ b/src/com/ui/TextEditor.js @@ -170,7 +170,7 @@ class TextEditor extends EventEmitter { } break; case 'edit-image': - this.caretPos = position(this.textEditor).pos; + //this.caretPos = position(this.textEditor).pos; this.emitEvent(EditorEvent.EDITOR_UPLOAD_POST_IMAGE); break; case 'submit-save':