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

@@ -390,6 +390,9 @@
"auth.logout": "Abmelden",
"auth.user_info": "Benutzerinformationen",
"auth.session_expired": "Ihre Sitzung ist abgelaufen. Bitte melden Sie sich erneut an.",
"auth.login_required": "Authentifizierung erforderlich"
"auth.login_required": "Authentifizierung erforderlich",
"footer.version": "Fail2ban-UI v{version}",
"footer.latest": "Aktuell",
"footer.update_available": "Update verfügbar: v{version}"
}

View File

@@ -390,6 +390,9 @@
"auth.logout": "Abmäudä",
"auth.user_info": "Benutzerinformationä",
"auth.session_expired": "Ihri Sitzig isch abglaufä. Bitte mäudä di erneut a.",
"auth.login_required": "Authentifizierig erforderlich"
"auth.login_required": "Authentifizierig erforderlich",
"footer.version": "Fail2ban-UI v{version}",
"footer.latest": "Aktuell",
"footer.update_available": "Update verfüegbar: v{version}"
}

View File

@@ -390,6 +390,9 @@
"auth.logout": "Logout",
"auth.user_info": "User Information",
"auth.session_expired": "Your session has expired. Please log in again.",
"auth.login_required": "Authentication required"
"auth.login_required": "Authentication required",
"footer.version": "Fail2ban-UI v{version}",
"footer.latest": "Latest",
"footer.update_available": "Update available: v{version}"
}

View File

@@ -390,5 +390,8 @@
"auth.logout": "Cerrar sesión",
"auth.user_info": "Información del usuario",
"auth.session_expired": "Su sesión ha expirado. Por favor, inicie sesión nuevamente.",
"auth.login_required": "Autenticación requerida"
"auth.login_required": "Autenticación requerida",
"footer.version": "Fail2ban-UI v{version}",
"footer.latest": "Actual",
"footer.update_available": "Actualización disponible: v{version}"
}

View File

@@ -390,5 +390,8 @@
"auth.logout": "Déconnexion",
"auth.user_info": "Informations utilisateur",
"auth.session_expired": "Votre session a expiré. Veuillez vous reconnecter.",
"auth.login_required": "Authentification requise"
"auth.login_required": "Authentification requise",
"footer.version": "Fail2ban-UI v{version}",
"footer.latest": "À jour",
"footer.update_available": "Mise à jour disponible : v{version}"
}

View File

@@ -390,5 +390,8 @@
"auth.logout": "Esci",
"auth.user_info": "Informazioni utente",
"auth.session_expired": "La tua sessione è scaduta. Si prega di accedere nuovamente.",
"auth.login_required": "Autenticazione richiesta"
"auth.login_required": "Autenticazione richiesta",
"footer.version": "Fail2ban-UI v{version}",
"footer.latest": "Aggiornato",
"footer.update_available": "Aggiornamento disponibile: v{version}"
}

View File

@@ -0,0 +1,20 @@
// Fail2ban UI - A Swiss made, management interface for Fail2ban.
//
// Copyright (C) 2025 Swissmakers GmbH (https://swissmakers.ch)
//
// Licensed under the GNU General Public License, Version 3 (GPL-3.0)
// You may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.gnu.org/licenses/gpl-3.0.en.html
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package version
// Version is the current Fail2ban-UI version (in best case it matches the latest release tag on GitHub).
const Version = "1.3.6"