feat: update dependencies, enhance upload rate limiting, and improve UI elements

This commit is contained in:
2026-01-16 08:54:14 +01:00
parent 7a01525ca5
commit e90c4576a5
9 changed files with 156 additions and 83 deletions

View File

@@ -15,7 +15,7 @@
</head>
<body>
<h1>Black Hole Share</h1>
<h1><a href="/" class="home-link">Black Hole Share</a></h1>
<div class="upload-container">
<div class="upload-area">
@@ -368,6 +368,26 @@
}
});
function canTriggerUpload() {
return (
currentContentData &&
window.getComputedStyle(uploadBtn).display !== "none" &&
zoomOverlay.style.display !== "flex"
);
}
// ENTER TO UPLOAD (when content is ready)
document.addEventListener(
"keydown",
function (e) {
if ((e.key === "Enter" || e.code === "NumpadEnter") && canTriggerUpload()) {
e.preventDefault();
uploadBtn.click();
}
},
true
);
window.addEventListener("resize", function () {
if (currentContentData) {
displayContent(currentContentData);
@@ -376,4 +396,4 @@
</script>
</body>
</html>
</html>

View File

@@ -82,7 +82,7 @@
}
.activity-list {
max-height: 300px;
max-height: 260px;
overflow-y: auto;
font-family: "JetBrains Mono", monospace;
font-size: 0.85em;

View File

@@ -29,7 +29,7 @@ body {
height: 100vh;
margin: 0 auto;
padding: 20px;
padding-bottom: 140px;
padding-bottom: 80px;
background-color: var(--bg-tertiary);
background-image:
radial-gradient(1200px 800px at 10% -20%, var(--bg-glow), transparent 60%),
@@ -453,7 +453,7 @@ h1 .home-link:hover {
/* View page styles */
body.view-page {
width: 860px;
padding-bottom: 140px;
padding-bottom: 80px;
}
.view-container {
@@ -476,6 +476,8 @@ body.view-page {
border-top: 1px solid var(--border-color);
font-size: 0.9em;
color: var(--text-secondary);
width: 100%;
z-index: 10;
}
.powered-by .home-link {

0
data/html/test/test.txt Normal file
View File