get a simple change password dialogue to popup on press change password

This commit is contained in:
Gregory Wells
2026-03-31 19:51:21 -04:00
parent e1f992e052
commit 6c435e6135
3 changed files with 49 additions and 24 deletions

View File

@@ -11,6 +11,13 @@
<div id="popup_background" class="blocked hidden"></div> <div id="popup_background" class="blocked hidden"></div>
<div id="change_password_dialouge" class="hidden card">
<input type="password" placeholder="Current Password" />
<input type="password" placeholder="New Password" />
<input type="password" placeholder="New Password(repeat)" />
<button>Change Password</button>
</div>
<img id="logo_image" alt="logo" src="/logo" /> <img id="logo_image" alt="logo" src="/logo" />
<div id="main_content"> <div id="main_content">
<div class="cards"> <div class="cards">
@@ -53,28 +60,8 @@
<div class="data-value">{{.Email}}</div> <div class="data-value">{{.Email}}</div>
</div> </div>
<form <form action="/logout" method="POST" style="display: inline-block">
action="/logout" <button class="bottom_button" id="signout_button">
method="POST"
style="
color: var(--primary-accent);
text-decoration: none;
font-weight: bold;
margin-top: 20px;
display: inline-block;
"
>
<button
style="
background: none;
border-style: none;
color: var(--primary-accent);
text-decoration: none;
font-weight: bold;
font-size: 20px;
"
id="signout_button"
>
<input <input
id="csrf_token_storage" id="csrf_token_storage"
type="hidden" type="hidden"
@@ -84,6 +71,16 @@
Sign Out Sign Out
</button> </button>
</form> </form>
<button class="bottom_button" id="change_password_button">
<input
id="csrf_token_storage"
type="hidden"
name="csrf_token"
value="{{.CSRFToken}}"
/>
Change Password
</button>
</div> </div>
</div> </div>
</div> </div>
@@ -97,6 +94,20 @@
}); });
</script> </script>
<script type="text/javascript">
const popup_botton = document.getElementById("change_password_button");
popup_botton.addEventListener("click", () => {
document.getElementById("popup_background").classList.remove("hidden");
document
.getElementById("change_password_dialouge")
.classList.remove("hidden");
// document.getElementById("change_password_dialouge").classList.add("hidden");
// document.getElementById("popup_background").classList.add("hidden");
});
</script>
<script type="text/javascript"> <script type="text/javascript">
var currentPreviewURL = null; var currentPreviewURL = null;

View File

@@ -3,7 +3,7 @@
255, 255,
255, 255,
255, 255,
0.8 1
); /* Semi-transparent white for light theme */ ); /* Semi-transparent white for light theme */
border: 1px solid var(--border-subtle); border: 1px solid var(--border-subtle);
border-radius: 12px; border-radius: 12px;

View File

@@ -100,6 +100,20 @@
line-height: 0; line-height: 0;
} }
#signout_button:hover { .bottom_button:hover {
text-decoration: underline !important; text-decoration: underline !important;
} }
.bottom_button {
background: none;
border-style: none;
color: var(--primary-accent);
text-decoration: none;
font-weight: bold;
font-size: 20px;
}
#change_password_dialouge {
z-index: 10000;
position: fixed;
}