upload page after uploading
This commit is contained in:
+23
-1
@@ -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;
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user