diff --git a/console/packages/api-client/src/.openapi-generator/FILES b/console/packages/api-client/src/.openapi-generator/FILES index 6efd5107e91..ced5501674d 100644 --- a/console/packages/api-client/src/.openapi-generator/FILES +++ b/console/packages/api-client/src/.openapi-generator/FILES @@ -187,6 +187,7 @@ models/notifier-descriptor.ts models/notifier-info.ts models/notifier-setting-ref.ts models/owner-info.ts +models/password-request.ts models/password-reset-email-request.ts models/pat-spec.ts models/personal-access-token-list.ts diff --git a/console/packages/api-client/src/models/index.ts b/console/packages/api-client/src/models/index.ts index 45373f05d52..d0c57009343 100644 --- a/console/packages/api-client/src/models/index.ts +++ b/console/packages/api-client/src/models/index.ts @@ -106,6 +106,7 @@ export * from "./notifier-descriptor-spec"; export * from "./notifier-info"; export * from "./notifier-setting-ref"; export * from "./owner-info"; +export * from "./password-request"; export * from "./password-reset-email-request"; export * from "./pat-spec"; export * from "./personal-access-token"; diff --git a/console/src/utils/api-client.ts b/console/src/utils/api-client.ts index a0871441a7e..217defaab5a 100644 --- a/console/src/utils/api-client.ts +++ b/console/src/utils/api-client.ts @@ -45,6 +45,7 @@ import { NotificationHaloRunV1alpha1NotifierDescriptorApi, ApiSecurityHaloRunV1alpha1PersonalAccessTokenApi, SecurityHaloRunV1alpha1PersonalAccessTokenApi, + ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApi, UcApiContentHaloRunV1alpha1AttachmentApi, UcApiContentHaloRunV1alpha1PostApi, UcApiContentHaloRunV1alpha1SnapshotApi, @@ -247,6 +248,11 @@ function setupApiClient(axios: AxiosInstance) { baseURL, axios ), + twoFactor: new ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApi( + undefined, + baseURL, + axios + ), uc: { post: new UcApiContentHaloRunV1alpha1PostApi(undefined, baseURL, axios), attachment: new UcApiContentHaloRunV1alpha1AttachmentApi( diff --git a/console/uc-src/modules/profile/Profile.vue b/console/uc-src/modules/profile/Profile.vue index 0ed9097b997..2eb11e5f27e 100644 --- a/console/uc-src/modules/profile/Profile.vue +++ b/console/uc-src/modules/profile/Profile.vue @@ -22,6 +22,7 @@ import DetailTab from "./tabs/Detail.vue"; import PersonalAccessTokensTab from "./tabs/PersonalAccessTokens.vue"; import { useRouteQuery } from "@vueuse/router"; import NotificationPreferences from "./tabs/NotificationPreferences.vue"; +import TwoFactor from "./tabs/TwoFactor.vue"; const { t } = useI18n(); @@ -79,6 +80,12 @@ const tabs: UserTab[] = [ component: markRaw(PersonalAccessTokensTab), priority: 30, }, + { + id: "2fa", + label: "两步验证", + component: markRaw(TwoFactor), + priority: 40, + }, ]; const tabbarItems = computed(() => {