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

View File

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