refactor(ui): restyle dashboard as animal island

This commit is contained in:
chick
2026-07-07 22:32:20 +08:00
parent 143ab369c9
commit 182bd19c95
4 changed files with 100 additions and 91 deletions
+4 -4
View File
@@ -227,7 +227,7 @@ function renderEndpointList() {
}
function switchView(view) {
$$('.rail-btn[data-view]').forEach(btn => btn.classList.toggle('active', btn.dataset.view === view))
$$('.phone-app[data-view]').forEach(btn => btn.classList.toggle('active', btn.dataset.view === view))
$$('.view').forEach(panel => panel.classList.toggle('active', panel.id === `${view}View`))
localStorage.setItem('multi-simadmin-view', view)
}
@@ -347,10 +347,10 @@ function bindEvents() {
document.body.classList.toggle('compact')
localStorage.setItem('multi-simadmin-density', document.body.classList.contains('compact') ? 'compact' : 'normal')
})
$$('.rail-btn[data-view]').forEach(btn => btn.addEventListener('click', () => switchView(btn.dataset.view)))
$$('#statusFilters .chip').forEach(btn => btn.addEventListener('click', () => {
$$('.phone-app[data-view]').forEach(btn => btn.addEventListener('click', () => switchView(btn.dataset.view)))
$$('#statusFilters .tab-leaf').forEach(btn => btn.addEventListener('click', () => {
activeFilter = btn.dataset.filter
$$('#statusFilters .chip').forEach(x => x.classList.toggle('active', x === btn))
$$('#statusFilters .tab-leaf').forEach(x => x.classList.toggle('active', x === btn))
renderInstances()
}))
$('loginForm').addEventListener('submit', async (event) => {