Initial commit — Stupid Simple Network Inventory
Application web d'inventaire réseau manuel avec FastAPI, Vue 3 et Docker. Inclut l'authentification JWT, la découverte ICMP, et la topologie en cards CSS. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { ref, watch } from 'vue'
|
||||
|
||||
export const theme = ref(localStorage.getItem('theme') || 'light')
|
||||
|
||||
function apply(t) {
|
||||
document.documentElement.classList.toggle('dark', t === 'dark')
|
||||
}
|
||||
|
||||
apply(theme.value)
|
||||
|
||||
watch(theme, (t) => {
|
||||
localStorage.setItem('theme', t)
|
||||
apply(t)
|
||||
})
|
||||
|
||||
export function toggleTheme() {
|
||||
theme.value = theme.value === 'dark' ? 'light' : 'dark'
|
||||
}
|
||||
Reference in New Issue
Block a user