Browse Source

Merge pull request #1083 from colinin/authenticator-style

💄 style: 修复验证器卡片样式.
pull/1091/head
yx lin 1 year ago
committed by GitHub
parent
commit
f747e127e8
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 47
      apps/vben5/apps/app-antd/src/adapter/form.ts
  2. 6
      apps/vben5/packages/@abp/account/src/components/components/AuthenticatorSettings.vue
  3. 6
      apps/vben5/packages/@abp/account/src/components/components/AuthenticatorSteps.vue
  4. 1
      aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Localization/Resources/en.json
  5. 1
      aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Localization/Resources/zh-Hans.json

47
apps/vben5/apps/app-antd/src/adapter/form.ts

@ -1,47 +0,0 @@
import type {
VbenFormSchema as FormSchema,
VbenFormProps,
} from '@vben/common-ui';
import type { ComponentType } from './component';
import { setupVbenForm, useVbenForm as useForm, z } from '@vben/common-ui';
import { $t } from '@vben/locales';
setupVbenForm<ComponentType>({
config: {
// ant design vue组件库默认都是 v-model:value
baseModelPropName: 'value',
// 一些组件是 v-model:checked 或者 v-model:fileList
modelPropNameMap: {
Checkbox: 'checked',
Radio: 'checked',
Switch: 'checked',
Upload: 'fileList',
},
},
defineRules: {
// 输入项目必填国际化适配
required: (value, _params, ctx) => {
if (value === undefined || value === null || value.length === 0) {
return $t('ui.formRules.required', [ctx.label]);
}
return true;
},
// 选择项目必填国际化适配
selectRequired: (value, _params, ctx) => {
if (value === undefined || value === null) {
return $t('ui.formRules.selectRequired', [ctx.label]);
}
return true;
},
},
});
const useVbenForm = useForm<ComponentType>;
export { useVbenForm, z };
export type VbenFormSchema = FormSchema<ComponentType>;
export type { VbenFormProps };

6
apps/vben5/packages/@abp/account/src/components/components/AuthenticatorSettings.vue

@ -63,8 +63,4 @@ onMounted(onGet);
</Card>
</template>
<style scoped>
.mh-350 {
min-height: 350px;
}
</style>
<style scoped></style>

6
apps/vben5/packages/@abp/account/src/components/components/AuthenticatorSteps.vue

@ -207,4 +207,8 @@ async function onValidCode() {
</Card>
</template>
<style scoped></style>
<style scoped>
.mh-350 {
min-height: 350px;
}
</style>

1
aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Localization/Resources/en.json

@ -40,6 +40,7 @@
"ResetAuthenticator": "Reset Authenticator",
"ResetAuthenticatorDesc": "If you want to change the authentication program, you can reset the validator here.",
"ResetAuthenticatorWarning": "Resetting the authenticator key will render the authenticator code unusable until it is reconfigured,If you do not have any other validators, the secondary authentication will be revoked, which may lower the security level of your account.",
"YourAuthenticatorIsSuccessfullyReset": "Your authenticator reset was successful.",
"Steps:PreStep": "Pre Step",
"Steps:NextStep": "Next Step",
"Steps:Done": "Done"

1
aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Localization/Resources/zh-Hans.json

@ -40,6 +40,7 @@
"ResetAuthenticator": "重置验证器",
"ResetAuthenticatorDesc": "如果你想更换身份验证程序,可以在这里重置验证器。",
"ResetAuthenticatorWarning": "重置身份验证器密钥,在重新配置之前身份验证器代码将无法使用,如果你没有其他验证器,二次认证将被解除,这可能会使你的账号安全等级降低。",
"YourAuthenticatorIsSuccessfullyReset": "您的验证器重置成功.",
"Steps:PreStep": "上一步",
"Steps:NextStep": "下一步",
"Steps:Done": "完成"

Loading…
Cancel
Save