diff --git a/apps/frontend/src/pages/settings/account.vue b/apps/frontend/src/pages/settings/account.vue index ce57a33618..690c61cf9b 100644 --- a/apps/frontend/src/pages/settings/account.vue +++ b/apps/frontend/src/pages/settings/account.vue @@ -183,24 +183,24 @@ >
- {{ formatMessage(messages.twoFactorIncorrectError) }} -
+ {{ formatMessage(messages.twoFactorIncorrectError) }} +
- + - + {{ formatMessage(messages.twoFactorVerifyCodeLabel) }} + {{ formatMessage(messages.twoFactorVerifyCodeDescription) }} - - - - {{ formatMessage(messages.twoFactorIncorrectError) }} - + + {{ formatMessage(messages.twoFactorIncorrectError) }} + + {{ formatMessage(messages.twoFactorBackupCodesIntro) }} @@ -478,6 +476,7 @@ diff --git a/packages/ui/src/components/base/index.ts b/packages/ui/src/components/base/index.ts index 7fa6262111..3a1d3a0620 100644 --- a/packages/ui/src/components/base/index.ts +++ b/packages/ui/src/components/base/index.ts @@ -99,4 +99,5 @@ export type { export { default as TimeFramePicker } from './TimeFramePicker.vue' export { default as Timeline } from './Timeline.vue' export { default as Toggle } from './Toggle.vue' +export { default as TwoFactorAuthCodeInput } from './TwoFactorAuthCodeInput.vue' export { default as UnsavedChangesPopup } from './UnsavedChangesPopup.vue' diff --git a/packages/ui/src/stories/base/TwoFactorAuthCodeInput.stories.ts b/packages/ui/src/stories/base/TwoFactorAuthCodeInput.stories.ts new file mode 100644 index 0000000000..14a4ac8bea --- /dev/null +++ b/packages/ui/src/stories/base/TwoFactorAuthCodeInput.stories.ts @@ -0,0 +1,51 @@ +import type { Meta, StoryObj } from '@storybook/vue3-vite' +import { ref } from 'vue' + +import TwoFactorAuthCodeInput from '../../components/base/TwoFactorAuthCodeInput.vue' + +const meta = { + title: 'Base/TwoFactorAuthCodeInput', + component: TwoFactorAuthCodeInput, +} satisfies Meta + +export default meta +type Story = StoryObj + +export const Default: Story = { + render: () => ({ + components: { TwoFactorAuthCodeInput }, + setup() { + const code = ref('') + return { code } + }, + template: ` + + `, + }), +} + +export const Filled: Story = { + render: () => ({ + components: { TwoFactorAuthCodeInput }, + setup() { + const code = ref('123456') + return { code } + }, + template: ` + + `, + }), +} + +export const Disabled: Story = { + render: () => ({ + components: { TwoFactorAuthCodeInput }, + setup() { + const code = ref('123456') + return { code } + }, + template: ` + + `, + }), +}
{{ formatMessage(messages.twoFactorBackupCodesIntro) }}