feat: 사이드바 브랜드/헤더 타이틀 + 라이트·다크 테마 설정

1) 사이드바 상단에 돼지 로고 + '돈돼지 가계부'('메뉴' 텍스트 대체, 데스크톱/모바일 공통)
2) 헤더에서 돼지 로고 제거 → 현재 화면 타이틀 표시(라우트별)
3) 설정에 화면 테마(시스템/라이트/다크) 선택 추가
   - base.css: data-theme 기반 수동 다크 + 시스템 설정 폴백
   - theme.js 유틸 + ui 스토어 theme 상태, main.js 시작 시 적용(깜빡임 방지)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ByungCheol
2026-06-27 22:15:27 +09:00
parent 63b4792e58
commit 75228cbb64
7 changed files with 187 additions and 42 deletions
+9
View File
@@ -1,6 +1,7 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
import { authApi } from '@/api/authApi'
import { getStoredTheme, setTheme as persistTheme } from '@/theme'
// 전역 UI 상태 (로그인/회원가입 레이어 팝업 등)
export const useUiStore = defineStore('ui', () => {
@@ -28,6 +29,13 @@ export const useUiStore = defineStore('ui', () => {
sidebarOpen.value = false
}
// 테마 (system | light | dark)
const theme = ref(getStoredTheme())
function setTheme(t) {
theme.value = t
persistTheme(t)
}
// 비밀번호 변경 모달
const passwordOpen = ref(false)
function openPassword() {
@@ -63,5 +71,6 @@ export const useUiStore = defineStore('ui', () => {
signupEnabled, loadSignupEnabled,
sidebarOpen, toggleSidebar, closeSidebar,
passwordOpen, openPassword, closePassword,
theme, setTheme,
}
})