mirror of
https://gitcode.com/JianFeeeee/webui4frpc.git
synced 2026-09-24 10:57:57 +00:00
- Cluster: forwardToNext offline detection (leader+non-leader), WatchLeader 1s heartbeat fallback, 409 for standalone nodes, Node.NodeKey key exchange via token ring, ClusterPeers persistence + auto-rejoin, Forward delegates to forwardToNext (bugfix) - Auth: Basic Auth (flag-creds fast path) + bcrypt users (admin/viewer) + Bearer API keys (read/write/admin scope) - Frontend: UsersView (accounts+API keys), ClusterView (ring/nodeKey/tasks/topology/log), StatusView (group management, per-proxy status), CanvasView (edge toggle/group), PortEdge (disabled/group labels) - API: handlers split (canvas/forwards/users/logs), canvas export/import, forwards group start/stop/assign/delete, cluster endpoints - Docs: comprehensive README rewrite (all flags/APIs/auth/cluster), docs/cluster-api.md (cluster management API reference) - Deploy: run-cluster.sh now 4-node ring + 1 isolated standalone, test-forward.sh updated for 4 nodes - Removed plan.md (design notes consolidated into README + API docs)
28 lines
956 B
TypeScript
28 lines
956 B
TypeScript
import { createApp } from 'vue'
|
|
import { createPinia } from 'pinia'
|
|
import ElementPlus from 'element-plus'
|
|
import 'element-plus/dist/index.css'
|
|
// Imported AFTER element-plus css so our :root token overrides
|
|
// (--el-color-primary, radii, font, ...) win the cascade at equal specificity.
|
|
import './styles/theme.css'
|
|
import App from './App.vue'
|
|
|
|
// Apply the saved theme BEFORE mount so the first paint already uses the
|
|
// correct palette (no white→pink/blue flash). :root is the white default, so
|
|
// only blue/pink need an explicit data-theme attribute.
|
|
(function applyThemeEarly() {
|
|
try {
|
|
const saved = localStorage.getItem('w4f-theme')
|
|
if (saved === 'blue' || saved === 'pink') {
|
|
document.documentElement.setAttribute('data-theme', saved)
|
|
}
|
|
} catch {
|
|
/* localStorage unavailable (private mode) — stay on the white default */
|
|
}
|
|
})()
|
|
|
|
const app = createApp(App)
|
|
app.use(createPinia())
|
|
app.use(ElementPlus)
|
|
app.mount('#app')
|