Enhance frontend UI and functionality

- Added page transition effects in app.vue for smoother navigation.
- Updated nuxt.config.ts to include custom font styles and page transitions.
- Improved loading indicators in MapPageWrapper.vue and login.vue for better user experience.
- Enhanced MapView.vue with a collapsible control panel and improved styling.
- Introduced new icons for various components to enhance visual consistency.
- Updated Tailwind CSS configuration to extend font families and improve theme management.
- Refined layout styles in default.vue and admin pages for better responsiveness and aesthetics.
- Implemented error handling and loading states across various forms for improved user feedback.
This commit is contained in:
2026-02-25 00:16:22 +03:00
parent 82cb8a13f5
commit 051719381a
37 changed files with 442 additions and 134 deletions

View File

@@ -0,0 +1,31 @@
import type { Plugin } from 'vite'
/**
* Dev-only: reject requests with malformed URIs before Vite's static/transform
* middleware runs decodeURI(), which would throw and crash the server.
* See: https://github.com/vitejs/vite/issues/6482
*/
export function viteUriGuard(): Plugin {
return {
name: 'vite-uri-guard',
apply: 'serve',
configureServer(server) {
const guard = (req: any, res: any, next: () => void) => {
const raw = req.url ?? req.originalUrl ?? ''
try {
decodeURI(raw)
const path = raw.includes('?') ? raw.slice(0, raw.indexOf('?')) : raw
if (path) decodeURI(path)
} catch {
res.statusCode = 400
res.setHeader('Content-Type', 'text/plain')
res.end('Bad Request: malformed URI')
return
}
next()
}
// Prepend so we run before Vite's static/transform middleware (which calls decodeURI)
server.middlewares.stack.unshift({ route: '', handle: guard })
},
}
}