From 8254460751a075264c8bd3ddf54d636ff41ddf13 Mon Sep 17 00:00:00 2001 From: ByungCheol Date: Sat, 27 Jun 2026 19:41:04 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EA=B5=AC=EA=B8=80=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8=20=EC=A0=84=EC=9A=A9=20=E2=80=94=20=EC=95=84=EC=9D=B4?= =?UTF-8?q?=EB=94=94=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=ED=8F=BC=C2=B7?= =?UTF-8?q?=ED=9A=8C=EC=9B=90=EA=B0=80=EC=9E=85=20UI=20=EC=88=A8=EA=B9=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - src/config/features.js ID_LOGIN_ENABLED 플래그(기본 false)로 게이트 - LoginModal: 아이디/비번 폼·'또는' 구분선·회원가입 링크 숨김(구글 버튼만) - HomeView: 랜딩 회원가입 버튼 숨김, 안내문구 정리 - 백엔드 /api/auth/login·signup 은 비상용으로 유지(플래그 true 로 복구 가능) - LoginModal.spec: 아이디 로그인 플로우는 플래그 mock 으로 계속 검증 Co-Authored-By: Claude Opus 4.8 --- src/components/LoginModal.spec.js | 4 ++++ src/components/LoginModal.vue | 7 ++++--- src/config/features.js | 5 +++++ src/views/HomeView.vue | 5 +++-- 4 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 src/config/features.js diff --git a/src/components/LoginModal.spec.js b/src/components/LoginModal.spec.js index 9f08ee1..fc966f8 100644 --- a/src/components/LoginModal.spec.js +++ b/src/components/LoginModal.spec.js @@ -6,10 +6,14 @@ import { setActivePinia, createPinia } from 'pinia' const { pushMock } = vi.hoisted(() => ({ pushMock: vi.fn() })) vi.mock('vue-router', () => ({ useRouter: () => ({ push: pushMock }) })) +// 아이디 로그인 플로우 검증용 — 운영에선 숨김(ID_LOGIN_ENABLED=false)이지만 로직은 유지되므로 켜서 테스트 +vi.mock('@/config/features', () => ({ ID_LOGIN_ENABLED: true })) + vi.mock('@/api/authApi', () => ({ authApi: { login: vi.fn(), signupEnabled: vi.fn(() => Promise.resolve({ enabled: true })), + googleClientId: vi.fn(() => Promise.resolve({ clientId: '' })), }, })) diff --git a/src/components/LoginModal.vue b/src/components/LoginModal.vue index a96d408..c1f6a3f 100644 --- a/src/components/LoginModal.vue +++ b/src/components/LoginModal.vue @@ -5,6 +5,7 @@ import { useAuthStore } from '@/stores/auth' import { useUiStore } from '@/stores/ui' import { authApi } from '@/api/authApi' import { isNativeGoogle, nativeGoogleIdToken } from '@/native/googleAuth' +import { ID_LOGIN_ENABLED } from '@/config/features' const auth = useAuthStore() const ui = useUiStore() @@ -173,7 +174,7 @@ onUnmounted(() => window.removeEventListener('keydown', onKeydown))

로그인

-
+