1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

Close popout instead of navigating, style fixes

This commit is contained in:
Thomas Rittson
2021-01-15 15:58:38 +10:00
parent bef1008b9d
commit 092110fd5f
4 changed files with 21 additions and 16 deletions

View File

@@ -15,6 +15,8 @@ import { AttachmentsComponent as BaseAttachmentsComponent } from 'jslib/angular/
templateUrl: 'attachments.component.html',
})
export class AttachmentsComponent extends BaseAttachmentsComponent {
openedAttachmentsInPopup: boolean;
constructor(cipherService: CipherService, i18nService: I18nService,
cryptoService: CryptoService, userService: UserService,
platformUtilsService: PlatformUtilsService, private location: Location,
@@ -30,13 +32,15 @@ export class AttachmentsComponent extends BaseAttachmentsComponent {
queryParamsSub.unsubscribe();
}
});
this.openedAttachmentsInPopup = history.length === 1;
}
back() {
if (document.referrer === "") {
this.router.navigate(['/edit-cipher'], { queryParams: { cipherId: this.cipher.id } });
} else {
this.location.back();
}
this.location.back();
}
close() {
window.close();
}
}