aboutsummaryrefslogtreecommitdiff
path: root/static/scripts/upload.js
diff options
context:
space:
mode:
authorBobby <[email protected]>2025-07-18 12:24:06 +0530
committerBobby <[email protected]>2025-07-18 12:24:06 +0530
commit01e730c68a79862112798d4816625ddcd00350d9 (patch)
tree3850e69c55334756b0faef76f54d9a74091f92d2 /static/scripts/upload.js
parent8df8cdd7e1bdefded59d073c14aa74666740be8c (diff)
downloadimageboard-01e730c68a79862112798d4816625ddcd00350d9.tar.xz
imageboard-01e730c68a79862112798d4816625ddcd00350d9.zip
refactor ratings, minify content, update single post page
Diffstat (limited to 'static/scripts/upload.js')
-rw-r--r--static/scripts/upload.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/static/scripts/upload.js b/static/scripts/upload.js
index fe4c4ef..0a6cc17 100644
--- a/static/scripts/upload.js
+++ b/static/scripts/upload.js
@@ -77,7 +77,7 @@ function createPreviewElement(key, blob, type, nameOrUrl) {
const previewRatingForm = document.createElement('form');
previewRatingForm.className = 'preview-rating-form';
- ['Safe', 'Questionable', 'Sensitive', 'Explicit'].forEach((rating, idx) => {
+ ['Safe', 'Sensitive', 'Questionable', 'Explicit'].forEach((rating, idx) => {
const inputId = `rating-${rating.toLowerCase()}-${key}`;
const input = document.createElement('input');
input.type = 'radio';
@@ -625,6 +625,7 @@ function showImageProgress(previewElement) {
height: 100%;
width: 0%;
background-color: #4a9eff;
+ transition: width 0.3s ease;
`;
progressContainer.appendChild(progressBar);
@@ -663,7 +664,7 @@ function animateProgress(progressBar, duration) {
if (isCompleted) return;
const elapsed = Date.now() - startTime;
- const timeRatio = elapsed / (duration * 4);
+ const timeRatio = elapsed / duration;
let targetProgress;
if (timeRatio < 0.2) {