a6cc190751
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>
48 lines
1.2 KiB
HTML
48 lines
1.2 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<title>Photo Live Admin</title>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<meta
|
|
name="description"
|
|
content="Art Design Pro - A modern admin dashboard template built with Vue 3, TypeScript, and Element Plus."
|
|
/>
|
|
<link rel="shortcut icon" type="image/x-icon" href="src/assets/images/favicon.ico" />
|
|
|
|
<style>
|
|
/* 防止页面刷新时白屏的初始样式 */
|
|
html {
|
|
background-color: #fafbfc;
|
|
}
|
|
|
|
html.dark {
|
|
background-color: #070707;
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
// 初始化 html class 主题属性
|
|
;(function () {
|
|
try {
|
|
if (typeof Storage === 'undefined' || !window.localStorage) {
|
|
return
|
|
}
|
|
|
|
const themeType = localStorage.getItem('sys-theme')
|
|
if (themeType === 'dark') {
|
|
document.documentElement.classList.add('dark')
|
|
}
|
|
} catch (e) {
|
|
console.warn('Failed to apply initial theme:', e)
|
|
}
|
|
})()
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="app"></div>
|
|
<script type="module" src="/src/main.ts"></script>
|
|
</body>
|
|
</html>
|