Add SSH key and make clipboard items consistent

This commit is contained in:
Bad Manners 2024-08-23 22:27:40 -03:00
parent e2527064db
commit 67e17ae27f
10 changed files with 127 additions and 162 deletions

View file

@ -33,6 +33,7 @@ import IconTriangleExclamation from "./icons/IconTriangleExclamation.astro";
class="flex w-full max-w-md flex-col-reverse justify-evenly gap-y-5 px-6 pt-5 font-medium sm:max-w-2xl sm:flex-row"
>
<button
style={{ display: "none" }}
data-modal-reject
id="age-verification-reject"
class="rounded bg-stone-400 py-3 text-lg text-stone-900 hover:bg-stone-500 hover:text-stone-50 focus:bg-stone-500 focus:text-stone-50 sm:px-9 dark:bg-zinc-300 dark:text-zinc-900 dark:hover:bg-zinc-600 dark:hover:text-zinc-50 dark:focus:bg-zinc-600 dark:focus:text-zinc-50"
@ -40,6 +41,7 @@ import IconTriangleExclamation from "./icons/IconTriangleExclamation.astro";
Cancel
</button>
<button
style={{ display: "none" }}
data-modal-accept
id="age-verification-accept"
class="rounded bg-bm-500 py-3 text-lg text-stone-900 hover:bg-stone-500 hover:text-stone-50 focus:bg-stone-500 focus:text-stone-50 sm:px-9 dark:bg-bm-400 dark:text-zinc-900 dark:hover:bg-zinc-600 dark:hover:text-zinc-50 dark:focus:bg-zinc-600 dark:focus:text-zinc-50"
@ -73,7 +75,9 @@ import IconTriangleExclamation from "./icons/IconTriangleExclamation.astro";
location.href = "about:blank";
};
rejectButton.addEventListener("click", onRejectButtonClick);
modal.querySelector<HTMLElementTagNameMap["button"]>("button[data-modal-accept]")!.addEventListener(
rejectButton.style.removeProperty("display");
const acceptButton = modal.querySelector<HTMLElementTagNameMap["button"]>("button[data-modal-accept]")!;
acceptButton.addEventListener(
"click",
(e: MouseEvent) => {
e.preventDefault();
@ -86,6 +90,7 @@ import IconTriangleExclamation from "./icons/IconTriangleExclamation.astro";
},
{ once: true },
);
acceptButton.style.removeProperty("display");
rejectButton.focus();
}
};