feat(frontend): add dark/light theme toggle with system detection

- Add ThemeToggle component (Auto / Dark / Light) to all views
- Store preference per browser and detect system preference live
  via prefers-color-scheme
- Apply theme before first render in index.html to prevent flash
- Extend CSS with light theme variables and refactor glass styles
This commit is contained in:
Tronax 2026-08-25 18:59:12 +02:00
parent cb30223fd4
commit f220d96e3b
Signed by: Tronax
SSH key fingerprint: SHA256:2pKKXDZucWvaF/GzXNz0FY53EAO1YDLN80bqS+TTz/o
11 changed files with 217 additions and 26 deletions

View file

@ -4,6 +4,7 @@ import { useRoute, useRouter } from 'vue-router'
import { useAuth } from '../stores/auth'
import { useToast } from '../stores/toast'
import LogoMark from '../components/LogoMark.vue'
import ThemeToggle from '../components/ThemeToggle.vue'
import ShareLinkCard from '../components/ShareLinkCard.vue'
import SectionConnections from '../components/SectionConnections.vue'
import SectionRequests from '../components/SectionRequests.vue'
@ -62,6 +63,7 @@ function logout() {
</div>
<div class="row">
<span class="muted small hide-sm">{{ auth.user.email }}</span>
<ThemeToggle />
<button class="btn btn-sm" @click="logout">Abmelden</button>
</div>
</header>
@ -142,7 +144,7 @@ function logout() {
transition: transform 0.15s ease, border-color 0.15s ease;
cursor: pointer;
}
.tile:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.24); }
.tile:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.tile-icon { font-size: 26px; }
.privacy { padding: 20px 24px; }
@media (max-width: 520px) { .hide-sm { display: none; } }