upload page after uploading

This commit is contained in:
2026-11-12 21:14:41 -05:00
parent 59c156f6ac
commit 350bf1842f
7 changed files with 118 additions and 15 deletions
+23 -1
View File
@@ -149,7 +149,7 @@ option {
font: inherit;
}
button[type="submit"] {
.btn {
border-radius: 0;
border: none;
background-color: var(--text);
@@ -158,3 +158,25 @@ button[type="submit"] {
font: inherit;
cursor: pointer;
}
.link-btn {
border: none;
background: none;
padding: 0;
text-decoration: underline;
color: var(--text);
cursor: pointer;
font: inherit;
}
.upload-links {
margin-top: 12px;
display: flex;
flex-direction: row;
gap: 12px;
align-items: baseline;
}
.upload-links form {
margin: 0;
}
+18
View File
@@ -0,0 +1,18 @@
const link = document.getElementById("copy-link");
if (link && navigator.clipboard?.writeText) {
link.style.display = "";
link.hidden = false;
link.onclick = async (e) => {
e.preventDefault();
try {
await navigator.clipboard.writeText(`${location.origin}/${link.dataset.id}`);
link.textContent = "copied";
setTimeout(() => {
link.textContent = "copy link";
}, 2000);
} catch (error) {
console.error("failed to copy link:", error);
}
};
}