diff --git a/ui/console-src/layouts/BasicLayout.vue b/ui/console-src/layouts/BasicLayout.vue index 1e6ffcbf6..fa0f29e35 100644 --- a/ui/console-src/layouts/BasicLayout.vue +++ b/ui/console-src/layouts/BasicLayout.vue @@ -1,6 +1,5 @@ - diff --git a/ui/console-src/views/system/Login.vue b/ui/console-src/views/system/Login.vue deleted file mode 100644 index 76d70bacc..000000000 --- a/ui/console-src/views/system/Login.vue +++ /dev/null @@ -1,85 +0,0 @@ - - diff --git a/ui/console-src/views/system/Redirect.vue b/ui/console-src/views/system/Redirect.vue deleted file mode 100644 index 639a4ff69..000000000 --- a/ui/console-src/views/system/Redirect.vue +++ /dev/null @@ -1,41 +0,0 @@ - - diff --git a/ui/console-src/views/system/ResetPassword.vue b/ui/console-src/views/system/ResetPassword.vue deleted file mode 100644 index 348612780..000000000 --- a/ui/console-src/views/system/ResetPassword.vue +++ /dev/null @@ -1,81 +0,0 @@ - - - diff --git a/ui/src/components/login/LoginForm.vue b/ui/src/components/login/LoginForm.vue deleted file mode 100644 index 3e0e0d421..000000000 --- a/ui/src/components/login/LoginForm.vue +++ /dev/null @@ -1,188 +0,0 @@ - - - diff --git a/ui/src/components/login/LoginModal.vue b/ui/src/components/login/LoginModal.vue deleted file mode 100644 index 8e8b8195e..000000000 --- a/ui/src/components/login/LoginModal.vue +++ /dev/null @@ -1,37 +0,0 @@ - - - diff --git a/ui/src/components/login/MfaForm.vue b/ui/src/components/login/MfaForm.vue deleted file mode 100644 index fae66a66c..000000000 --- a/ui/src/components/login/MfaForm.vue +++ /dev/null @@ -1,93 +0,0 @@ - - - diff --git a/ui/src/components/login/SocialAuthProviderItem.vue b/ui/src/components/login/SocialAuthProviderItem.vue deleted file mode 100644 index 3306f53be..000000000 --- a/ui/src/components/login/SocialAuthProviderItem.vue +++ /dev/null @@ -1,81 +0,0 @@ - - - diff --git a/ui/src/components/login/SocialAuthProviders.vue b/ui/src/components/login/SocialAuthProviders.vue deleted file mode 100644 index bc7b275c1..000000000 --- a/ui/src/components/login/SocialAuthProviders.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - diff --git a/ui/src/components/signup/SignupForm.vue b/ui/src/components/signup/SignupForm.vue deleted file mode 100644 index 22faad4b9..000000000 --- a/ui/src/components/signup/SignupForm.vue +++ /dev/null @@ -1,260 +0,0 @@ - - - diff --git a/ui/src/layouts/GatewayLayout.vue b/ui/src/layouts/GatewayLayout.vue deleted file mode 100644 index 13a638b8f..000000000 --- a/ui/src/layouts/GatewayLayout.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - diff --git a/ui/src/locales/en.yaml b/ui/src/locales/en.yaml index 704f96729..b56a699ba 100644 --- a/ui/src/locales/en.yaml +++ b/ui/src/locales/en.yaml @@ -1,78 +1,4 @@ core: - login: - title: Login - fields: - username: - placeholder: Username - password: - placeholder: Password - remember_me: - label: Remember Me - operations: - submit: - toast_success: Login successful - toast_failed: Login failed, incorrect username or password - toast_csrf: CSRF Token expired, please try again - signup: - label: No account - button: Sign up - return_login: - label: Already have an account - button: Sign in - return_site: Return to site - reset_password: - button: Retrieve password - button: Login - modal: - title: Re-login - 2fa: - fields: - code: - placeholder: Two-step verification code - label: Two-step verification code - signup: - title: Sign up - fields: - username: - placeholder: Username - display_name: - placeholder: Display name - email: - placeholder: Email - matchFailed: The email format is wrong or the service provider is not supported. - verify_code: - placeholder: Verification code - operations: - send_code: - buttons: - sending: sending - send: Send Code - countdown: resend after {timer} seconds - toast_success: verification code sent - toast_email_empty: please enter your email address - password: - placeholder: Password - password_confirm: - placeholder: Confirm password - operations: - submit: - button: Sign up - toast_success: Sign up successfully - binding: - title: Account binding - common: - toast: - mounted: >- - The current login method is not bound to an account, Please bind or - sign up a new account first - operations: - login_and_bind: - button: Login and Bind - signup_and_bind: - button: Signup and Bind - bind: - toast_success: Binding successfully - toast_failed: Binding failed, no enabled login method found sidebar: search: placeholder: Search @@ -1657,8 +1583,6 @@ core: page_label: page size_label: items per page total_label: Total {total} items - social_auth_providers: - title: Third-party login app_download_alert: description: >- Themes and plugins for Halo can be downloaded at the following @@ -1871,32 +1795,6 @@ core: setting_modal: title: Post settings title: My posts - uc_reset_password: - fields: - username: - label: username - password: - label: New Password - password_confirm: - label: Confirm Password - operations: - reset: - button: Reset Password - toast_success: Reset successful - title: Reset password - reset_password: - fields: - username: - label: Username - email: - label: email address - operations: - send: - label: Send verification email - toast_success: >- - If your username and email address match, we will send an email to - your email address. - title: Reset password tool: title: Tools empty: diff --git a/ui/src/locales/es.yaml b/ui/src/locales/es.yaml index 8107439eb..b74a7dce1 100644 --- a/ui/src/locales/es.yaml +++ b/ui/src/locales/es.yaml @@ -1,60 +1,4 @@ core: - login: - title: Inicio de sesión - fields: - username: - placeholder: Usuario - password: - placeholder: Contraseña - operations: - submit: - toast_success: Inicio de sesión exitoso - toast_failed: >- - Error en el inicio de sesión, nombre de usuario o contraseña - incorrectos - toast_csrf: Token CSRF no válido, por favor inténtalo de nuevo - signup: - label: No tienes una cuenta - button: Registrarse ahora - return_login: - label: Ya tienes una cuenta - button: Iniciar sesión ahora - return_site: Volver a la página de inicio - button: Iniciar sesión - modal: - title: Volver a iniciar sesión - signup: - title: Registrarse - fields: - username: - placeholder: Nombre de usuario - display_name: - placeholder: Nombre para mostrar - password: - placeholder: Contraseña - password_confirm: - placeholder: Confirmar contraseña - operations: - submit: - button: Registrarse - toast_success: Registrado exitosamente - binding: - title: Vinculación de cuentas - common: - toast: - mounted: >- - El método de inicio de sesión actual no está vinculado a una cuenta. - Por favor, vincula o registra una nueva cuenta primero. - operations: - login_and_bind: - button: Iniciar sesión y vincular - signup_and_bind: - button: Registrarse y vincular - bind: - toast_success: Vinculación exitosa - toast_failed: >- - Vinculación fallida, no se encontró ningún método de inicio de sesión - habilitado. sidebar: search: placeholder: Buscar @@ -1285,8 +1229,6 @@ core: page_label: página size_label: elementos por página total_label: Total de {total} elementos - social_auth_providers: - title: Inicio de sesión de terceros app_download_alert: description: >- Los temas y complementos para Halo se pueden descargar en las siguientes diff --git a/ui/src/locales/zh-CN.yaml b/ui/src/locales/zh-CN.yaml index 388d34aea..ab84cece9 100644 --- a/ui/src/locales/zh-CN.yaml +++ b/ui/src/locales/zh-CN.yaml @@ -1,76 +1,4 @@ core: - login: - title: 登录 - fields: - username: - placeholder: 用户名 - password: - placeholder: 密码 - remember_me: - label: 保持登录会话 - operations: - submit: - toast_success: 登录成功 - toast_failed: 登录失败,用户名或密码错误 - toast_csrf: CSRF Token 失效,请重新尝试 - signup: - label: 没有账号 - button: 立即注册 - return_login: - label: 已有账号 - button: 立即登录 - return_site: 返回到首页 - reset_password: - button: 找回密码 - button: 登录 - modal: - title: 重新登录 - 2fa: - fields: - code: - placeholder: 请输入两步验证码 - label: 两步验证码 - signup: - title: 注册 - fields: - username: - placeholder: 用户名 - display_name: - placeholder: 名称 - email: - placeholder: 电子邮箱 - matchFailed: 邮箱格式错误或服务商不受支持 - verify_code: - placeholder: 验证码 - operations: - send_code: - buttons: - sending: 发送中 - send: 发送验证码 - countdown: "{timer} 秒后重发" - toast_success: 验证码已发送 - toast_email_empty: 请输入电子邮箱 - password: - placeholder: 密码 - password_confirm: - placeholder: 确认密码 - operations: - submit: - button: 注册 - toast_success: 注册成功 - binding: - title: 账号绑定 - common: - toast: - mounted: 当前登录方式未绑定账号,请先绑定或注册新账号 - operations: - login_and_bind: - button: 登录并绑定 - signup_and_bind: - button: 注册并绑定 - bind: - toast_success: 绑定成功 - toast_failed: 绑定失败,没有找到已启用的登录方式 sidebar: search: placeholder: 搜索 @@ -1413,30 +1341,6 @@ core: label: 密码 confirm_password: label: 确认密码 - reset_password: - title: 重置密码 - fields: - username: - label: 用户名 - email: - label: 邮箱地址 - operations: - send: - label: 发送验证邮件 - toast_success: 如果你的用户名和邮箱地址匹配,我们将会发送一封邮件到你的邮箱。 - uc_reset_password: - title: 重置密码 - fields: - username: - label: 用户名 - password: - label: 新密码 - password_confirm: - label: 确认密码 - operations: - reset: - button: 重置密码 - toast_success: 重置成功 rbac: Attachments Management: 附件 Attachment Manage: 附件管理 @@ -1575,8 +1479,6 @@ core: page_label: 页 size_label: 条 / 页 total_label: 共 {total} 项数据 - social_auth_providers: - title: 三方登录 app_download_alert: description: Halo 的主题和插件可以在以下地址下载: sources: diff --git a/ui/src/locales/zh-TW.yaml b/ui/src/locales/zh-TW.yaml index 76bbcfaa1..45b8cafa9 100644 --- a/ui/src/locales/zh-TW.yaml +++ b/ui/src/locales/zh-TW.yaml @@ -1,76 +1,4 @@ core: - login: - title: 登入 - fields: - username: - placeholder: 用戶名 - password: - placeholder: 密碼 - remember_me: - label: 保持登入會話 - operations: - submit: - toast_success: 登入成功 - toast_failed: 登入失敗,用戶名或密碼錯誤 - toast_csrf: CSRF Token 失效,請重新嘗試 - signup: - label: 沒有帳號 - button: 立即註冊 - return_login: - label: 已有帳號 - button: 立即登入 - return_site: 返回到首頁 - reset_password: - button: 找回密碼 - button: 登入 - modal: - title: 重新登入 - 2fa: - fields: - code: - placeholder: 請輸入兩步驟驗證碼 - label: 兩步驟驗證碼 - signup: - title: 註冊 - fields: - username: - placeholder: 用戶名 - display_name: - placeholder: 名稱 - email: - placeholder: 電子郵箱 - matchFailed: 郵箱格式錯誤或服務商不受支援 - verify_code: - placeholder: 驗證碼 - operations: - send_code: - buttons: - countdown: "{timer} 秒後重發" - send: 發送驗證碼 - sending: 發送中 - toast_email_empty: 請輸入電子郵件信箱 - toast_success: 驗證碼已發送 - password: - placeholder: 密碼 - password_confirm: - placeholder: 確認密碼 - operations: - submit: - button: 註冊 - toast_success: 註冊成功 - binding: - title: 帳號綁定 - common: - toast: - mounted: 當前登入方式未綁定帳號,請先綁定或註冊新帳號 - operations: - login_and_bind: - button: 登入並綁定 - signup_and_bind: - button: 註冊並綁定 - bind: - toast_success: 綁定成功 - toast_failed: 綁定失敗,沒有找到已啟用的登入方式 sidebar: search: placeholder: 搜尋 @@ -1530,8 +1458,6 @@ core: page_label: 頁 size_label: 條 / 頁 total_label: 共 {total} 項資料 - social_auth_providers: - title: 三方登入 app_download_alert: description: Halo 的主題和插件可以在以下地址下載: sources: @@ -1735,30 +1661,6 @@ core: setting_modal: title: 文章設定 title: 我的文章 - uc_reset_password: - fields: - username: - label: 用戶名 - password: - label: 新密碼 - password_confirm: - label: 確認密碼 - operations: - reset: - button: 重設密碼 - toast_success: 重置成功 - title: 重設密碼 - reset_password: - fields: - username: - label: 使用者名稱 - email: - label: 郵件地址 - operations: - send: - label: 發送驗證郵件 - toast_success: 如果你的用戶名和郵箱地址匹配,我們將會發送一封郵件到你的郵箱。 - title: 重設密碼 tool: title: 工具 empty: diff --git a/ui/src/setup/setupApiClient.ts b/ui/src/setup/setupApiClient.ts index fdfd907da..b4525e8cb 100644 --- a/ui/src/setup/setupApiClient.ts +++ b/ui/src/setup/setupApiClient.ts @@ -1,5 +1,4 @@ import { i18n } from "@/locales"; -import { useUserStore } from "@/stores/user"; import { axiosInstance } from "@halo-dev/api-client"; import { Toast } from "@halo-dev/components"; import type { AxiosError } from "axios"; @@ -45,10 +44,10 @@ export function setupApiClient() { const { title, detail } = errorResponse.data; if (status === 401) { - const userStore = useUserStore(); - userStore.loginModalVisible = true; Toast.warning(i18n.global.t("core.common.toast.login_expired")); + // TODO: show dialog + return Promise.reject(error); } diff --git a/ui/src/stores/user.ts b/ui/src/stores/user.ts index 441851bb6..b50e0e4a5 100644 --- a/ui/src/stores/user.ts +++ b/ui/src/stores/user.ts @@ -6,7 +6,6 @@ interface UserStoreState { currentUser?: User; currentRoles?: Role[]; isAnonymous: boolean; - loginModalVisible: boolean; } export const useUserStore = defineStore("user", { @@ -14,7 +13,6 @@ export const useUserStore = defineStore("user", { currentUser: undefined, currentRoles: [], isAnonymous: true, - loginModalVisible: false, }), actions: { async fetchCurrentUser() { diff --git a/ui/uc-src/layouts/BasicLayout.vue b/ui/uc-src/layouts/BasicLayout.vue index be079413a..f9ff9528b 100644 --- a/ui/uc-src/layouts/BasicLayout.vue +++ b/ui/uc-src/layouts/BasicLayout.vue @@ -1,5 +1,4 @@ - -