Files
geo/apps/ops-web/src/main.ts
T
root 7d8e82c69f feat(ops): add object storage management and site-mapping CSV import/export
Ship the Ops backstage 对象存储 page (browse / upload / move / delete /
folder ops) backed by a new object-storage service + handler, with the
shared storage client extended with List/Stat/Copy/Usage/DownloadURL so
both MinIO and Aliyun providers cover the new surface. Add
ForcePathStyle to the object-storage config and treat r2/s3/custom_s3
as external providers so Cloudflare R2 and other S3-compatibles can
share the MinIO client path without spinning up the bundled MinIO.

Also add CSV import/export + template download to the site-domain
mappings page, raise gin MaxMultipartMemory to 8 MiB for the new
multipart endpoints, register Ops swagger routes, and extend the
descriptions-parity test to cover the ops router.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 01:19:01 +08:00

117 lines
1.8 KiB
TypeScript

import { QueryClient, VueQueryPlugin } from '@tanstack/vue-query'
import {
Alert,
App as AntApp,
Avatar,
Badge,
Button,
Card,
Checkbox,
ConfigProvider,
DatePicker,
Descriptions,
Drawer,
Dropdown,
Empty,
Form,
Input,
InputNumber,
Layout,
Menu,
Modal,
Pagination,
Popconfirm,
Radio,
Result,
Segmented,
Select,
Skeleton,
Space,
Spin,
Statistic,
Switch,
Table,
Tabs,
Tag,
Tooltip,
Upload,
message,
} from 'ant-design-vue'
import { createApp } from 'vue'
import { registerChunkReloadHandlers } from '@/lib/chunk-reload'
import { bindUnauthorizedHandler } from '@/lib/http'
import { router } from '@/router'
import { useAuthStore } from '@/stores/auth'
import { pinia } from '@/stores/pinia'
import 'ant-design-vue/dist/reset.css'
import App from './App.vue'
import './styles.css'
registerChunkReloadHandlers()
const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 30000,
refetchOnWindowFocus: false,
retry: false,
},
},
})
const app = createApp(App)
message.config({
maxCount: 1,
})
bindUnauthorizedHandler(() => {
const auth = useAuthStore(pinia)
auth.logout()
void router.replace({ name: 'login' })
message.destroy()
message.warning('登录已过期,请重新登录')
})
;[
Alert,
AntApp,
Avatar,
Badge,
Button,
Card,
Checkbox,
ConfigProvider,
DatePicker,
Descriptions,
Drawer,
Dropdown,
Empty,
Form,
Input,
InputNumber,
Layout,
Menu,
Modal,
Pagination,
Popconfirm,
Radio,
Result,
Select,
Segmented,
Skeleton,
Space,
Spin,
Statistic,
Switch,
Table,
Tabs,
Tag,
Tooltip,
Upload,
].forEach((component) => {
app.use(component)
})
app.use(pinia).use(router).use(VueQueryPlugin, { queryClient }).mount('#app')