Implement version check on load, if the footer has data-update-check=true,it fetches /api/version and sets the version badge. No request is made when update check is disabled.

This commit is contained in:
2026-02-02 20:46:55 +01:00
parent f00c1c1b22
commit b3e32fd5c1
11 changed files with 157 additions and 11 deletions

View File

@@ -949,6 +949,8 @@
<footer id="footer" class="hidden bg-gray-100 py-4">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center text-gray-600 text-sm">
<p class="mb-0">
Fail2ban-UI v<span id="footer-app-version">{{.appVersion}}</span>
<span id="version-badge-container" class="ml-2" data-update-check="{{.updateCheckEnabled}}"></span>
&copy; <a href="https://swissmakers.ch" target="_blank" class="text-blue-600 hover:text-blue-800">Swissmakers GmbH</a>
-
<a href="https://github.com/swissmakers/fail2ban-ui" target="_blank" class="text-blue-600 hover:text-blue-800">GitHub</a>