edge browser adjustments

This commit is contained in:
Kyle Spearrin 2018-04-14 14:56:30 -04:00
parent b16ddbbb45
commit cfcb8653f7
5 changed files with 12 additions and 8 deletions

View File

@ -46,7 +46,8 @@
<div class="action-buttons">
<button type="button" #checkPasswordBtn class="row-btn btn" appBlurClick
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-spinner fa-spin" [hidden]="!checkPasswordBtn.loading"></i>
</button>

View File

@ -27,6 +27,8 @@ import { AddEditComponent as BaseAddEditComponent } from 'jslib/angular/componen
templateUrl: 'add-edit.component.html',
})
export class AddEditComponent extends BaseAddEditComponent implements OnInit {
canCheckPasswords = true;
constructor(cipherService: CipherService, folderService: FolderService,
i18nService: I18nService, platformUtilsService: PlatformUtilsService,
analytics: Angulartics2, toasterService: ToasterService,
@ -38,6 +40,7 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit {
}
ngOnInit() {
this.canCheckPasswords = !this.platformUtilsService.isEdge();
this.route.queryParams.subscribe(async (params) => {
if (params.cipherId) {
this.cipherId = params.cipherId;

View File

@ -41,7 +41,6 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
url: string;
domain: string;
searchText: string;
canAutofill = false;
inSidebar = false;
showLeftHeader = false;
loaded = false;
@ -52,7 +51,7 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
private analytics: Angulartics2, private toasterService: ToasterService,
private i18nService: I18nService, private router: Router,
private ngZone: NgZone, private broadcasterService: BroadcasterService,
private changeDetectorRef: ChangeDetectorRef, private syncService: SyncService) {}
private changeDetectorRef: ChangeDetectorRef, private syncService: SyncService) { }
async ngOnInit() {
this.showLeftHeader = !this.platformUtilsService.isSafari();
@ -119,7 +118,7 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
}
async fillCipher(cipher: CipherView) {
if (!this.canAutofill) {
if (this.pageDetails == null || this.pageDetails.length === 0) {
this.analytics.eventTrack.next({ action: 'Autofilled Error' });
this.toasterService.popAsync('error', null, this.i18nService.t('autofillError'));
return;
@ -162,13 +161,10 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
}
this.domain = this.platformUtilsService.getDomain(this.url);
BrowserApi.tabSendMessage(tab, {
command: 'collectPageDetails',
tab: tab,
sender: BroadcasterSubscriptionId,
}).then(() => {
this.canAutofill = true;
});
const ciphers = await this.cipherService.getAllDecryptedForUrl(this.url, [

View File

@ -42,7 +42,8 @@
<div class="action-buttons">
<button type="button" #checkPasswordBtn class="row-btn btn" appBlurClick
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-spinner fa-spin" [hidden]="!checkPasswordBtn.loading"></i>
</button>

View File

@ -28,6 +28,8 @@ import { ViewComponent as BaseViewComponent } from 'jslib/angular/components/vie
templateUrl: 'view.component.html',
})
export class ViewComponent extends BaseViewComponent implements OnInit {
canCheckPasswords = true;
constructor(cipherService: CipherService, totpService: TotpService,
tokenService: TokenService, toasterService: ToasterService,
cryptoService: CryptoService, platformUtilsService: PlatformUtilsService,
@ -39,6 +41,7 @@ export class ViewComponent extends BaseViewComponent implements OnInit {
}
ngOnInit() {
this.canCheckPasswords = !this.platformUtilsService.isEdge();
this.route.queryParams.subscribe(async (params) => {
if (params.cipherId) {
this.cipherId = params.cipherId;