improving upload page and conent guidelines

This commit is contained in:
x
2026-01-24 12:05:10 +01:00
parent f2b14739e3
commit 8397d4ed3f
3 changed files with 478 additions and 376 deletions

View File

@@ -82,7 +82,7 @@
if (!hasTags) {
submitBtn.querySelector('.btn-text').textContent = (3 - tags.length) + ' more tag' + (3 - tags.length !== 1 ? 's' : '') + ' required';
} else if (!hasFile) {
submitBtn.querySelector('.btn-text').textContent = 'Select a file';
submitBtn.querySelector('.btn-text').textContent = 'Upload (Select file first)';
} else if (!hasRating) {
submitBtn.querySelector('.btn-text').textContent = 'Select SFW or NSFW';
} else {
@@ -111,6 +111,10 @@
fileName.textContent = file.name;
fileSize.textContent = formatSize(file.size);
dropZonePrompt.style.display = 'none';
// Hide input so it doesn't intercept clicks on preview/remove button
fileInput.style.display = 'none';
filePreview.style.display = 'flex';
statusDiv.textContent = '';
statusDiv.className = 'upload-status';
@@ -126,13 +130,11 @@
const vid = document.createElement('video');
vid.src = URL.createObjectURL(file);
vid.controls = false;
vid.controls = true; // User might want to scrub to check if it's the right video
vid.autoplay = true;
vid.muted = true;
vid.loop = true;
vid.style.maxHeight = '100px';
vid.style.maxWidth = '150px';
vid.style.borderRadius = '4px';
// Styles handled by CSS now for "Big" preview
filePreview.prepend(vid);
@@ -172,6 +174,7 @@
selectedFile = null;
fileInput.value = '';
dropZonePrompt.style.display = 'block';
fileInput.style.display = 'block'; // Restore input visibility
filePreview.style.display = 'none';
// Clear preview video
const vid = filePreview.querySelector('video');