style: remove unnecessary inline comments

Removed Italian and redundant inline comments across multiple files.
This commit is contained in:
2026-06-16 18:30:40 +02:00 Unverified
parent 942143ddc7
commit f32fa8620b
8 changed files with 1 additions and 16 deletions
-4
View File
@@ -45,7 +45,6 @@ const isResolvingAddress = ref(false)
const addressSearchError = ref('') const addressSearchError = ref('')
const showAddressSuggestions = ref(false) const showAddressSuggestions = ref(false)
// Map variables
const mapContainer = ref<HTMLElement | null>(null) const mapContainer = ref<HTMLElement | null>(null)
let leaflet: typeof import('leaflet') | null = null let leaflet: typeof import('leaflet') | null = null
let map: LeafletMap | null = null let map: LeafletMap | null = null
@@ -62,7 +61,6 @@ const loadLeaflet = async () => {
const leafletModule = await import('leaflet') const leafletModule = await import('leaflet')
// Fix per le icone di Leaflet in Nuxt/Vite
const defaultIcon = leafletModule.icon({ const defaultIcon = leafletModule.icon({
iconUrl: 'https://unpkg.com/[email protected]/dist/images/marker-icon.png', iconUrl: 'https://unpkg.com/[email protected]/dist/images/marker-icon.png',
iconRetinaUrl: 'https://unpkg.com/[email protected]/dist/images/marker-icon-2x.png', iconRetinaUrl: 'https://unpkg.com/[email protected]/dist/images/marker-icon-2x.png',
@@ -276,7 +274,6 @@ const initMap = async () => {
void updateLocation(e.latlng.lat, e.latlng.lng) void updateLocation(e.latlng.lat, e.latlng.lng)
}) })
// Se c'è già una posizione, imposta il marker
if (form.value.latitude && form.value.longitude) { if (form.value.latitude && form.value.longitude) {
void updateLocation(form.value.latitude, form.value.longitude, { zoomTo: true }) void updateLocation(form.value.latitude, form.value.longitude, { zoomTo: true })
} }
@@ -435,7 +432,6 @@ watch(() => form.value.address, (newAddress) => {
}, 350) }, 350)
}) })
// Sincronizza input manuali con la mappa
watch([() => form.value.latitude, () => form.value.longitude], ([newLat, newLng]) => { watch([() => form.value.latitude, () => form.value.longitude], ([newLat, newLng]) => {
if (newLat && newLng && map && leaflet) { if (newLat && newLng && map && leaflet) {
if (!marker || marker.getLatLng().lat !== newLat || marker.getLatLng().lng !== newLng) { if (!marker || marker.getLatLng().lat !== newLat || marker.getLatLng().lng !== newLng) {
-3
View File
@@ -1,7 +1,6 @@
export default defineNuxtRouteMiddleware(async (to) => { export default defineNuxtRouteMiddleware(async (to) => {
const auth = useAuth() const auth = useAuth()
// Se c'è un token ma l'utente non è ancora caricato e non stiamo già sincronizzando, sincronizza
if ((auth.token.value || auth.tokenState.value) && !auth.user.value && !auth.isSyncingUser.value) { if ((auth.token.value || auth.tokenState.value) && !auth.user.value && !auth.isSyncingUser.value) {
try { try {
await auth.syncUser({ currentPath: to.path }) await auth.syncUser({ currentPath: to.path })
@@ -11,12 +10,10 @@ export default defineNuxtRouteMiddleware(async (to) => {
} }
} }
// Se non autenticato, redirige al login
if (!auth.isAuthenticated.value) { if (!auth.isAuthenticated.value) {
return navigateTo('/auth/login') return navigateTo('/auth/login')
} }
// Verifica ruoli se richiesto
const requiredRole = to.meta.auth?.role const requiredRole = to.meta.auth?.role
if (requiredRole && auth.user.value) { if (requiredRole && auth.user.value) {
-1
View File
@@ -68,7 +68,6 @@ const handleToggleBan = async () => {
} }
} }
// Modal per i ruoli
const editingUserId = ref<number | null>(null) const editingUserId = ref<number | null>(null)
const selectedRoles = ref<string[]>([]) const selectedRoles = ref<string[]>([])
const availableRoles = ['CITIZEN', 'OPERATOR', 'ADMIN'] const availableRoles = ['CITIZEN', 'OPERATOR', 'ADMIN']
-1
View File
@@ -9,7 +9,6 @@ useHead({ title: 'Accedi - Visione' })
const { requestOtp, verifyOtp, handleLoginSuccess } = useAuth() const { requestOtp, verifyOtp, handleLoginSuccess } = useAuth()
// UI State
const otpStep = ref<1 | 2>(1) const otpStep = ref<1 | 2>(1)
const isLoading = ref(false) const isLoading = ref(false)
const errorMessage = ref('') const errorMessage = ref('')
-2
View File
@@ -1,5 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
// La pagina è statica, usiamo solo i componenti UI
useHead({ useHead({
title: 'Informazioni sul Progetto - Visione', title: 'Informazioni sul Progetto - Visione',
}) })
@@ -7,7 +6,6 @@ useHead({
<template> <template>
<div> <div>
<!-- HERO SECTION (Senza pt-5/mt-5 come richiesto) -->
<div class="it-hero-wrapper it-primary"> <div class="it-hero-wrapper it-primary">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
-3
View File
@@ -5,11 +5,8 @@ import { BARI_BOUNDS, BARI_CENTER, isWithinBariBounds } from '~/utils/bari'
const { getOpenDataReports } = usePublic() const { getOpenDataReports } = usePublic()
// Reactive pagination state
const currentPage = ref(1) const currentPage = ref(1)
const perPage = ref(9) const perPage = ref(9)
// Fetch data automatically when currentPage changes
const { data: openDataResponse, pending } = await useAsyncData( const { data: openDataResponse, pending } = await useAsyncData(
'open-data-reports', 'open-data-reports',
() => getOpenDataReports({ page: currentPage.value, per_page: perPage.value }), () => getOpenDataReports({ page: currentPage.value, per_page: perPage.value }),
-1
View File
@@ -16,7 +16,6 @@ if (!reportId) {
navigateTo('/') navigateTo('/')
} }
// Fetch dati
const { data: reportData, refresh: refreshReport } = await useAsyncData(`report-${reportId}`, () => const { data: reportData, refresh: refreshReport } = await useAsyncData(`report-${reportId}`, () =>
getReportDetail(reportId) getReportDetail(reportId)
) )
+1 -1
View File
@@ -44,7 +44,7 @@ export interface AdminUser {
phone?: string; phone?: string;
banned?: boolean; banned?: boolean;
points?: number; points?: number;
roles?: string; // Comma-separated roles?: string;
} }
export interface TokenResponse { export interface TokenResponse {