diff --git a/jslib b/jslib index 6c529422..e93c534e 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 6c529422048c95645304ceb14250c8efce938f34 +Subproject commit e93c534ec4f724eaa8b494f516b187bea67b132c diff --git a/src/app/app.module.ts b/src/app/app.module.ts index d86d555d..7f3a0ed6 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -19,7 +19,6 @@ import { AppComponent } from './app.component'; import { ModalComponent } from './modal.component'; import { AvatarComponent } from './components/avatar.component'; -import { CalloutComponent } from './components/callout.component'; import { PasswordStrengthComponent } from './components/password-strength.component'; import { FooterComponent } from './layouts/footer.component'; @@ -154,6 +153,7 @@ import { GroupingsComponent } from './vault/groupings.component'; import { ShareComponent } from './vault/share.component'; import { VaultComponent } from './vault/vault.component'; +import { CalloutComponent } from 'jslib/angular/components/callout.component'; import { IconComponent } from 'jslib/angular/components/icon.component'; import { A11yTitleDirective } from 'jslib/angular/directives/a11y-title.directive'; diff --git a/src/app/components/callout.component.html b/src/app/components/callout.component.html deleted file mode 100644 index 31e1d10e..00000000 --- a/src/app/components/callout.component.html +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/src/app/components/callout.component.ts b/src/app/components/callout.component.ts deleted file mode 100644 index 34af2873..00000000 --- a/src/app/components/callout.component.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { - Component, - Input, - OnInit, -} from '@angular/core'; - -import { I18nService } from 'jslib/abstractions/i18n.service'; - -@Component({ - selector: 'app-callout', - templateUrl: 'callout.component.html', -}) -export class CalloutComponent implements OnInit { - @Input() type = 'info'; - @Input() icon: string; - @Input() title: string; - - calloutStyle: string; - - constructor(private i18nService: I18nService) { } - - ngOnInit() { - this.calloutStyle = this.type; - - if (this.type === 'warning' || this.type === 'danger') { - if (this.type === 'danger') { - this.calloutStyle = 'danger'; - } - if (this.title === undefined) { - this.title = this.i18nService.t('warning'); - } - if (this.icon === undefined) { - this.icon = 'fa-warning'; - } - } else if (this.type === 'error') { - this.calloutStyle = 'danger'; - if (this.title === undefined) { - this.title = this.i18nService.t('error'); - } - if (this.icon === undefined) { - this.icon = 'fa-bolt'; - } - } else if (this.type === 'tip') { - this.calloutStyle = 'success'; - if (this.title === undefined) { - this.title = this.i18nService.t('tip'); - } - if (this.icon === undefined) { - this.icon = 'fa-lightbulb-o'; - } - } - } -} diff --git a/src/app/tools/password-generator.component.html b/src/app/tools/password-generator.component.html index b1e1c19f..59dc3a46 100644 --- a/src/app/tools/password-generator.component.html +++ b/src/app/tools/password-generator.component.html @@ -1,7 +1,7 @@ - + {{'passwordGeneratorPolicyInEffect' | i18n}}