From 9bd10aa996d81df7f5b1588fe2351d53ef72e071 Mon Sep 17 00:00:00 2001 From: Shiina Kin Date: Mon, 28 Oct 2024 19:30:02 +0800 Subject: [PATCH] feat(ui): add LoginView and RegisterView Introduce LoginView.vue to handle user authentication and RegisterView.vue for user registration. These components facilitate user management, enhancing the app's functionality. --- ui/src/locales/zh_cn.yaml | 18 ++++ ui/src/views/auth/LoginView.vue | 141 ++++++++++++++++++++++++++ ui/src/views/auth/RegisterView.vue | 157 +++++++++++++++++++++++++++++ 3 files changed, 316 insertions(+) create mode 100644 ui/src/views/auth/LoginView.vue create mode 100644 ui/src/views/auth/RegisterView.vue diff --git a/ui/src/locales/zh_cn.yaml b/ui/src/locales/zh_cn.yaml index ab085185..c63edafd 100644 --- a/ui/src/locales/zh_cn.yaml +++ b/ui/src/locales/zh_cn.yaml @@ -19,3 +19,21 @@ message: siteInitPasswordRequirements: "密码长度必须在8到32个字符之间。只能为大小写字母、数字和特殊符号的组合,必须有字母和数字。" siteInitEmailPlaceholder: "请输入邮箱" siteInitEmailRequirements: "请输入正确的邮箱地址。" +# loginView + loginTitle: "登录" + loginUsernamePlaceholder: "请输入用户名" + loginUsernameRequirements: "用户名必须是4-20个字符,只能包含字母和数字。" + loginPasswordPlaceholder: "请输入密码" + loginPasswordRequirements: "密码长度必须在8到32个字符之间。只能为大小写字母、数字和特殊符号的组合,必须有字母和数字。" + loginSubmitButton: "登录" + loginSignupButton: "注册" +# registerView + registerTitle: "注册" + registerUsernamePlaceholder: "请输入用户名" + registerUsernameRequirements: "用户名必须是4-20个字符,只能包含字母和数字。" + registerPasswordPlaceholder: "请输入密码" + registerPasswordRequirements: "密码长度必须在8到32个字符之间。只能为大小写字母、数字和特殊符号的组合,必须有字母和数字。" + registerEmailPlaceholder: "请输入邮箱" + registerEmailRequirements: "请输入正确的邮箱地址。" + registerSubmitButton: "注册" + registerLoginButton: "登录" diff --git a/ui/src/views/auth/LoginView.vue b/ui/src/views/auth/LoginView.vue new file mode 100644 index 00000000..db8749ad --- /dev/null +++ b/ui/src/views/auth/LoginView.vue @@ -0,0 +1,141 @@ + + + + + diff --git a/ui/src/views/auth/RegisterView.vue b/ui/src/views/auth/RegisterView.vue new file mode 100644 index 00000000..0c7c9e32 --- /dev/null +++ b/ui/src/views/auth/RegisterView.vue @@ -0,0 +1,157 @@ + + + + +