Skip to content

Commit

Permalink
update totp and profile style
Browse files Browse the repository at this point in the history
  • Loading branch information
syrk4web committed Dec 27, 2023
1 parent 1920d89 commit 556fc69
Show file tree
Hide file tree
Showing 6 changed files with 184 additions and 43 deletions.
2 changes: 1 addition & 1 deletion src/ui/static/css/dashboard.css

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions src/ui/static/js/profile.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Tabs, Popover } from "./utils/settings.js";

class SubmitProfile {
constructor() {
this.pwEl = document.querySelector("#admin_password");
Expand Down Expand Up @@ -41,7 +43,7 @@ class SubmitProfile {
"focus:valid:!border-red-500",
"active:!border-red-500",
"active:valid:!border-red-500",
"valid:!border-red-500",
"valid:!border-red-500"
);
this.pwAlertEl.classList.add("opacity-0");
this.pwAlertEl.setAttribute("aria-hidden", "true");
Expand All @@ -53,7 +55,7 @@ class SubmitProfile {
"focus:valid:!border-red-500",
"active:!border-red-500",
"active:valid:!border-red-500",
"valid:!border-red-500",
"valid:!border-red-500"
);
this.pwAlertEl.classList.remove("opacity-0");
this.pwAlertEl.setAttribute("aria-hidden", "false");
Expand All @@ -71,14 +73,14 @@ class PwBtn {
const passwordContainer = e.target.closest("[data-input-group]");
const inpEl = passwordContainer.querySelector("input");
const invBtn = passwordContainer.querySelector(
'[data-setting-password="invisible"]',
'[data-setting-password="invisible"]'
);
const visBtn = passwordContainer.querySelector(
'[data-setting-password="visible"]',
'[data-setting-password="visible"]'
);
inpEl.setAttribute(
"type",
inpEl.getAttribute("type") === "password" ? "text" : "password",
inpEl.getAttribute("type") === "password" ? "text" : "password"
);

if (inpEl.getAttribute("type") === "password") {
Expand All @@ -96,3 +98,5 @@ class PwBtn {

const setPWBtn = new PwBtn();
const setSubmit = new SubmitProfile();
const setTabs = new Tabs();
const setPopover = new Popover();
2 changes: 1 addition & 1 deletion src/ui/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<!-- info -->
<main
class="xl:pl-75 w-full px-2 sm:px-6 pb-0 pt-20 sm:pt-6 min-h-[80vh] h-full flex flex-col justify-between"
class="xl:pl-75 w-full px-2 sm:px-6 pb-0 pt-20 sm:pt-6 min-h-[85vh] h-full flex flex-col justify-between"
>
<div
class="max-w-[1920px] grid gap-y-4 gap-3 sm:gap-4 lg:gap-6 grid-cols-12 w-full"
Expand Down
2 changes: 1 addition & 1 deletion src/ui/templates/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@
{% elif current_endpoint == "jobs" %}
<script type="module" src="./js/jobs.js"></script>
{% elif current_endpoint == "profile" %}
<script defer src="./js/profile.js"></script>
<script type="module" src="./js/profile.js"></script>
{% endif %}
</head>
Loading

0 comments on commit 556fc69

Please sign in to comment.