feat: 둘러보기(데모)를 실제 화면 그대로 — 데모 모드 + API 더미 응답
- src/demo: demo.on 플래그 + DTO 형태 더미데이터 + mock API(읽기 더미/쓰기 차단) - accountApi: Proxy 로 데모 시 읽기→더미, 쓰기→안내. 실제 뷰 그대로 렌더 - App: authed=인증||데모 → 실제 사이드바/셸 표시 + 데모 배너(로그인/나가기) - 라우터: 데모 허용(가계부/고정/계좌/분류) 외 보호화면은 DemoLockedView(로그인 유도) - 사이드바: 데모 시 잠금(🔒) 배지, 메뉴는 showMenu(인증||데모) - 로그인/로그아웃 시 데모 자동 해제, 랜딩 '둘러보기'→enterDemo - 기존 독립 DemoView 제거 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,12 @@ import { useAuthStore } from '@/stores/auth'
|
||||
import { useUiStore } from '@/stores/ui'
|
||||
import { accountApi } from '@/api/accountApi'
|
||||
import { ID_LOGIN_ENABLED } from '@/config/features'
|
||||
import { enterDemo } from '@/demo'
|
||||
|
||||
function startDemo() {
|
||||
enterDemo()
|
||||
router.push('/account/entries')
|
||||
}
|
||||
|
||||
const auth = useAuthStore()
|
||||
const ui = useUiStore()
|
||||
@@ -299,7 +305,7 @@ onMounted(load)
|
||||
<div class="cta">
|
||||
<button type="button" class="btn primary" @click="ui.openLogin('/account')">로그인</button>
|
||||
<button v-if="ID_LOGIN_ENABLED && ui.signupEnabled" type="button" class="btn" @click="ui.openSignup()">회원가입</button>
|
||||
<button type="button" class="btn" @click="router.push('/demo')">로그인 없이 둘러보기</button>
|
||||
<button type="button" class="btn" @click="startDemo">로그인 없이 둘러보기</button>
|
||||
</div>
|
||||
<p class="cta-note">{{ !ID_LOGIN_ENABLED || ui.signupEnabled ? '로그인하면 나의 가계부 요약을 볼 수 있어요.' : '현재 회원가입이 제한되어 있습니다.' }}</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user