Compare commits
4 Commits
63506d620f
...
45da7f62fe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45da7f62fe | ||
| cec96b94da | |||
| 4d4cae2d8b | |||
| bd8bb70b88 |
6672
package-lock.json
generated
6672
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -26,6 +26,7 @@
|
|||||||
"@tanstack/react-start": "^1.166.8",
|
"@tanstack/react-start": "^1.166.8",
|
||||||
"@tanstack/router-plugin": "^1.166.7",
|
"@tanstack/router-plugin": "^1.166.7",
|
||||||
"lucide-react": "^0.577.0",
|
"lucide-react": "^0.577.0",
|
||||||
|
"maplibre-gl": "^5.19.0",
|
||||||
"nitro": "^3.0.1-alpha.2",
|
"nitro": "^3.0.1-alpha.2",
|
||||||
"react": "^19.2.4",
|
"react": "^19.2.4",
|
||||||
"react-dom": "^19.2.4",
|
"react-dom": "^19.2.4",
|
||||||
@@ -49,7 +50,6 @@
|
|||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
"vite": "^7.3.1",
|
"vite": "^7.3.1",
|
||||||
"vite-tsconfig-paths": "^6.1.1",
|
"vite-tsconfig-paths": "^6.1.1",
|
||||||
"vitest": "^3.2.4",
|
"vitest": "^3.2.4"
|
||||||
"@inlang/cli": "^3.0.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1476
src/components/maps/map.tsx
Normal file
1476
src/components/maps/map.tsx
Normal file
File diff suppressed because it is too large
Load Diff
6
src/lib/utils.ts
Normal file
6
src/lib/utils.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import { type ClassValue, clsx } from "clsx"
|
||||||
|
import { twMerge } from "tailwind-merge"
|
||||||
|
|
||||||
|
export function cn(...inputs: ClassValue[]) {
|
||||||
|
return twMerge(clsx(inputs))
|
||||||
|
}
|
||||||
@@ -16,9 +16,13 @@ import { Route as AuthedRouteImport } from './routes/_authed'
|
|||||||
import { Route as IndexRouteImport } from './routes/index'
|
import { Route as IndexRouteImport } from './routes/index'
|
||||||
import { Route as DemoTanstackQueryRouteImport } from './routes/demo/tanstack-query'
|
import { Route as DemoTanstackQueryRouteImport } from './routes/demo/tanstack-query'
|
||||||
import { Route as DemoI18nRouteImport } from './routes/demo.i18n'
|
import { Route as DemoI18nRouteImport } from './routes/demo.i18n'
|
||||||
|
<<<<<<< HEAD
|
||||||
import { Route as AccessRegisterRouteImport } from './routes/access.register'
|
import { Route as AccessRegisterRouteImport } from './routes/access.register'
|
||||||
import { Route as AccessLoginRouteImport } from './routes/access.login'
|
import { Route as AccessLoginRouteImport } from './routes/access.login'
|
||||||
import { Route as AuthedDashboardRouteImport } from './routes/_authed/dashboard'
|
import { Route as AuthedDashboardRouteImport } from './routes/_authed/dashboard'
|
||||||
|
=======
|
||||||
|
import { Route as AuthDashboardRouteImport } from './routes/auth/dashboard'
|
||||||
|
>>>>>>> main
|
||||||
import { Route as DemoSentryTestingRouteImport } from './routes/demo/sentry.testing'
|
import { Route as DemoSentryTestingRouteImport } from './routes/demo/sentry.testing'
|
||||||
|
|
||||||
const LogoutRoute = LogoutRouteImport.update({
|
const LogoutRoute = LogoutRouteImport.update({
|
||||||
@@ -55,6 +59,7 @@ const DemoI18nRoute = DemoI18nRouteImport.update({
|
|||||||
path: '/demo/i18n',
|
path: '/demo/i18n',
|
||||||
getParentRoute: () => rootRouteImport,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any)
|
} as any)
|
||||||
|
<<<<<<< HEAD
|
||||||
const AccessRegisterRoute = AccessRegisterRouteImport.update({
|
const AccessRegisterRoute = AccessRegisterRouteImport.update({
|
||||||
id: '/register',
|
id: '/register',
|
||||||
path: '/register',
|
path: '/register',
|
||||||
@@ -69,6 +74,12 @@ const AuthedDashboardRoute = AuthedDashboardRouteImport.update({
|
|||||||
id: '/dashboard',
|
id: '/dashboard',
|
||||||
path: '/dashboard',
|
path: '/dashboard',
|
||||||
getParentRoute: () => AuthedRoute,
|
getParentRoute: () => AuthedRoute,
|
||||||
|
=======
|
||||||
|
const AuthDashboardRoute = AuthDashboardRouteImport.update({
|
||||||
|
id: '/auth/dashboard',
|
||||||
|
path: '/auth/dashboard',
|
||||||
|
getParentRoute: () => rootRouteImport,
|
||||||
|
>>>>>>> main
|
||||||
} as any)
|
} as any)
|
||||||
const DemoSentryTestingRoute = DemoSentryTestingRouteImport.update({
|
const DemoSentryTestingRoute = DemoSentryTestingRouteImport.update({
|
||||||
id: '/demo/sentry/testing',
|
id: '/demo/sentry/testing',
|
||||||
@@ -78,24 +89,34 @@ const DemoSentryTestingRoute = DemoSentryTestingRouteImport.update({
|
|||||||
|
|
||||||
export interface FileRoutesByFullPath {
|
export interface FileRoutesByFullPath {
|
||||||
'/': typeof IndexRoute
|
'/': typeof IndexRoute
|
||||||
|
<<<<<<< HEAD
|
||||||
'/access': typeof AccessRouteWithChildren
|
'/access': typeof AccessRouteWithChildren
|
||||||
'/login': typeof LoginRoute
|
'/login': typeof LoginRoute
|
||||||
'/logout': typeof LogoutRoute
|
'/logout': typeof LogoutRoute
|
||||||
'/dashboard': typeof AuthedDashboardRoute
|
'/dashboard': typeof AuthedDashboardRoute
|
||||||
'/access/login': typeof AccessLoginRoute
|
'/access/login': typeof AccessLoginRoute
|
||||||
'/access/register': typeof AccessRegisterRoute
|
'/access/register': typeof AccessRegisterRoute
|
||||||
|
=======
|
||||||
|
'/login': typeof LoginRouteRoute
|
||||||
|
'/auth/dashboard': typeof AuthDashboardRoute
|
||||||
|
>>>>>>> main
|
||||||
'/demo/i18n': typeof DemoI18nRoute
|
'/demo/i18n': typeof DemoI18nRoute
|
||||||
'/demo/tanstack-query': typeof DemoTanstackQueryRoute
|
'/demo/tanstack-query': typeof DemoTanstackQueryRoute
|
||||||
'/demo/sentry/testing': typeof DemoSentryTestingRoute
|
'/demo/sentry/testing': typeof DemoSentryTestingRoute
|
||||||
}
|
}
|
||||||
export interface FileRoutesByTo {
|
export interface FileRoutesByTo {
|
||||||
'/': typeof IndexRoute
|
'/': typeof IndexRoute
|
||||||
|
<<<<<<< HEAD
|
||||||
'/access': typeof AccessRouteWithChildren
|
'/access': typeof AccessRouteWithChildren
|
||||||
'/login': typeof LoginRoute
|
'/login': typeof LoginRoute
|
||||||
'/logout': typeof LogoutRoute
|
'/logout': typeof LogoutRoute
|
||||||
'/dashboard': typeof AuthedDashboardRoute
|
'/dashboard': typeof AuthedDashboardRoute
|
||||||
'/access/login': typeof AccessLoginRoute
|
'/access/login': typeof AccessLoginRoute
|
||||||
'/access/register': typeof AccessRegisterRoute
|
'/access/register': typeof AccessRegisterRoute
|
||||||
|
=======
|
||||||
|
'/login': typeof LoginRouteRoute
|
||||||
|
'/auth/dashboard': typeof AuthDashboardRoute
|
||||||
|
>>>>>>> main
|
||||||
'/demo/i18n': typeof DemoI18nRoute
|
'/demo/i18n': typeof DemoI18nRoute
|
||||||
'/demo/tanstack-query': typeof DemoTanstackQueryRoute
|
'/demo/tanstack-query': typeof DemoTanstackQueryRoute
|
||||||
'/demo/sentry/testing': typeof DemoSentryTestingRoute
|
'/demo/sentry/testing': typeof DemoSentryTestingRoute
|
||||||
@@ -103,6 +124,7 @@ export interface FileRoutesByTo {
|
|||||||
export interface FileRoutesById {
|
export interface FileRoutesById {
|
||||||
__root__: typeof rootRouteImport
|
__root__: typeof rootRouteImport
|
||||||
'/': typeof IndexRoute
|
'/': typeof IndexRoute
|
||||||
|
<<<<<<< HEAD
|
||||||
'/_authed': typeof AuthedRouteWithChildren
|
'/_authed': typeof AuthedRouteWithChildren
|
||||||
'/access': typeof AccessRouteWithChildren
|
'/access': typeof AccessRouteWithChildren
|
||||||
'/login': typeof LoginRoute
|
'/login': typeof LoginRoute
|
||||||
@@ -110,6 +132,10 @@ export interface FileRoutesById {
|
|||||||
'/_authed/dashboard': typeof AuthedDashboardRoute
|
'/_authed/dashboard': typeof AuthedDashboardRoute
|
||||||
'/access/login': typeof AccessLoginRoute
|
'/access/login': typeof AccessLoginRoute
|
||||||
'/access/register': typeof AccessRegisterRoute
|
'/access/register': typeof AccessRegisterRoute
|
||||||
|
=======
|
||||||
|
'/login': typeof LoginRouteRoute
|
||||||
|
'/auth/dashboard': typeof AuthDashboardRoute
|
||||||
|
>>>>>>> main
|
||||||
'/demo/i18n': typeof DemoI18nRoute
|
'/demo/i18n': typeof DemoI18nRoute
|
||||||
'/demo/tanstack-query': typeof DemoTanstackQueryRoute
|
'/demo/tanstack-query': typeof DemoTanstackQueryRoute
|
||||||
'/demo/sentry/testing': typeof DemoSentryTestingRoute
|
'/demo/sentry/testing': typeof DemoSentryTestingRoute
|
||||||
@@ -120,10 +146,14 @@ export interface FileRouteTypes {
|
|||||||
| '/'
|
| '/'
|
||||||
| '/access'
|
| '/access'
|
||||||
| '/login'
|
| '/login'
|
||||||
|
<<<<<<< HEAD
|
||||||
| '/logout'
|
| '/logout'
|
||||||
| '/dashboard'
|
| '/dashboard'
|
||||||
| '/access/login'
|
| '/access/login'
|
||||||
| '/access/register'
|
| '/access/register'
|
||||||
|
=======
|
||||||
|
| '/auth/dashboard'
|
||||||
|
>>>>>>> main
|
||||||
| '/demo/i18n'
|
| '/demo/i18n'
|
||||||
| '/demo/tanstack-query'
|
| '/demo/tanstack-query'
|
||||||
| '/demo/sentry/testing'
|
| '/demo/sentry/testing'
|
||||||
@@ -132,10 +162,14 @@ export interface FileRouteTypes {
|
|||||||
| '/'
|
| '/'
|
||||||
| '/access'
|
| '/access'
|
||||||
| '/login'
|
| '/login'
|
||||||
|
<<<<<<< HEAD
|
||||||
| '/logout'
|
| '/logout'
|
||||||
| '/dashboard'
|
| '/dashboard'
|
||||||
| '/access/login'
|
| '/access/login'
|
||||||
| '/access/register'
|
| '/access/register'
|
||||||
|
=======
|
||||||
|
| '/auth/dashboard'
|
||||||
|
>>>>>>> main
|
||||||
| '/demo/i18n'
|
| '/demo/i18n'
|
||||||
| '/demo/tanstack-query'
|
| '/demo/tanstack-query'
|
||||||
| '/demo/sentry/testing'
|
| '/demo/sentry/testing'
|
||||||
@@ -145,10 +179,14 @@ export interface FileRouteTypes {
|
|||||||
| '/_authed'
|
| '/_authed'
|
||||||
| '/access'
|
| '/access'
|
||||||
| '/login'
|
| '/login'
|
||||||
|
<<<<<<< HEAD
|
||||||
| '/logout'
|
| '/logout'
|
||||||
| '/_authed/dashboard'
|
| '/_authed/dashboard'
|
||||||
| '/access/login'
|
| '/access/login'
|
||||||
| '/access/register'
|
| '/access/register'
|
||||||
|
=======
|
||||||
|
| '/auth/dashboard'
|
||||||
|
>>>>>>> main
|
||||||
| '/demo/i18n'
|
| '/demo/i18n'
|
||||||
| '/demo/tanstack-query'
|
| '/demo/tanstack-query'
|
||||||
| '/demo/sentry/testing'
|
| '/demo/sentry/testing'
|
||||||
@@ -156,10 +194,15 @@ export interface FileRouteTypes {
|
|||||||
}
|
}
|
||||||
export interface RootRouteChildren {
|
export interface RootRouteChildren {
|
||||||
IndexRoute: typeof IndexRoute
|
IndexRoute: typeof IndexRoute
|
||||||
|
<<<<<<< HEAD
|
||||||
AuthedRoute: typeof AuthedRouteWithChildren
|
AuthedRoute: typeof AuthedRouteWithChildren
|
||||||
AccessRoute: typeof AccessRouteWithChildren
|
AccessRoute: typeof AccessRouteWithChildren
|
||||||
LoginRoute: typeof LoginRoute
|
LoginRoute: typeof LoginRoute
|
||||||
LogoutRoute: typeof LogoutRoute
|
LogoutRoute: typeof LogoutRoute
|
||||||
|
=======
|
||||||
|
LoginRouteRoute: typeof LoginRouteRoute
|
||||||
|
AuthDashboardRoute: typeof AuthDashboardRoute
|
||||||
|
>>>>>>> main
|
||||||
DemoI18nRoute: typeof DemoI18nRoute
|
DemoI18nRoute: typeof DemoI18nRoute
|
||||||
DemoTanstackQueryRoute: typeof DemoTanstackQueryRoute
|
DemoTanstackQueryRoute: typeof DemoTanstackQueryRoute
|
||||||
DemoSentryTestingRoute: typeof DemoSentryTestingRoute
|
DemoSentryTestingRoute: typeof DemoSentryTestingRoute
|
||||||
@@ -216,6 +259,7 @@ declare module '@tanstack/react-router' {
|
|||||||
preLoaderRoute: typeof DemoI18nRouteImport
|
preLoaderRoute: typeof DemoI18nRouteImport
|
||||||
parentRoute: typeof rootRouteImport
|
parentRoute: typeof rootRouteImport
|
||||||
}
|
}
|
||||||
|
<<<<<<< HEAD
|
||||||
'/access/register': {
|
'/access/register': {
|
||||||
id: '/access/register'
|
id: '/access/register'
|
||||||
path: '/register'
|
path: '/register'
|
||||||
@@ -236,6 +280,14 @@ declare module '@tanstack/react-router' {
|
|||||||
fullPath: '/dashboard'
|
fullPath: '/dashboard'
|
||||||
preLoaderRoute: typeof AuthedDashboardRouteImport
|
preLoaderRoute: typeof AuthedDashboardRouteImport
|
||||||
parentRoute: typeof AuthedRoute
|
parentRoute: typeof AuthedRoute
|
||||||
|
=======
|
||||||
|
'/auth/dashboard': {
|
||||||
|
id: '/auth/dashboard'
|
||||||
|
path: '/auth/dashboard'
|
||||||
|
fullPath: '/auth/dashboard'
|
||||||
|
preLoaderRoute: typeof AuthDashboardRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
|
>>>>>>> main
|
||||||
}
|
}
|
||||||
'/demo/sentry/testing': {
|
'/demo/sentry/testing': {
|
||||||
id: '/demo/sentry/testing'
|
id: '/demo/sentry/testing'
|
||||||
@@ -273,10 +325,15 @@ const AccessRouteWithChildren =
|
|||||||
|
|
||||||
const rootRouteChildren: RootRouteChildren = {
|
const rootRouteChildren: RootRouteChildren = {
|
||||||
IndexRoute: IndexRoute,
|
IndexRoute: IndexRoute,
|
||||||
|
<<<<<<< HEAD
|
||||||
AuthedRoute: AuthedRouteWithChildren,
|
AuthedRoute: AuthedRouteWithChildren,
|
||||||
AccessRoute: AccessRouteWithChildren,
|
AccessRoute: AccessRouteWithChildren,
|
||||||
LoginRoute: LoginRoute,
|
LoginRoute: LoginRoute,
|
||||||
LogoutRoute: LogoutRoute,
|
LogoutRoute: LogoutRoute,
|
||||||
|
=======
|
||||||
|
LoginRouteRoute: LoginRouteRoute,
|
||||||
|
AuthDashboardRoute: AuthDashboardRoute,
|
||||||
|
>>>>>>> main
|
||||||
DemoI18nRoute: DemoI18nRoute,
|
DemoI18nRoute: DemoI18nRoute,
|
||||||
DemoTanstackQueryRoute: DemoTanstackQueryRoute,
|
DemoTanstackQueryRoute: DemoTanstackQueryRoute,
|
||||||
DemoSentryTestingRoute: DemoSentryTestingRoute,
|
DemoSentryTestingRoute: DemoSentryTestingRoute,
|
||||||
|
|||||||
79
src/routes/auth/dashboard.tsx
Normal file
79
src/routes/auth/dashboard.tsx
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
import { Card } from "@heroui/react"
|
||||||
|
import { createFileRoute } from "@tanstack/react-router"
|
||||||
|
import { Drone } from "lucide-react"
|
||||||
|
import { useState } from "react"
|
||||||
|
import {
|
||||||
|
Map as MapComponent,
|
||||||
|
MapMarker,
|
||||||
|
MapViewport,
|
||||||
|
MarkerContent,
|
||||||
|
MarkerPopup,
|
||||||
|
MarkerTooltip
|
||||||
|
} from "@/components/maps/map"
|
||||||
|
|
||||||
|
export const Route = createFileRoute("/auth/dashboard")({
|
||||||
|
component: RouteComponent
|
||||||
|
})
|
||||||
|
|
||||||
|
function RouteComponent() {
|
||||||
|
const locations = [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "Location 1",
|
||||||
|
lat: 40.76,
|
||||||
|
lng: -73.98
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: "Location 2",
|
||||||
|
lat: 40.77,
|
||||||
|
lng: -73.99
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
name: "Location 3",
|
||||||
|
lat: 40.5874827,
|
||||||
|
lng: -1.7925343
|
||||||
|
}
|
||||||
|
]
|
||||||
|
const [viewport, setViewport] = useState<MapViewport>({
|
||||||
|
center: [40.5874827, -1.7925343],
|
||||||
|
zoom: 8,
|
||||||
|
bearing: 0,
|
||||||
|
pitch: 0
|
||||||
|
})
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Card className="h-[800px] p-0 overflow-hidden">
|
||||||
|
<MapComponent
|
||||||
|
center={[40.5874827, -1.7925343]}
|
||||||
|
zoom={10}
|
||||||
|
viewport={viewport}
|
||||||
|
onViewportChange={setViewport}
|
||||||
|
>
|
||||||
|
{locations.map((location) => (
|
||||||
|
<MapMarker
|
||||||
|
key={location.id}
|
||||||
|
longitude={location.lng}
|
||||||
|
latitude={location.lat}
|
||||||
|
>
|
||||||
|
{/* Prueba para ssl */}
|
||||||
|
<MarkerContent>
|
||||||
|
<Drone size={24} color="green" className="text-green-200" />
|
||||||
|
</MarkerContent>
|
||||||
|
<MarkerTooltip>{location.name}</MarkerTooltip>
|
||||||
|
<MarkerPopup>
|
||||||
|
<div className="space-y-1">
|
||||||
|
<p className="font-medium text-foreground">{location.name}</p>
|
||||||
|
<p className="text-xs text-muted-foreground">
|
||||||
|
{location.lat.toFixed(4)}, {location.lng.toFixed(4)}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</MarkerPopup>
|
||||||
|
</MapMarker>
|
||||||
|
))}
|
||||||
|
</MapComponent>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user