mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-12-22 09:00:10 +00:00
userpage: add "back to admin" button
This commit is contained in:
parent
8113f794ab
commit
4f298bbc8c
@ -487,6 +487,15 @@ a:hover:not(.lang-link):not(.\~urge), a:active:not(.lang-link):not(.\~urge) {
|
|||||||
color: var(--color-urge-200);
|
color: var(--color-urge-200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a.button,
|
||||||
|
a.button:link,
|
||||||
|
a.button:visited,
|
||||||
|
a.button:focus,
|
||||||
|
a.buton:hover {
|
||||||
|
color: var(--color-content) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.link-center {
|
.link-center {
|
||||||
display: block;
|
display: block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -68,6 +68,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<span class="button ~warning" alt="{{ .strings.theme }}" id="button-theme"><i class="ri-sun-line"></i></span>
|
<span class="button ~warning" alt="{{ .strings.theme }}" id="button-theme"><i class="ri-sun-line"></i></span>
|
||||||
<span class="button ~critical @low mb-4 unfocused" id="logout-button">{{ .strings.logout }}</span>
|
<span class="button ~critical @low mb-4 unfocused" id="logout-button">{{ .strings.logout }}</span>
|
||||||
|
<a class="button ~info unfocused" href="/" id="admin-back-button"><i class="ri-arrow-left-fill mr-2"></i>{{ .strings.admin }}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="page-container unfocused">
|
<div class="page-container unfocused">
|
||||||
<div class="card @low dark:~d_neutral mb-4" id="card-user">
|
<div class="card @low dark:~d_neutral mb-4" id="card-user">
|
||||||
|
@ -391,9 +391,12 @@ document.addEventListener("details-reload", () => {
|
|||||||
|
|
||||||
expiryCard.expiry = details.expiry;
|
expiryCard.expiry = details.expiry;
|
||||||
|
|
||||||
|
const adminBackButton = document.getElementById("admin-back-button") as HTMLAnchorElement;
|
||||||
|
adminBackButton.href = window.location.href.replace("my/account", "");
|
||||||
|
|
||||||
let messageCard = document.getElementById("card-message");
|
let messageCard = document.getElementById("card-message");
|
||||||
if (details.accounts_admin) {
|
if (details.accounts_admin) {
|
||||||
|
adminBackButton.classList.remove("unfocused");
|
||||||
if (typeof(messageCard) == "undefined" || messageCard == null) {
|
if (typeof(messageCard) == "undefined" || messageCard == null) {
|
||||||
messageCard = document.createElement("div");
|
messageCard = document.createElement("div");
|
||||||
messageCard.classList.add("card", "@low", "dark:~d_neutral", "content");
|
messageCard.classList.add("card", "@low", "dark:~d_neutral", "content");
|
||||||
|
Loading…
Reference in New Issue
Block a user