feat: scaffold infrastructure - router, pinia, tailwind, amap, auth store, page placeholders

This commit is contained in:
2026-05-20 23:31:55 +08:00
parent eb183448b4
commit c49ac7a42e
29 changed files with 1624 additions and 432 deletions
+68
View File
@@ -0,0 +1,68 @@
declare namespace AMap {
class Map {
constructor(container: string | HTMLElement, opts?: Record<string, unknown>)
addControl(control: unknown): void
add(layer: unknown): void
remove(layer: unknown): void
destroy(): void
setCenter(center: [number, number]): void
setZoom(zoom: number): void
on(event: string, callback: (...args: unknown[]) => void): void
off(event: string, callback: (...args: unknown[]) => void): void
getCenter(): { lng: number; lat: number }
getZoom(): number
}
class Marker {
constructor(opts?: Record<string, unknown>)
on(event: string, callback: (...args: unknown[]) => void): void
setPosition(position: [number, number]): void
}
class InfoWindow {
constructor(opts?: Record<string, unknown>)
open(map: Map, position: [number, number]): void
close(): void
}
class Scale {}
class ToolBar {
constructor(opts?: Record<string, unknown>)
}
class ControlBar {
constructor(opts?: Record<string, unknown>)
}
class Geolocation {
constructor(opts?: Record<string, unknown>)
getCurrentPosition(
onSuccess: (data: { position: { lng: number; lat: number } }) => void,
onError?: (error: unknown) => void,
): void
}
class TileLayer {
static Satellite: new () => unknown
static RoadNet: new () => unknown
}
class Pixel {
constructor(x: number, y: number)
}
class MarkerCluster {
constructor(map: Map, markers: Marker[], opts?: Record<string, unknown>)
}
}
declare function AMapLoader_load(opts: {
key: string
version: string
plugins?: string[]
}): Promise<typeof AMap>
declare module '@amap/amap-jsapi-loader' {
const AMapLoader: {
load: typeof AMapLoader_load
}
export default AMapLoader
}
+52
View File
@@ -0,0 +1,52 @@
export interface CloudType {
id: number
name: string
name_en: string
genus: string
rarity: 'common' | 'uncommon' | 'rare'
description: string | null
icon_url: string | null
created_at: string
}
export interface Cloud {
id: string
user_id: string
cloud_type_id: number
image_url: string
thumbnail_url: string | null
latitude: number | null
longitude: number | null
location_name: string | null
weather: string | null
status: 'pending' | 'approved' | 'rejected'
is_hidden: boolean
created_at: string
cloud_types?: CloudType
profiles?: Profile
}
export interface Profile {
id: string
username: string
avatar_url: string | null
role: 'user' | 'admin'
is_disabled: boolean
created_at: string
}
export interface UserCollection {
id: string
user_id: string
cloud_type_id: number
first_cloud_id: string | null
unlocked_at: string
}
export interface Reaction {
id: string
user_id: string
cloud_id: string
emoji: string
created_at: string
}