diff --git a/src/frontend/flask_app/app.py b/src/frontend/flask_app/app.py index 1b1ddd9..bf6d030 100644 --- a/src/frontend/flask_app/app.py +++ b/src/frontend/flask_app/app.py @@ -1,6 +1,7 @@ """TieMeasureFlow Client - Flask Entry Point.""" import json import os +from datetime import date from urllib.parse import urlparse from flask import Flask, redirect, url_for, session, request @@ -101,6 +102,7 @@ def create_app() -> Flask: "languages": Config.LANGUAGES, "company_logo": session.get("company_logo"), "auto_logout_minutes": session.get("auto_logout_minutes"), + "current_year": date.today().year, } return app diff --git a/src/frontend/flask_app/static/css/themes.css b/src/frontend/flask_app/static/css/themes.css index 2021fdf..920d39c 100644 --- a/src/frontend/flask_app/static/css/themes.css +++ b/src/frontend/flask_app/static/css/themes.css @@ -69,6 +69,23 @@ } +/* ============================================================ + Brand details + ============================================================ */ + +:root { + accent-color: var(--color-primary); +} + +::selection { + background: rgba(37, 99, 235, 0.2); +} + +.dark ::selection { + background: rgba(96, 165, 250, 0.3); +} + + /* ============================================================ Global Transitions ============================================================ */ @@ -151,6 +168,7 @@ textarea:focus-visible { .tmf-card:hover { box-shadow: var(--shadow-md); + border-color: var(--scrollbar-thumb); } .tmf-card-header { @@ -250,11 +268,21 @@ textarea:focus-visible { border: 1px solid transparent; } +.btn:active:not(:disabled) { + transform: scale(0.97); +} + .btn:disabled { opacity: 0.5; cursor: not-allowed; } +.btn-lg { + padding: 0.75rem 1.5rem; + font-size: 1rem; + border-radius: 0.625rem; +} + .btn-primary { background: var(--color-primary); color: #FFFFFF; diff --git a/src/frontend/flask_app/templates/auth/login.html b/src/frontend/flask_app/templates/auth/login.html index 882be3f..9ab41fb 100644 --- a/src/frontend/flask_app/templates/auth/login.html +++ b/src/frontend/flask_app/templates/auth/login.html @@ -2,17 +2,24 @@ {% block title %}Login — TieMeasureFlow{% endblock %} {% block content %} -
-
+
+ + + + +
-
+
{% set logo_class = 'h-16 w-auto' %} {% include 'components/_app_logo.html' %}
-

+

{{ _('Accedi al sistema') }}

@@ -22,12 +29,12 @@
-
-
-
diff --git a/src/frontend/flask_app/translations/en/LC_MESSAGES/messages.po b/src/frontend/flask_app/translations/en/LC_MESSAGES/messages.po index 8ff3cba..52fbd02 100644 --- a/src/frontend/flask_app/translations/en/LC_MESSAGES/messages.po +++ b/src/frontend/flask_app/translations/en/LC_MESSAGES/messages.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: TieMeasureFlow 1.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2026-06-11 12:49+0000\n" +"POT-Creation-Date: 2026-06-11 15:33+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: en\n" @@ -163,8 +163,7 @@ msgstr "seconds due to inactivity." msgid "Continua a lavorare" msgstr "Keep working" -#: templates/admin/settings.html:3 templates/components/navbar.html:117 -#: templates/components/navbar.html:335 +#: templates/admin/settings.html:3 templates/components/navbar.html:37 msgid "Impostazioni" msgstr "Settings" @@ -456,8 +455,8 @@ msgid "Nuovo Utente" msgstr "New User" #: templates/admin/users.html:48 templates/admin/users.html:173 -#: templates/admin/users.html:179 templates/auth/login.html:26 -#: templates/auth/login.html:39 templates/auth/profile.html:36 +#: templates/admin/users.html:179 templates/auth/login.html:33 +#: templates/auth/login.html:47 templates/auth/profile.html:36 #: templates/measure/task_execute.html:649 msgid "Username" msgstr "Username" @@ -509,7 +508,7 @@ msgid "Il nome utente non può essere modificato" msgstr "Username cannot be changed" #: templates/admin/users.html:206 templates/admin/users.html:214 -#: templates/auth/login.html:47 templates/auth/login.html:59 +#: templates/auth/login.html:55 templates/auth/login.html:69 #: templates/measure/task_execute.html:654 msgid "Password" msgstr "Password" @@ -579,28 +578,36 @@ msgid "Username, nome visualizzato e password sono obbligatori" msgstr "Username, display name and password are required" # Login Page -#: templates/auth/login.html:16 +#: templates/auth/login.html:23 msgid "Accedi al sistema" msgstr "Sign in to your account" -#: templates/auth/login.html:71 +#: templates/auth/login.html:73 +msgid "Nascondi password" +msgstr "Hide password" + +#: templates/auth/login.html:73 +msgid "Mostra password" +msgstr "Show password" + +#: templates/auth/login.html:94 msgid "Accedi" msgstr "Sign In" -#: templates/auth/login.html:79 +#: templates/auth/login.html:102 msgid "Hai dimenticato la password?" msgstr "Forgot password?" -#: templates/auth/login.html:81 +#: templates/auth/login.html:104 msgid "Contatta l'amministratore" msgstr "Contact administrator" # Additional Login Page -#: templates/auth/login.html:88 +#: templates/auth/login.html:111 msgid "Sistema di misurazione industriale" msgstr "Industrial measurement system" -#: templates/auth/profile.html:2 templates/components/navbar.html:211 +#: templates/auth/profile.html:2 templates/components/navbar.html:147 msgid "Profilo" msgstr "Profile" @@ -650,8 +657,8 @@ msgstr "Logout from system" msgid "Termina la sessione corrente e torna alla schermata di login" msgstr "End current session and return to login screen" -#: templates/auth/profile.html:197 templates/components/navbar.html:222 -#: templates/components/navbar.html:231 +#: templates/auth/profile.html:197 templates/components/navbar.html:158 +#: templates/components/navbar.html:167 msgid "Logout" msgstr "Logout" @@ -720,33 +727,31 @@ msgid "NON CONFORME" msgstr "NON-CONFORMING" # Navbar -#: templates/components/navbar.html:38 templates/components/navbar.html:277 -#: templates/measure/task_complete.html:16 +#: templates/components/navbar.html:26 templates/measure/task_complete.html:16 #: templates/measure/task_execute.html:2 templates/measure/task_list.html:16 msgid "Misure" msgstr "Activities" -#: templates/components/navbar.html:55 templates/components/navbar.html:289 -#: templates/maker/recipe_editor.html:51 templates/maker/recipe_list.html:83 -#: templates/maker/recipe_preview.html:61 templates/maker/task_drawing.html:84 -#: templates/maker/task_editor.html:110 templates/maker/version_history.html:73 +#: templates/components/navbar.html:29 templates/maker/recipe_editor.html:51 +#: templates/maker/recipe_list.html:83 templates/maker/recipe_preview.html:61 +#: templates/maker/task_drawing.html:84 templates/maker/task_editor.html:110 +#: templates/maker/version_history.html:73 msgid "Ricette" msgstr "Recipes" -#: templates/components/navbar.html:72 templates/components/navbar.html:301 -#: templates/measure/task_complete.html:261 +#: templates/components/navbar.html:32 templates/measure/task_complete.html:261 msgid "Statistiche" msgstr "Statistics" -#: templates/components/navbar.html:89 templates/components/navbar.html:314 +#: templates/components/navbar.html:35 msgid "Utenti" msgstr "Users" -#: templates/components/navbar.html:103 templates/components/navbar.html:324 +#: templates/components/navbar.html:36 msgid "Stazioni" msgstr "Stations" -#: templates/components/navbar.html:218 +#: templates/components/navbar.html:154 msgid "Logout bloccato durante le misurazioni" msgstr "Logout blocked during measurements" diff --git a/src/frontend/flask_app/translations/it/LC_MESSAGES/messages.po b/src/frontend/flask_app/translations/it/LC_MESSAGES/messages.po index 8e11c4f..46543e7 100644 --- a/src/frontend/flask_app/translations/it/LC_MESSAGES/messages.po +++ b/src/frontend/flask_app/translations/it/LC_MESSAGES/messages.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: TieMeasureFlow 1.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2026-06-11 12:49+0000\n" +"POT-Creation-Date: 2026-06-11 15:33+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: it\n" @@ -163,8 +163,7 @@ msgstr "secondi per inattività." msgid "Continua a lavorare" msgstr "Continua a lavorare" -#: templates/admin/settings.html:3 templates/components/navbar.html:117 -#: templates/components/navbar.html:335 +#: templates/admin/settings.html:3 templates/components/navbar.html:37 msgid "Impostazioni" msgstr "Impostazioni" @@ -458,8 +457,8 @@ msgid "Nuovo Utente" msgstr "Nuovo Utente" #: templates/admin/users.html:48 templates/admin/users.html:173 -#: templates/admin/users.html:179 templates/auth/login.html:26 -#: templates/auth/login.html:39 templates/auth/profile.html:36 +#: templates/admin/users.html:179 templates/auth/login.html:33 +#: templates/auth/login.html:47 templates/auth/profile.html:36 #: templates/measure/task_execute.html:649 msgid "Username" msgstr "Username" @@ -511,7 +510,7 @@ msgid "Il nome utente non può essere modificato" msgstr "Il nome utente non può essere modificato" #: templates/admin/users.html:206 templates/admin/users.html:214 -#: templates/auth/login.html:47 templates/auth/login.html:59 +#: templates/auth/login.html:55 templates/auth/login.html:69 #: templates/measure/task_execute.html:654 msgid "Password" msgstr "Password" @@ -581,28 +580,36 @@ msgid "Username, nome visualizzato e password sono obbligatori" msgstr "Username, nome visualizzato e password sono obbligatori" # Login Page -#: templates/auth/login.html:16 +#: templates/auth/login.html:23 msgid "Accedi al sistema" msgstr "Accedi al sistema" -#: templates/auth/login.html:71 +#: templates/auth/login.html:73 +msgid "Nascondi password" +msgstr "Nascondi password" + +#: templates/auth/login.html:73 +msgid "Mostra password" +msgstr "Mostra password" + +#: templates/auth/login.html:94 msgid "Accedi" msgstr "Accedi" -#: templates/auth/login.html:79 +#: templates/auth/login.html:102 msgid "Hai dimenticato la password?" msgstr "Hai dimenticato la password?" -#: templates/auth/login.html:81 +#: templates/auth/login.html:104 msgid "Contatta l'amministratore" msgstr "Contatta l'amministratore" # Additional Login Page -#: templates/auth/login.html:88 +#: templates/auth/login.html:111 msgid "Sistema di misurazione industriale" msgstr "Sistema di misurazione industriale" -#: templates/auth/profile.html:2 templates/components/navbar.html:211 +#: templates/auth/profile.html:2 templates/components/navbar.html:147 msgid "Profilo" msgstr "Profilo" @@ -652,8 +659,8 @@ msgstr "Esci dal sistema" msgid "Termina la sessione corrente e torna alla schermata di login" msgstr "Termina la sessione corrente e torna alla schermata di login" -#: templates/auth/profile.html:197 templates/components/navbar.html:222 -#: templates/components/navbar.html:231 +#: templates/auth/profile.html:197 templates/components/navbar.html:158 +#: templates/components/navbar.html:167 msgid "Logout" msgstr "Logout" @@ -722,33 +729,31 @@ msgid "NON CONFORME" msgstr "NON CONFORME" # Navbar -#: templates/components/navbar.html:38 templates/components/navbar.html:277 -#: templates/measure/task_complete.html:16 +#: templates/components/navbar.html:26 templates/measure/task_complete.html:16 #: templates/measure/task_execute.html:2 templates/measure/task_list.html:16 msgid "Misure" msgstr "Attività" -#: templates/components/navbar.html:55 templates/components/navbar.html:289 -#: templates/maker/recipe_editor.html:51 templates/maker/recipe_list.html:83 -#: templates/maker/recipe_preview.html:61 templates/maker/task_drawing.html:84 -#: templates/maker/task_editor.html:110 templates/maker/version_history.html:73 +#: templates/components/navbar.html:29 templates/maker/recipe_editor.html:51 +#: templates/maker/recipe_list.html:83 templates/maker/recipe_preview.html:61 +#: templates/maker/task_drawing.html:84 templates/maker/task_editor.html:110 +#: templates/maker/version_history.html:73 msgid "Ricette" msgstr "Ricette" -#: templates/components/navbar.html:72 templates/components/navbar.html:301 -#: templates/measure/task_complete.html:261 +#: templates/components/navbar.html:32 templates/measure/task_complete.html:261 msgid "Statistiche" msgstr "Statistiche" -#: templates/components/navbar.html:89 templates/components/navbar.html:314 +#: templates/components/navbar.html:35 msgid "Utenti" msgstr "Utenti" -#: templates/components/navbar.html:103 templates/components/navbar.html:324 +#: templates/components/navbar.html:36 msgid "Stazioni" msgstr "Stazioni" -#: templates/components/navbar.html:218 +#: templates/components/navbar.html:154 msgid "Logout bloccato durante le misurazioni" msgstr "Logout bloccato durante le misurazioni" diff --git a/src/frontend/flask_app/translations/messages.pot b/src/frontend/flask_app/translations/messages.pot index 7869846..51abd43 100644 --- a/src/frontend/flask_app/translations/messages.pot +++ b/src/frontend/flask_app/translations/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2026-06-11 12:49+0000\n" +"POT-Creation-Date: 2026-06-11 15:33+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -160,8 +160,7 @@ msgstr "" msgid "Continua a lavorare" msgstr "" -#: templates/admin/settings.html:3 templates/components/navbar.html:117 -#: templates/components/navbar.html:335 +#: templates/admin/settings.html:3 templates/components/navbar.html:37 msgid "Impostazioni" msgstr "" @@ -448,8 +447,8 @@ msgid "Nuovo Utente" msgstr "" #: templates/admin/users.html:48 templates/admin/users.html:173 -#: templates/admin/users.html:179 templates/auth/login.html:26 -#: templates/auth/login.html:39 templates/auth/profile.html:36 +#: templates/admin/users.html:179 templates/auth/login.html:33 +#: templates/auth/login.html:47 templates/auth/profile.html:36 #: templates/measure/task_execute.html:649 msgid "Username" msgstr "" @@ -501,7 +500,7 @@ msgid "Il nome utente non può essere modificato" msgstr "" #: templates/admin/users.html:206 templates/admin/users.html:214 -#: templates/auth/login.html:47 templates/auth/login.html:59 +#: templates/auth/login.html:55 templates/auth/login.html:69 #: templates/measure/task_execute.html:654 msgid "Password" msgstr "" @@ -570,27 +569,35 @@ msgstr "" msgid "Username, nome visualizzato e password sono obbligatori" msgstr "" -#: templates/auth/login.html:16 +#: templates/auth/login.html:23 msgid "Accedi al sistema" msgstr "" -#: templates/auth/login.html:71 +#: templates/auth/login.html:73 +msgid "Nascondi password" +msgstr "" + +#: templates/auth/login.html:73 +msgid "Mostra password" +msgstr "" + +#: templates/auth/login.html:94 msgid "Accedi" msgstr "" -#: templates/auth/login.html:79 +#: templates/auth/login.html:102 msgid "Hai dimenticato la password?" msgstr "" -#: templates/auth/login.html:81 +#: templates/auth/login.html:104 msgid "Contatta l'amministratore" msgstr "" -#: templates/auth/login.html:88 +#: templates/auth/login.html:111 msgid "Sistema di misurazione industriale" msgstr "" -#: templates/auth/profile.html:2 templates/components/navbar.html:211 +#: templates/auth/profile.html:2 templates/components/navbar.html:147 msgid "Profilo" msgstr "" @@ -638,8 +645,8 @@ msgstr "" msgid "Termina la sessione corrente e torna alla schermata di login" msgstr "" -#: templates/auth/profile.html:197 templates/components/navbar.html:222 -#: templates/components/navbar.html:231 +#: templates/auth/profile.html:197 templates/components/navbar.html:158 +#: templates/components/navbar.html:167 msgid "Logout" msgstr "" @@ -703,33 +710,31 @@ msgstr "" msgid "NON CONFORME" msgstr "" -#: templates/components/navbar.html:38 templates/components/navbar.html:277 -#: templates/measure/task_complete.html:16 +#: templates/components/navbar.html:26 templates/measure/task_complete.html:16 #: templates/measure/task_execute.html:2 templates/measure/task_list.html:16 msgid "Misure" msgstr "" -#: templates/components/navbar.html:55 templates/components/navbar.html:289 -#: templates/maker/recipe_editor.html:51 templates/maker/recipe_list.html:83 -#: templates/maker/recipe_preview.html:61 templates/maker/task_drawing.html:84 -#: templates/maker/task_editor.html:110 templates/maker/version_history.html:73 +#: templates/components/navbar.html:29 templates/maker/recipe_editor.html:51 +#: templates/maker/recipe_list.html:83 templates/maker/recipe_preview.html:61 +#: templates/maker/task_drawing.html:84 templates/maker/task_editor.html:110 +#: templates/maker/version_history.html:73 msgid "Ricette" msgstr "" -#: templates/components/navbar.html:72 templates/components/navbar.html:301 -#: templates/measure/task_complete.html:261 +#: templates/components/navbar.html:32 templates/measure/task_complete.html:261 msgid "Statistiche" msgstr "" -#: templates/components/navbar.html:89 templates/components/navbar.html:314 +#: templates/components/navbar.html:35 msgid "Utenti" msgstr "" -#: templates/components/navbar.html:103 templates/components/navbar.html:324 +#: templates/components/navbar.html:36 msgid "Stazioni" msgstr "" -#: templates/components/navbar.html:218 +#: templates/components/navbar.html:154 msgid "Logout bloccato durante le misurazioni" msgstr ""