Redesign loader card as three load options

This commit is contained in:
Justin Oros
2026-09-21 22:32:53 -07:00
parent d2e66a79fc
commit fc70aa66fc
3 changed files with 136 additions and 75 deletions
+5 -3
View File
@@ -7,6 +7,7 @@
const $ = (id) => document.getElementById(id);
const els = {
dropZone: $("dropZone"),
dropTarget: $("dropTarget"),
loaderTitle: $("loaderTitle"),
loaderStatus: $("loaderStatus"),
browseBtn: $("browseBtn"),
@@ -356,7 +357,7 @@
els.copyPathBtn.addEventListener("click", async () => {
try {
await navigator.clipboard.writeText(SAVES_PATH);
toast("Saves folder path copied. Paste it into the file dialog's address bar, then open your SteamID and save folders.");
toast("Path copied. Paste it into the file dialog's address bar, then open your SteamID and save folders.");
} catch {
toast("Couldn't copy. Select the path and copy it manually.", true);
}
@@ -393,8 +394,9 @@
els.dropZone.classList.remove("dragging");
loadFile(e.dataTransfer.files[0]);
});
els.dropZone.addEventListener("keydown", (e) => {
if (e.target === els.dropZone && (e.key === "Enter" || e.key === " ")) {
els.dropTarget.addEventListener("click", browse);
els.dropTarget.addEventListener("keydown", (e) => {
if (e.key === "Enter" || e.key === " ") {
e.preventDefault();
browse();
}