From a66339a7fccaf6891561db11febf7f2bf80504e5 Mon Sep 17 00:00:00 2001 From: michelangelo Date: Sat, 13 Jun 2026 17:15:59 +0200 Subject: [PATCH] feat: update authentication flow and user navigation --- app/assets/css/style.css | 71 +++++ app/components/Header.vue | 14 +- app/components/ReportTable.vue | 90 ++++++ app/components/dashboard/CitizenDashboard.vue | 258 ++++-------------- .../dashboard/OperatorDashboard.vue | 64 +++-- app/composables/useAuth.ts | 6 +- app/middleware/guest.ts | 4 +- app/pages/auth/change-password.vue | 12 +- app/pages/dashboard/index.vue | 11 +- app/pages/me.vue | 253 ----------------- app/pages/operator/assigned.vue | 38 +-- app/pages/operator/index.vue | 42 +-- app/pages/operator/others.vue | 38 +-- app/pages/profile.vue | 156 +++++++++++ app/pages/reports/create.vue | 144 ---------- app/pages/reports/index.vue | 115 ++++++++ app/pages/reports/new.vue | 102 +++++++ app/plugins/auth.client.ts | 3 - 18 files changed, 662 insertions(+), 759 deletions(-) create mode 100644 app/components/ReportTable.vue delete mode 100644 app/pages/me.vue create mode 100644 app/pages/profile.vue delete mode 100644 app/pages/reports/create.vue create mode 100644 app/pages/reports/index.vue create mode 100644 app/pages/reports/new.vue diff --git a/app/assets/css/style.css b/app/assets/css/style.css index ebb9486..814b736 100644 --- a/app/assets/css/style.css +++ b/app/assets/css/style.css @@ -152,6 +152,10 @@ html body .navbar .navbar-collapsable .navbar-nav li.nav-item a.nav-link[data-fo align-items: center; } +.it-hero-wrapper.hero-compact .container { + min-height: 132px; +} + .it-hero-wrapper .container > .row { width: 100%; justify-content: center; @@ -229,6 +233,69 @@ html body .navbar .navbar-collapsable .navbar-nav li.nav-item a.nav-link[data-fo fill: #fff; } +.btn-xs { + --bs-btn-padding-y: 0.25rem; + --bs-btn-padding-x: 0.55rem; + --bs-btn-font-size: 0.875rem; + line-height: 1.2; +} + +.btn-icon.btn-xs { + align-items: center; + display: inline-flex; + height: 2rem; + justify-content: center; + padding: 0; + width: 2rem; +} + +.report-table-wrapper { + border: 1px solid #dfe4ea; + border-radius: 4px; +} + +.report-table thead th { + background: #f7f9fa; + color: var(--visione-text-soft); + font-size: 0.8125rem; + font-weight: 700; + padding: 0.65rem 0.75rem; + text-transform: uppercase; +} + +.report-table tbody td { + font-size: 0.9375rem; + padding: 0.75rem; + vertical-align: middle; +} + +.report-table-id { + color: var(--visione-primary-dark); + font-weight: 700; + white-space: nowrap; +} + +.report-address { + color: var(--visione-text-soft); + display: inline-block; + max-width: min(36vw, 26rem); + overflow: hidden; + text-overflow: ellipsis; + vertical-align: bottom; + white-space: nowrap; +} + +.dashboard-stat { + border-left: 4px solid var(--visione-primary); +} + +.dashboard-stat .stat-value { + color: var(--visione-primary-dark); + font-size: 1.75rem; + font-weight: 700; + line-height: 1; +} + .it-header-wrapper .header-slim-right-zone .btn .rounded-icon, .it-header-wrapper .header-slim-right-zone .btn .rounded-icon .icon { @@ -257,4 +324,8 @@ html body .navbar .navbar-collapsable .navbar-nav li.nav-item a.nav-link[data-fo padding-left: 1rem !important; padding-right: 1rem !important; } + + .report-address { + max-width: 14rem; + } } diff --git a/app/components/Header.vue b/app/components/Header.vue index c0abfa7..8f73aa5 100644 --- a/app/components/Header.vue +++ b/app/components/Header.vue @@ -12,7 +12,7 @@ watch(() => route.path, () => { const navLinks = [ { name: 'Home', path: '/' }, - { name: 'Fai una segnalazione', path: '/reports/create' }, + { name: 'Fai una segnalazione', path: '/reports/new' }, { name: 'Esplora i dati', path: '/open-data' }, { name: 'Come funziona', path: '/info' } ] @@ -43,9 +43,16 @@ const { isAuthenticated, user, logout } = useAuth()