mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-17 02:34:47 +02:00
edge browser adjustments
This commit is contained in:
parent
b16ddbbb45
commit
cfcb8653f7
@ -46,7 +46,8 @@
|
|||||||
<div class="action-buttons">
|
<div class="action-buttons">
|
||||||
<button type="button" #checkPasswordBtn class="row-btn btn" appBlurClick
|
<button type="button" #checkPasswordBtn class="row-btn btn" appBlurClick
|
||||||
title="{{'checkPassword' | i18n}}" (click)="checkPassword()"
|
title="{{'checkPassword' | i18n}}" (click)="checkPassword()"
|
||||||
[appApiAction]="checkPasswordPromise" [disabled]="checkPasswordBtn.loading">
|
[appApiAction]="checkPasswordPromise" [disabled]="checkPasswordBtn.loading"
|
||||||
|
*ngIf="canCheckPasswords">
|
||||||
<i class="fa fa-lg fa-check-circle" [hidden]="checkPasswordBtn.loading"></i>
|
<i class="fa fa-lg fa-check-circle" [hidden]="checkPasswordBtn.loading"></i>
|
||||||
<i class="fa fa-lg fa-spinner fa-spin" [hidden]="!checkPasswordBtn.loading"></i>
|
<i class="fa fa-lg fa-spinner fa-spin" [hidden]="!checkPasswordBtn.loading"></i>
|
||||||
</button>
|
</button>
|
||||||
|
@ -27,6 +27,8 @@ import { AddEditComponent as BaseAddEditComponent } from 'jslib/angular/componen
|
|||||||
templateUrl: 'add-edit.component.html',
|
templateUrl: 'add-edit.component.html',
|
||||||
})
|
})
|
||||||
export class AddEditComponent extends BaseAddEditComponent implements OnInit {
|
export class AddEditComponent extends BaseAddEditComponent implements OnInit {
|
||||||
|
canCheckPasswords = true;
|
||||||
|
|
||||||
constructor(cipherService: CipherService, folderService: FolderService,
|
constructor(cipherService: CipherService, folderService: FolderService,
|
||||||
i18nService: I18nService, platformUtilsService: PlatformUtilsService,
|
i18nService: I18nService, platformUtilsService: PlatformUtilsService,
|
||||||
analytics: Angulartics2, toasterService: ToasterService,
|
analytics: Angulartics2, toasterService: ToasterService,
|
||||||
@ -38,6 +40,7 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.canCheckPasswords = !this.platformUtilsService.isEdge();
|
||||||
this.route.queryParams.subscribe(async (params) => {
|
this.route.queryParams.subscribe(async (params) => {
|
||||||
if (params.cipherId) {
|
if (params.cipherId) {
|
||||||
this.cipherId = params.cipherId;
|
this.cipherId = params.cipherId;
|
||||||
|
@ -41,7 +41,6 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||||||
url: string;
|
url: string;
|
||||||
domain: string;
|
domain: string;
|
||||||
searchText: string;
|
searchText: string;
|
||||||
canAutofill = false;
|
|
||||||
inSidebar = false;
|
inSidebar = false;
|
||||||
showLeftHeader = false;
|
showLeftHeader = false;
|
||||||
loaded = false;
|
loaded = false;
|
||||||
@ -52,7 +51,7 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||||||
private analytics: Angulartics2, private toasterService: ToasterService,
|
private analytics: Angulartics2, private toasterService: ToasterService,
|
||||||
private i18nService: I18nService, private router: Router,
|
private i18nService: I18nService, private router: Router,
|
||||||
private ngZone: NgZone, private broadcasterService: BroadcasterService,
|
private ngZone: NgZone, private broadcasterService: BroadcasterService,
|
||||||
private changeDetectorRef: ChangeDetectorRef, private syncService: SyncService) {}
|
private changeDetectorRef: ChangeDetectorRef, private syncService: SyncService) { }
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.showLeftHeader = !this.platformUtilsService.isSafari();
|
this.showLeftHeader = !this.platformUtilsService.isSafari();
|
||||||
@ -119,7 +118,7 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fillCipher(cipher: CipherView) {
|
async fillCipher(cipher: CipherView) {
|
||||||
if (!this.canAutofill) {
|
if (this.pageDetails == null || this.pageDetails.length === 0) {
|
||||||
this.analytics.eventTrack.next({ action: 'Autofilled Error' });
|
this.analytics.eventTrack.next({ action: 'Autofilled Error' });
|
||||||
this.toasterService.popAsync('error', null, this.i18nService.t('autofillError'));
|
this.toasterService.popAsync('error', null, this.i18nService.t('autofillError'));
|
||||||
return;
|
return;
|
||||||
@ -162,13 +161,10 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.domain = this.platformUtilsService.getDomain(this.url);
|
this.domain = this.platformUtilsService.getDomain(this.url);
|
||||||
|
|
||||||
BrowserApi.tabSendMessage(tab, {
|
BrowserApi.tabSendMessage(tab, {
|
||||||
command: 'collectPageDetails',
|
command: 'collectPageDetails',
|
||||||
tab: tab,
|
tab: tab,
|
||||||
sender: BroadcasterSubscriptionId,
|
sender: BroadcasterSubscriptionId,
|
||||||
}).then(() => {
|
|
||||||
this.canAutofill = true;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const ciphers = await this.cipherService.getAllDecryptedForUrl(this.url, [
|
const ciphers = await this.cipherService.getAllDecryptedForUrl(this.url, [
|
||||||
|
@ -42,7 +42,8 @@
|
|||||||
<div class="action-buttons">
|
<div class="action-buttons">
|
||||||
<button type="button" #checkPasswordBtn class="row-btn btn" appBlurClick
|
<button type="button" #checkPasswordBtn class="row-btn btn" appBlurClick
|
||||||
title="{{'checkPassword' | i18n}}" (click)="checkPassword()"
|
title="{{'checkPassword' | i18n}}" (click)="checkPassword()"
|
||||||
[appApiAction]="checkPasswordPromise" [disabled]="checkPasswordBtn.loading">
|
[appApiAction]="checkPasswordPromise" [disabled]="checkPasswordBtn.loading"
|
||||||
|
*ngIf="canCheckPasswords">
|
||||||
<i class="fa fa-lg fa-check-circle" [hidden]="checkPasswordBtn.loading"></i>
|
<i class="fa fa-lg fa-check-circle" [hidden]="checkPasswordBtn.loading"></i>
|
||||||
<i class="fa fa-lg fa-spinner fa-spin" [hidden]="!checkPasswordBtn.loading"></i>
|
<i class="fa fa-lg fa-spinner fa-spin" [hidden]="!checkPasswordBtn.loading"></i>
|
||||||
</button>
|
</button>
|
||||||
|
@ -28,6 +28,8 @@ import { ViewComponent as BaseViewComponent } from 'jslib/angular/components/vie
|
|||||||
templateUrl: 'view.component.html',
|
templateUrl: 'view.component.html',
|
||||||
})
|
})
|
||||||
export class ViewComponent extends BaseViewComponent implements OnInit {
|
export class ViewComponent extends BaseViewComponent implements OnInit {
|
||||||
|
canCheckPasswords = true;
|
||||||
|
|
||||||
constructor(cipherService: CipherService, totpService: TotpService,
|
constructor(cipherService: CipherService, totpService: TotpService,
|
||||||
tokenService: TokenService, toasterService: ToasterService,
|
tokenService: TokenService, toasterService: ToasterService,
|
||||||
cryptoService: CryptoService, platformUtilsService: PlatformUtilsService,
|
cryptoService: CryptoService, platformUtilsService: PlatformUtilsService,
|
||||||
@ -39,6 +41,7 @@ export class ViewComponent extends BaseViewComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.canCheckPasswords = !this.platformUtilsService.isEdge();
|
||||||
this.route.queryParams.subscribe(async (params) => {
|
this.route.queryParams.subscribe(async (params) => {
|
||||||
if (params.cipherId) {
|
if (params.cipherId) {
|
||||||
this.cipherId = params.cipherId;
|
this.cipherId = params.cipherId;
|
||||||
|
Loading…
Reference in New Issue
Block a user