feat(admin): art-design-pro integration with local session auth
P1b Task 9: apps/admin based on art-design-pro v3.0.2 (tag, commit d224dd4; source recorded in apps/admin/SOURCE.md), trimmed to layout/login/i18n/request/table-form core. Login wired to real POST /v1/auth/password (single-token session), Bearer header on all requests, 401 interceptor logout+redirect, request-driven sliding renewal (refresh at ~80% TTL, single-flight), best-effort POST /v1/auth/logout on user-menu logout. One protected stub page (相册管理). Dev port 5176 strictPort + /v1 proxy to 8080. Admin keeps its own eslint9 flat config; root eslint ignores apps/admin/**. vitest unit tests for renewal pacing + Playwright e2e (guard redirect, localized wrong-password error, login lands on stub, token persists across reload, logout clears session). Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 相册管理路由(P1b Task 9 唯一受保护业务页——占位 stub)
|
||||
*/
|
||||
import { AppRouteRecord } from '@/types/router'
|
||||
|
||||
export const albumsRoutes: AppRouteRecord = {
|
||||
name: 'Albums',
|
||||
path: '/albums',
|
||||
component: '/index/index',
|
||||
meta: {
|
||||
title: 'menus.albums.title',
|
||||
icon: 'ri:gallery-line'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'manage',
|
||||
name: 'AlbumsManage',
|
||||
component: '/albums/manage',
|
||||
meta: {
|
||||
title: 'menus.albums.manage',
|
||||
icon: 'ri:gallery-upload-line',
|
||||
keepAlive: false,
|
||||
fixedTab: true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { AppRouteRecord } from '@/types/router'
|
||||
import { albumsRoutes } from './albums'
|
||||
|
||||
/**
|
||||
* 导出所有模块化路由
|
||||
* @photo/admin 裁剪:模板演示路由(dashboard/template/widgets/examples/system/
|
||||
* article/result/exception/safeguard/help)已移除,仅保留业务菜单。
|
||||
*/
|
||||
export const routeModules: AppRouteRecord[] = [albumsRoutes]
|
||||
Reference in New Issue
Block a user