git status! RFACTOR TEMPLATE git status!

This commit is contained in:
Mateusz Gruszczyński
2025-02-28 16:26:27 +01:00
parent d40511823f
commit 911aaab005
17 changed files with 506 additions and 432 deletions

13
app.py
View File

@@ -691,6 +691,19 @@ def get_data_folder_size():
pass
return total_size
@app.template_global()
def bootstrap_alert_category(cat):
mapping = {
"error": "danger",
"fail": "danger",
"warn": "warning",
"warning": "warning",
"ok": "success",
"success": "success",
"info": "info"
}
return mapping.get(cat.lower(), "info")
###############################################################################
# ROUTES
###############################################################################