mirror of
https://github.com/bitwarden/browser
synced 2025-01-23 17:53:31 +01:00
use this on generator
This commit is contained in:
parent
5d6c206de0
commit
e4a50cbbb0
@ -1,6 +1,6 @@
|
|||||||
<header>
|
<header>
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<button type="button" appBlurClick (click)="close()">{{'close' | i18n}}</button>
|
<button type="button" appBlurClick (click)="close()">{{closeText}}</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<span class="title">{{'passGen' | i18n}}</span>
|
<span class="title">{{'passGen' | i18n}}</span>
|
||||||
|
@ -2,12 +2,8 @@ import { ToasterService } from 'angular2-toaster';
|
|||||||
import { Angulartics2 } from 'angulartics2';
|
import { Angulartics2 } from 'angulartics2';
|
||||||
|
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
import {
|
import { Component } from '@angular/core';
|
||||||
Component,
|
import { Router } from '@angular/router';
|
||||||
} from '@angular/core';
|
|
||||||
import {
|
|
||||||
Router,
|
|
||||||
} from '@angular/router';
|
|
||||||
|
|
||||||
import { I18nService } from 'jslib/abstractions/i18n.service';
|
import { I18nService } from 'jslib/abstractions/i18n.service';
|
||||||
import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration.service';
|
import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration.service';
|
||||||
@ -25,6 +21,8 @@ import {
|
|||||||
templateUrl: 'password-generator.component.html',
|
templateUrl: 'password-generator.component.html',
|
||||||
})
|
})
|
||||||
export class PasswordGeneratorComponent extends BasePasswordGeneratorComponent {
|
export class PasswordGeneratorComponent extends BasePasswordGeneratorComponent {
|
||||||
|
closeText: string;
|
||||||
|
|
||||||
private cipherState: CipherView;
|
private cipherState: CipherView;
|
||||||
|
|
||||||
constructor(passwordGenerationService: PasswordGenerationService, analytics: Angulartics2,
|
constructor(passwordGenerationService: PasswordGenerationService, analytics: Angulartics2,
|
||||||
@ -37,7 +35,8 @@ export class PasswordGeneratorComponent extends BasePasswordGeneratorComponent {
|
|||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
await super.ngOnInit();
|
await super.ngOnInit();
|
||||||
this.cipherState = await this.stateService.get<CipherView>('addEditCipher');
|
this.cipherState = await this.stateService.get<CipherView>('addEditCipher');
|
||||||
super.showSelect = this.cipherState != null;
|
this.showSelect = this.cipherState != null;
|
||||||
|
this.closeText = this.showSelect ? this.i18nService.t('cancel') : this.i18nService.t('close');
|
||||||
}
|
}
|
||||||
|
|
||||||
select() {
|
select() {
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
(onSelected)="fillCipher($event)" (onView)="viewCipher($event)"
|
(onSelected)="fillCipher($event)" (onView)="viewCipher($event)"
|
||||||
*ngIf="loginCiphers.length"></app-ciphers-list>
|
*ngIf="loginCiphers.length"></app-ciphers-list>
|
||||||
<div class="box-content-row text-center padded no-hover" *ngIf="!loginCiphers.length">
|
<div class="box-content-row text-center padded no-hover" *ngIf="!loginCiphers.length">
|
||||||
{{'autoFillInfo' | i18n}}
|
<p>{{'autoFillInfo' | i18n}}</p>
|
||||||
<button type="button" class="btn primary link block" (click)="addCipher()">
|
<button type="button" class="btn primary link block" (click)="addCipher()">
|
||||||
{{'addLogin' | i18n}}
|
{{'addLogin' | i18n}}
|
||||||
</button>
|
</button>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user