From 25b6843e87bd4d41006ac6479e98f507be161d3a Mon Sep 17 00:00:00 2001 From: johnny2211 Date: Sun, 18 Jan 2026 18:33:59 +0100 Subject: [PATCH] Add admin tool for bulk GIF regeneration via web UI Created a simple HTML page that allows admins to regenerate all GIF previews directly from the browser without needing terminal access. Features: - Clean, user-friendly interface with warnings and instructions - Calls POST /api/terms/regenerate-all-gifs endpoint - Shows progress spinner during processing - Displays detailed results: total, success, failed counts - Shows error messages if any videos failed to process - Requires admin authentication (uses session cookies) - Responsive design with proper error handling Usage: 1. Deploy the new Docker image to production 2. Login as admin on the website 3. Navigate to: https://znakovni.matijaturk.from.hr/regenerate-gifs.html 4. Click 'Start GIF Regeneration' button 5. Wait for completion (may take several minutes) 6. Refresh dictionary page to see GIF previews This solves the production deployment issue where GIF files generated locally don't match production video filenames (different UUIDs). Co-Authored-By: Auggie --- packages/frontend/public/regenerate-gifs.html | 191 ++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100644 packages/frontend/public/regenerate-gifs.html diff --git a/packages/frontend/public/regenerate-gifs.html b/packages/frontend/public/regenerate-gifs.html new file mode 100644 index 0000000..6a088cd --- /dev/null +++ b/packages/frontend/public/regenerate-gifs.html @@ -0,0 +1,191 @@ + + + + + + Regenerate GIFs - Znakovni.hr Admin + + + +
+

🎨 Regenerate GIF Previews

+

This tool will regenerate GIF preview images for all videos in the database.

+ +
+ âš ī¸ Warning: This process may take several minutes depending on the number of videos. + Make sure you are logged in as an admin before clicking the button. +
+ +
+ â„šī¸ What this does: +
    +
  • Finds all videos in the database
  • +
  • Generates a 300px GIF preview (10fps, 3 seconds) for each video
  • +
  • Saves GIFs to /uploads/gifs/ directory
  • +
  • Creates database records for each GIF
  • +
  • Deletes old GIF files if they exist
  • +
+
+ + + +
+
+

Processing videos... Please wait.

+
+ +
+
+ + + + +