mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
parent
e2108ff85b
commit
aac011d3b3
2
jslib
2
jslib
@ -1 +1 @@
|
||||
Subproject commit 6c529422048c95645304ceb14250c8efce938f34
|
||||
Subproject commit e93c534ec4f724eaa8b494f516b187bea67b132c
|
@ -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';
|
||||
|
@ -1,7 +0,0 @@
|
||||
<div class="callout callout-{{calloutStyle}}" role="alert">
|
||||
<h3 class="callout-heading" *ngIf="title">
|
||||
<i class="fa {{icon}}" *ngIf="icon" aria-hidden="true"></i>
|
||||
{{title}}
|
||||
</h3>
|
||||
<ng-content></ng-content>
|
||||
</div>
|
@ -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';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
<div class="page-header">
|
||||
<h1>{{'passwordGenerator' | i18n}}</h1>
|
||||
</div>
|
||||
<app-callout type="info" *ngIf="hasPolicyInEffect()">
|
||||
<app-callout type="info" *ngIf="policyInEffect">
|
||||
{{'passwordGeneratorPolicyInEffect' | i18n}}
|
||||
</app-callout>
|
||||
<div class="card card-password bg-light my-4">
|
||||
|
Loading…
Reference in New Issue
Block a user