From c0edf93c8a6fccded1a5e5713d772c41dcd423b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=84=AD=E6=B2=9B=E8=BB=92?= Date: Thu, 18 Sep 2025 02:38:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=99=BB=E5=85=A5?= =?UTF-8?q?=E9=A0=81=E9=9D=A2=E9=96=8B=E7=99=BC=E6=A8=A1=E5=BC=8F=E8=87=AA?= =?UTF-8?q?=E5=8B=95=E5=A1=AB=E5=85=A5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 登入頁面自動填入測試資料 (john@mail.com / 1qaz@WSX) - 只在開發環境生效,生產環境保持原有行為 - 添加開發模式視覺提示 - 註冊頁面保持手動輸入確保流程完整性 提升開發效率,無需每次手動輸入登入資料 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- frontend/app/login/page.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/frontend/app/login/page.tsx b/frontend/app/login/page.tsx index 3be3851..2298004 100644 --- a/frontend/app/login/page.tsx +++ b/frontend/app/login/page.tsx @@ -8,8 +8,12 @@ import { useAuth } from '@/contexts/AuthContext' export default function LoginPage() { const router = useRouter() const { login } = useAuth() - const [email, setEmail] = useState('') - const [password, setPassword] = useState('') + const [email, setEmail] = useState( + process.env.NODE_ENV === 'development' ? 'john@mail.com' : '' + ) + const [password, setPassword] = useState( + process.env.NODE_ENV === 'development' ? '1qaz@WSX' : '' + ) const [rememberMe, setRememberMe] = useState(false) const [loading, setLoading] = useState(false) const [error, setError] = useState('') @@ -44,6 +48,13 @@ export default function LoginPage() {

歡迎回來

登入您的 DramaLing 帳號

+ {process.env.NODE_ENV === 'development' && ( +
+

+ 🚧 開發模式 - 測試資料已自動填入 +

+
+ )}