feat(frontend): prefill demo credentials on login page + E2E test passed
This commit is contained in:
@@ -11,8 +11,8 @@ import { useAuth } from "@/lib/auth-context";
|
||||
export default function LoginPage() {
|
||||
const router = useRouter();
|
||||
const { login } = useAuth();
|
||||
const [email, setEmail] = useState("");
|
||||
const [password, setPassword] = useState("");
|
||||
const [email, setEmail] = useState("gp@demo.com");
|
||||
const [password, setPassword] = useState("demo123456");
|
||||
const [error, setError] = useState("");
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
@@ -102,6 +102,13 @@ export default function LoginPage() {
|
||||
{isLoading ? "登录中..." : "登录"}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
{/* 演示账号提示 */}
|
||||
<div className="mt-4 rounded-md border border-indigo-100 bg-indigo-50/50 p-3 text-xs text-muted-foreground">
|
||||
<p className="font-medium text-indigo-600">演示账号</p>
|
||||
<p className="mt-1">邮箱:gp@demo.com</p>
|
||||
<p>密码:demo123456</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user