1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-08-21 22:23:52 +02:00

resolve build errors with latest jslib ref (#1565)

This commit is contained in:
Kyle Spearrin 2022-03-25 11:00:40 -04:00 committed by GitHub
parent 571aaf31c4
commit 11034de7d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 51 additions and 37 deletions

2
jslib

@ -1 +1 @@
Subproject commit 5b7b2a03ddbecbc93adc54a5c69e8141c00c192f
Subproject commit fa73c13b8c9ed35cbb9909e342b143fa8a57f1a0

View File

@ -1,7 +1,7 @@
<div class="page-header">
<h1>{{ "passwordGenerator" | i18n }}</h1>
</div>
<app-callout type="info" *ngIf="enforcedPolicyOptions?.inEffect()">
<app-callout type="info" *ngIf="enforcedPasswordPolicyOptions?.inEffect()">
{{ "passwordGeneratorPolicyInEffect" | i18n }}
</app-callout>
<div class="card card-password bg-light my-4">
@ -14,19 +14,19 @@
<input
class="form-check-input"
type="radio"
[(ngModel)]="options.type"
[(ngModel)]="passwordOptions.type"
name="Type_{{ o.value }}"
id="type_{{ o.value }}"
[value]="o.value"
(change)="saveOptions()"
[checked]="options.type === o.value"
(change)="savePasswordOptions()"
[checked]="passwordOptions.type === o.value"
/>
<label class="form-check-label" for="type_{{ o.value }}">
{{ o.name }}
</label>
</div>
</div>
<ng-container *ngIf="options.type === 'passphrase'">
<ng-container *ngIf="passwordOptions.type === 'passphrase'">
<div class="row">
<div class="form-group col-4">
<label for="num-words">{{ "numWords" | i18n }}</label>
@ -36,8 +36,8 @@
type="number"
min="3"
max="20"
[(ngModel)]="options.numWords"
(blur)="saveOptions()"
[(ngModel)]="passwordOptions.numWords"
(blur)="savePasswordOptions()"
/>
</div>
<div class="form-group col-4">
@ -47,8 +47,8 @@
class="form-control"
type="text"
maxlength="1"
[(ngModel)]="options.wordSeparator"
(blur)="saveOptions()"
[(ngModel)]="passwordOptions.wordSeparator"
(blur)="savePasswordOptions()"
/>
</div>
</div>
@ -58,9 +58,9 @@
id="capitalize"
class="form-check-input"
type="checkbox"
(change)="saveOptions()"
[(ngModel)]="options.capitalize"
[disabled]="enforcedPolicyOptions?.capitalize"
(change)="savePasswordOptions()"
[(ngModel)]="passwordOptions.capitalize"
[disabled]="enforcedPasswordPolicyOptions?.capitalize"
/>
<label for="capitalize" class="form-check-label">{{ "capitalize" | i18n }}</label>
</div>
@ -69,15 +69,15 @@
id="include-number"
class="form-check-input"
type="checkbox"
(change)="saveOptions()"
[(ngModel)]="options.includeNumber"
[disabled]="enforcedPolicyOptions?.includeNumber"
(change)="savePasswordOptions()"
[(ngModel)]="passwordOptions.includeNumber"
[disabled]="enforcedPasswordPolicyOptions?.includeNumber"
/>
<label for="include-number" class="form-check-label">{{ "includeNumber" | i18n }}</label>
</div>
</div>
</ng-container>
<ng-container *ngIf="options.type === 'password'">
<ng-container *ngIf="passwordOptions.type === 'password'">
<div class="row">
<div class="form-group col-4">
<label for="length">{{ "length" | i18n }}</label>
@ -87,8 +87,8 @@
type="number"
min="5"
max="128"
[(ngModel)]="options.length"
(blur)="saveOptions()"
[(ngModel)]="passwordOptions.length"
(blur)="savePasswordOptions()"
(change)="lengthChanged()"
/>
</div>
@ -100,8 +100,8 @@
type="number"
min="0"
max="9"
(blur)="saveOptions()"
[(ngModel)]="options.minNumber"
(blur)="savePasswordOptions()"
[(ngModel)]="passwordOptions.minNumber"
(change)="minNumberChanged()"
/>
</div>
@ -113,8 +113,8 @@
type="number"
min="0"
max="9"
(blur)="saveOptions()"
[(ngModel)]="options.minSpecial"
(blur)="savePasswordOptions()"
[(ngModel)]="passwordOptions.minSpecial"
(change)="minSpecialChanged()"
/>
</div>
@ -125,9 +125,9 @@
id="uppercase"
class="form-check-input"
type="checkbox"
(change)="saveOptions()"
[(ngModel)]="options.uppercase"
[disabled]="enforcedPolicyOptions?.useUppercase"
(change)="savePasswordOptions()"
[(ngModel)]="passwordOptions.uppercase"
[disabled]="enforcedPasswordPolicyOptions?.useUppercase"
/>
<label for="uppercase" class="form-check-label">A-Z</label>
</div>
@ -136,9 +136,9 @@
id="lowercase"
class="form-check-input"
type="checkbox"
(change)="saveOptions()"
[(ngModel)]="options.lowercase"
[disabled]="enforcedPolicyOptions?.useLowercase"
(change)="savePasswordOptions()"
[(ngModel)]="passwordOptions.lowercase"
[disabled]="enforcedPasswordPolicyOptions?.useLowercase"
/>
<label for="lowercase" class="form-check-label">a-z</label>
</div>
@ -147,9 +147,9 @@
id="numbers"
class="form-check-input"
type="checkbox"
(change)="saveOptions()"
[(ngModel)]="options.number"
[disabled]="enforcedPolicyOptions?.useNumbers"
(change)="savePasswordOptions()"
[(ngModel)]="passwordOptions.number"
[disabled]="enforcedPasswordPolicyOptions?.useNumbers"
/>
<label for="numbers" class="form-check-label">0-9</label>
</div>
@ -158,9 +158,9 @@
id="special"
class="form-check-input"
type="checkbox"
(change)="saveOptions()"
[(ngModel)]="options.special"
[disabled]="enforcedPolicyOptions?.useSpecial"
(change)="savePasswordOptions()"
[(ngModel)]="passwordOptions.special"
[disabled]="enforcedPasswordPolicyOptions?.useSpecial"
/>
<label for="special" class="form-check-label">!@#$%^&amp;*</label>
</div>
@ -169,7 +169,7 @@
id="ambiguous"
class="form-check-input"
type="checkbox"
(change)="saveOptions()"
(change)="savePasswordOptions()"
[(ngModel)]="avoidAmbiguous"
/>
<label for="ambiguous" class="form-check-label">{{ "ambiguous" | i18n }}</label>

View File

@ -1,10 +1,13 @@
import { Component, ViewChild, ViewContainerRef } from "@angular/core";
import { ActivatedRoute } from "@angular/router";
import { PasswordGeneratorComponent as BasePasswordGeneratorComponent } from "jslib-angular/components/password-generator.component";
import { ModalService } from "jslib-angular/services/modal.service";
import { I18nService } from "jslib-common/abstractions/i18n.service";
import { PasswordGenerationService } from "jslib-common/abstractions/passwordGeneration.service";
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
import { StateService } from "jslib-common/abstractions/state.service";
import { UsernameGenerationService } from "jslib-common/abstractions/usernameGeneration.service";
import { PasswordGeneratorHistoryComponent } from "./password-generator-history.component";
@ -18,11 +21,22 @@ export class PasswordGeneratorComponent extends BasePasswordGeneratorComponent {
constructor(
passwordGenerationService: PasswordGenerationService,
usernameGenerationService: UsernameGenerationService,
stateService: StateService,
platformUtilsService: PlatformUtilsService,
i18nService: I18nService,
route: ActivatedRoute,
private modalService: ModalService
) {
super(passwordGenerationService, platformUtilsService, i18nService, window);
super(
passwordGenerationService,
usernameGenerationService,
platformUtilsService,
stateService,
i18nService,
route,
window
);
}
async history() {