fix: CSS variables neu-*, WebSocket token, thème initial
- CSS: remplace var(--bg-*)/var(--text-*)/var(--accent-*)/var(--color-*)
par les vraies variables --neu-* (neu-bg, neu-surface, neu-text, neu-primary…)
- CSS: supprime body{overflow:hidden} qui bloquait le scroll
- CSS: .auth-layout déplacé dans neu.css pour login/install
- WS: ajoute ?token= aux connexions /ws/proxmox (dashboardPage + proxmoxPage)
- HTML: script inline pour appliquer data-theme avant Alpine (évite FOUC)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2098c80ec1
commit
562eff8863
10 changed files with 142 additions and 133 deletions
|
|
@ -314,7 +314,8 @@ document.addEventListener('alpine:init', () => {
|
|||
|
||||
connectWS() {
|
||||
const proto = location.protocol === 'https:' ? 'wss' : 'ws'
|
||||
this.ws = new WebSocket(`${proto}://${location.host}/ws/proxmox`)
|
||||
const token = encodeURIComponent(localStorage.getItem('pxp_token') || '')
|
||||
this.ws = new WebSocket(`${proto}://${location.host}/ws/proxmox?token=${token}`)
|
||||
this.ws.onmessage = (e) => {
|
||||
const msg = JSON.parse(e.data)
|
||||
if (msg.type === 'proxmox_resources') {
|
||||
|
|
@ -349,7 +350,8 @@ document.addEventListener('alpine:init', () => {
|
|||
|
||||
connectWS() {
|
||||
const proto = location.protocol === 'https:' ? 'wss' : 'ws'
|
||||
this.ws = new WebSocket(`${proto}://${location.host}/ws/proxmox`)
|
||||
const token = encodeURIComponent(localStorage.getItem('pxp_token') || '')
|
||||
this.ws = new WebSocket(`${proto}://${location.host}/ws/proxmox?token=${token}`)
|
||||
this.ws.onmessage = (e) => {
|
||||
const msg = JSON.parse(e.data)
|
||||
if (msg.type === 'proxmox_resources') {
|
||||
|
|
@ -377,9 +379,9 @@ document.addEventListener('alpine:init', () => {
|
|||
},
|
||||
|
||||
cpuColor(pct) {
|
||||
if (pct > 80) return 'var(--color-error)'
|
||||
if (pct > 50) return 'var(--color-warning)'
|
||||
return 'var(--color-success)'
|
||||
if (pct > 80) return 'var(--neu-danger)'
|
||||
if (pct > 50) return 'var(--neu-warning)'
|
||||
return 'var(--neu-success)'
|
||||
},
|
||||
|
||||
formatMem(bytes) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue