diff --git a/frontent/ops_vue/src/i18n/en.json b/frontent/ops_vue/src/i18n/en.json index 68de8e5..8e56a52 100644 --- a/frontent/ops_vue/src/i18n/en.json +++ b/frontent/ops_vue/src/i18n/en.json @@ -1,17 +1,43 @@ { "appname": { - "home": "Home" + "home": "Home", + "login": "Login", + "forgot_password":"Forgot Password", + "register":"Register" }, "message": { "hello": "Hello", "welcome": "Welcome", "dark_mode":"Enable dark mode", "light_mode":"Enable light mode", - "login_or_register":"Login/Register" + "login_or_register":"Login/Register", + "login_to_your_account":"Login to your account", + "your_email_address":"Your email address", + "email_address":"Email address", + "user_name":"User name", + "your_user_name":"Your user name", + "password":"Password", + "your_password":"Your password", + "i_forgot_password":"I forgot my password", + "remember_me_on_this_device":"Remember me on this device", + "dont_have_account_yet":"Don't have an account yet?", + "register_now":"Register now", + "show_password":"Show password", + "hidden_Password":"Hidden Password", + "please_enter_username_and_password":"Please enter username and password", + "forgot_password":"Forgot Password", + "enter_your_email_to_reset_password":"Enter your email address and your password will be reset and emailed to you.", + "back_to_login":"Back to login", + "please_enter_your_email":"Please enter your email", + "this_not_email":"This is not an email address.", + "create_new_account":"Create new account", + "already_have_an_account":"Already have an account?" }, "button": { "submit": "Submit", - "cancel": "Cancel" + "cancel": "Cancel", + "sign_in":"Sign In", + "send_me_new_password":"Send me new password" }, "footer":{ "doc":"Documentation", diff --git a/frontent/ops_vue/src/i18n/zh-CN.json b/frontent/ops_vue/src/i18n/zh-CN.json index 9f3662e..d87b0f2 100644 --- a/frontent/ops_vue/src/i18n/zh-CN.json +++ b/frontent/ops_vue/src/i18n/zh-CN.json @@ -1,22 +1,48 @@ { "appname": { - "home": "主页" + "home": "主页", + "login": "登录", + "forgot_password": "忘记密码", + "register": "注册" }, "message": { "hello": "你好", "welcome": "欢迎", - "dark_mode":"深色模式", - "light_mode":"亮色模式", - "login_or_register":"登录/注册" + "dark_mode": "深色模式", + "light_mode": "亮色模式", + "login_or_register": "登录/注册", + "login_to_your_account": "登录到您的账户", + "your_email_address": "您的邮箱地址", + "email_address": "邮箱地址", + "user_name": "用户名", + "your_user_name": "您的用户名", + "password": "密码", + "your_password": "您的密码", + "i_forgot_password": "我忘记了密码", + "remember_me_on_this_device": "记住我在这台设备上", + "dont_have_account_yet": "还没有账户?", + "register_now": "立即注册", + "show_password": "显示密码", + "hidden_Password": "隐藏密码", + "please_enter_username_and_password": "请输入用户名和密码", + "forgot_password": "忘记密码", + "enter_your_email_to_reset_password": "输入您的邮箱地址,您的密码将被重置并通过邮件发送给您。", + "back_to_login": "返回登录", + "please_enter_your_email": "请输入您的邮箱", + "this_not_email": "这不是一个有效的邮箱地址。", + "create_new_account":"创建新账户", + "already_have_an_account":"已经有账户了?" }, "button": { "submit": "提交", - "cancel": "取消" + "cancel": "取消", + "sign_in": "登录", + "send_me_new_password": "发送新密码" }, - "footer":{ - "doc":"文档", - "license":"协议", - "source_code":"源码", - "copy":"版权 © 2025 Operations. 保留所有权利。" + "footer": { + "doc": "文档", + "license": "协议", + "source_code": "源码", + "copy": "版权 © 2025 Operations. 保留所有权利。" } } diff --git a/frontent/ops_vue/src/router/index.ts b/frontent/ops_vue/src/router/index.ts index aa2fa28..11d8ff0 100644 --- a/frontent/ops_vue/src/router/index.ts +++ b/frontent/ops_vue/src/router/index.ts @@ -20,11 +20,18 @@ const router = createRouter({ { path: '/login', name: 'login', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. component: () => import('../views/loginView.vue'), }, + { + path: '/forgot_password', + name: 'forgot password', + component: () => import('../views/forgotPassword.vue'), + }, + { + path: '/register', + name: 'Register', + component: () => import('../views/registerView.vue'), + }, ], }) diff --git a/frontent/ops_vue/src/views/HomeView.vue b/frontent/ops_vue/src/views/HomeView.vue index b0b1753..fdf1514 100644 --- a/frontent/ops_vue/src/views/HomeView.vue +++ b/frontent/ops_vue/src/views/HomeView.vue @@ -6,6 +6,7 @@ onMounted(() => { // 可以在这里调用mos.value的方法 //console.log('HomeView mounted', mos); + document.title = 'Operations.'; }); function c(){ diff --git a/frontent/ops_vue/src/views/forgotPassword.vue b/frontent/ops_vue/src/views/forgotPassword.vue new file mode 100644 index 0000000..5146272 --- /dev/null +++ b/frontent/ops_vue/src/views/forgotPassword.vue @@ -0,0 +1,97 @@ + + + + + + + + + + + {{ t('message.forgot_password') }} + + {{ t('message.enter_your_email_to_reset_password') }} + + + {{ t('message.email_address') }} + + + + + + + {{ t('message.back_to_login') }} + + + + diff --git a/frontent/ops_vue/src/views/loginView.vue b/frontent/ops_vue/src/views/loginView.vue index f0cb737..941e9c4 100644 --- a/frontent/ops_vue/src/views/loginView.vue +++ b/frontent/ops_vue/src/views/loginView.vue @@ -1,70 +1,181 @@ + + - - - - - - - - Login to your account - - - Email address - - - - - Password - - I forgot password - - - - - - - - - - - - - - - Remember me on this device - - - + + + + + + + {{ t('message.login_to_your_account') }} + + {{ t('message.user_name') }} + - or - - - - - - Login with Github - - - - - Login with Twitter - + + + {{ t('message.password') }} + + {{ + t('message.i_forgot_password') + }} + + + + + + + + + + + + + + + + + + + + - - - Don't have account yet? Sign up + + + + {{ + t('message.remember_me_on_this_device') + }} + + + + + {{ t('message.dont_have_account_yet') }} + {{ t('message.register_now') }} + - - - + + + + + + diff --git a/frontent/ops_vue/src/views/registerView.vue b/frontent/ops_vue/src/views/registerView.vue new file mode 100644 index 0000000..c2b3cdf --- /dev/null +++ b/frontent/ops_vue/src/views/registerView.vue @@ -0,0 +1,184 @@ + + + + + + + + + + + + + {{ t('message.create_new_account') }} + + {{ t('message.user_name') }} + + + + {{ t('message.email_address') }} + + + + {{ t('message.password') }} + + + + + + + + + + + + + + + + + + + + + + + + + + {{ t('message.already_have_an_account') }} + {{ t('message.back_to_login') }} + + + + +
+ {{ t('message.enter_your_email_to_reset_password') }} +