From 197c505fa40a3e2b939e7b97968765abd4e9e3f7 Mon Sep 17 00:00:00 2001 From: jetson Date: Thu, 17 Sep 2026 15:56:55 +0700 Subject: [PATCH] =?UTF-8?q?fix(ui):=20upload=20page=20=E2=80=94=20fix=20do?= =?UTF-8?q?uble-toggle=20bug,=20replace=20hardcoded=20colors,=20improve=20?= =?UTF-8?q?error=20handling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/app.js | 20 +++++++++----------- templates/index.html | 8 ++++---- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/static/app.js b/static/app.js index 3bfb8b8..0b10894 100644 --- a/static/app.js +++ b/static/app.js @@ -71,10 +71,6 @@ /* ------------------------------------------------ Video Preview & File Info ------------------------------------------------ */ - function initVideoPreview() { - // Handled inside handleFile - } - function handleFile(file) { if (!file || !file.type.startsWith('video/')) return; @@ -86,6 +82,9 @@ // Video preview via FileReader var reader = new FileReader(); + reader.onerror = function () { + fileDuration.textContent = 'unknown'; + }; reader.onload = function (e) { previewVideo.src = e.target.result; previewVideo.load(); @@ -128,13 +127,13 @@ cards.forEach(function (card) { var checkbox = card.querySelector('.model-card-check'); - // Click card body to toggle (avoid double-toggle when clicking checkbox directly) + //