From 1d94185078026f8925d1f013934972b0640c6d37 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 27 Feb 2020 13:07:33 -0500 Subject: [PATCH] Add copy descriptions and warnings to policies (#470) --- .../organizations/manage/policies.component.ts | 12 ++++++------ .../manage/policy-edit.component.html | 8 ++++++-- .../settings/two-factor-setup.component.ts | 5 +++-- .../settings/two-factor-setup.component.html | 3 +++ src/app/settings/two-factor-setup.component.ts | 17 ++++++++++++++++- src/locales/en/messages.json | 15 +++++++++++++++ 6 files changed, 49 insertions(+), 11 deletions(-) diff --git a/src/app/organizations/manage/policies.component.ts b/src/app/organizations/manage/policies.component.ts index dec5772a14..3c3b5f8101 100644 --- a/src/app/organizations/manage/policies.component.ts +++ b/src/app/organizations/manage/policies.component.ts @@ -44,20 +44,20 @@ export class PoliciesComponent implements OnInit { private router: Router) { this.policies = [ { - name: 'Two-step Login', - description: 'Enforce two-step login options.', + name: i18nService.t('twoStepLogin'), + description: i18nService.t('twoStepLoginPolicyDesc'), type: PolicyType.TwoFactorAuthentication, enabled: false, }, { - name: 'Master Password', - description: 'Set requirements on master password strength.', + name: i18nService.t('masterPass'), + description: i18nService.t('masterPassPolicyDesc'), type: PolicyType.MasterPassword, enabled: false, }, { - name: 'Password Generator', - description: 'Limit the parameters of the password generator.', + name: i18nService.t('passwordGenerator'), + description: i18nService.t('passwordGeneratorPolicyDesc'), type: PolicyType.PasswordGenerator, enabled: false, }, diff --git a/src/app/organizations/manage/policy-edit.component.html b/src/app/organizations/manage/policy-edit.component.html index 5c8143e1fa..d3dca0de37 100644 --- a/src/app/organizations/manage/policy-edit.component.html +++ b/src/app/organizations/manage/policy-edit.component.html @@ -12,7 +12,11 @@ {{'loading' | i18n}} \ No newline at end of file diff --git a/src/app/organizations/settings/two-factor-setup.component.ts b/src/app/organizations/settings/two-factor-setup.component.ts index f16860704f..accbebf1bb 100644 --- a/src/app/organizations/settings/two-factor-setup.component.ts +++ b/src/app/organizations/settings/two-factor-setup.component.ts @@ -6,6 +6,7 @@ import { ActivatedRoute } from '@angular/router'; import { ApiService } from 'jslib/abstractions/api.service'; import { MessagingService } from 'jslib/abstractions/messaging.service'; +import { PolicyService } from 'jslib/abstractions/policy.service'; import { UserService } from 'jslib/abstractions/user.service'; import { TwoFactorProviderType } from 'jslib/enums/twoFactorProviderType'; @@ -20,8 +21,8 @@ import { TwoFactorSetupComponent as BaseTwoFactorSetupComponent } from '../../se export class TwoFactorSetupComponent extends BaseTwoFactorSetupComponent { constructor(apiService: ApiService, userService: UserService, componentFactoryResolver: ComponentFactoryResolver, messagingService: MessagingService, - private route: ActivatedRoute) { - super(apiService, userService, componentFactoryResolver, messagingService); + policyService: PolicyService, private route: ActivatedRoute) { + super(apiService, userService, componentFactoryResolver, messagingService, policyService); } async ngOnInit() { diff --git a/src/app/settings/two-factor-setup.component.html b/src/app/settings/two-factor-setup.component.html index 41fdeb92f8..7b62920876 100644 --- a/src/app/settings/two-factor-setup.component.html +++ b/src/app/settings/two-factor-setup.component.html @@ -15,6 +15,9 @@ {{'loading' | i18n}} + + {{'twoStepLoginPolicyUserWarning' | i18n}} +