diff --git a/templates/itemeditor_command_storage.html b/templates/itemeditor_command_storage.html index 68861a1..0367a65 100644 --- a/templates/itemeditor_command_storage.html +++ b/templates/itemeditor_command_storage.html @@ -109,18 +109,25 @@
- +
-

Plugin Usage

-

Load command in your plugin:

-
GET https://devanturas.net/projects/itemeditor/storage/{uuid}
-
-Response:
+                    

Self-Hosting on Your Webserver

+

You can run this command storage system on your own webserver for production use:

+
    +
  1. Install Python 3.10+ and Flask on your server
  2. +
  3. Deploy the Flask app using a production WSGI server like Gunicorn or uWSGI
  4. +
  5. Use a reverse proxy (e.g. Nginx or Apache) to route traffic to the Flask app
  6. +
  7. Optional: Use Docker for easy deployment (see Dockerfile in the project)
  8. +
  9. Access via:
    https://your-domain/projects/itemeditor/storage
  10. +
  11. API endpoint:
    https://your-domain/projects/itemeditor/storage/<uuid>
  12. +
+

GET https://your-domain/projects/itemeditor/storage/<uuid> { "command": "your command here", - "created_at": "2026-01-07T12:00:00", - "expires_at": "2026-01-07T12:30:00" -}

+ "created_at": "...", + "expires_at": "..." +}

+

For best performance and security, do not use the Flask development server in production. Use Gunicorn + Nginx or Docker for real deployments.

@@ -489,6 +496,12 @@ function startCountdown(expiresAt) { const expiryTime = document.getElementById('expiryTime'); const endTime = new Date(expiresAt).getTime(); + // If expiry is in the past, show expired immediately + if (endTime < new Date().getTime()) { + expiryTime.innerHTML = 'Expired'; + return; + } + const interval = setInterval(() => { const now = new Date().getTime(); const distance = endTime - now; @@ -501,7 +514,6 @@ function startCountdown(expiresAt) { const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); const seconds = Math.floor((distance % (1000 * 60)) / 1000); - expiryTime.textContent = `${minutes}m ${seconds}s`; }, 1000); }