Files
sb-front/src/components/layout/AppSidebar.vue
T
ByungCheol c9ff605ac9
CI / build (push) Failing after 10m29s
feat: 앱 하단 내비게이션·설정/계정정보·가입정보 변경 + 프론트 테스트·CI 게이트
- 하단 내비게이션(뒤로/앞으로/홈/새로고침/설정), 사이드바 홈 제거
- 설정 화면: 계정정보·앱 버전(package.json)·App Data 삭제
- 가입정보 변경: 비밀번호 재인증 → 이름/이메일 수정
- 로그인 후 대시보드(/) 이동, 로그인 전 햄버거·네이버 로그인 버튼 숨김
- Vitest 도입(32): authApi/accountApi 와이어링, auth/ui 스토어, 로그인 플로우
- CI(.gitea): npm test 게이트 추가

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-06 14:08:01 +09:00

107 lines
3.0 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script setup>
import { RouterLink } from 'vue-router'
import { useAuthStore } from '@/stores/auth'
import { useUiStore } from '@/stores/ui'
import { BOARDS } from '@/constants/boards'
const auth = useAuthStore()
const ui = useUiStore()
</script>
<template>
<aside class="app-sidebar">
<div class="drawer-head">
<span class="drawer-title">메뉴</span>
<button class="drawer-close" type="button" aria-label="닫기" @click="ui.closeSidebar()">×</button>
</div>
<nav class="menu">
<!-- 가계부 영역 (홈은 하단 내비게이션으로 이동) -->
<template v-if="auth.isAuthenticated">
<RouterLink to="/account/entries" class="menu-item">가계부 내역</RouterLink>
<RouterLink to="/account/stats" class="menu-item">통계</RouterLink>
<RouterLink to="/account/recurrings" class="menu-item">고정 지출</RouterLink>
<RouterLink to="/account/wallets" class="menu-item">계좌 관리</RouterLink>
<RouterLink to="/account/categories" class="menu-item">분류 관리</RouterLink>
<RouterLink to="/account/budget" class="menu-item">예산 설정</RouterLink>
<RouterLink to="/account/tags" class="menu-item">태그 관리</RouterLink>
<!-- 게시판 영역 -->
<hr class="menu-divider" />
<RouterLink
v-for="b in BOARDS"
:key="b.key"
:to="`/board/${b.key}`"
class="menu-item"
>{{ b.label }}</RouterLink>
</template>
<!-- 관리자 영역 -->
<template v-if="auth.user?.role === 'ADMIN'">
<hr class="menu-divider" />
<RouterLink to="/users" class="menu-item">회원 관리</RouterLink>
<RouterLink to="/admin/tags" class="menu-item">태그 관리(관리자)</RouterLink>
</template>
</nav>
</aside>
</template>
<style scoped>
.app-sidebar {
background: var(--color-background-soft);
border-right: 1px solid var(--color-border);
padding: 1rem 0;
}
.drawer-head {
display: none;
}
@media (max-width: 768px) {
.app-sidebar {
background: var(--color-background);
min-height: 100%;
}
.drawer-head {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.5rem 1rem 0.75rem;
border-bottom: 1px solid var(--color-border);
margin-bottom: 0.5rem;
}
.drawer-title {
font-weight: 700;
}
.drawer-close {
border: 0;
background: transparent;
color: var(--color-text);
font-size: 1.6rem;
line-height: 1;
cursor: pointer;
}
}
.menu {
display: flex;
flex-direction: column;
}
.menu-item {
padding: 0.7rem 1.5rem;
color: var(--color-text);
font-size: 0.95rem;
}
.menu-divider {
border: 0;
border-top: 1px solid var(--color-border);
margin: 0.5rem 1.5rem;
}
.menu-item:hover {
background: var(--color-background-mute);
}
.menu-item.router-link-exact-active {
color: hsla(160, 100%, 37%, 1);
font-weight: 600;
border-left: 3px solid hsla(160, 100%, 37%, 1);
padding-left: calc(1.5rem - 3px);
background: transparent;
}
</style>