Browse Source

Ps 575 pop out (#2705)

* Disable the ability to open infinite popouts in the browser

* fixing lint error

* Adding padding

* Updating code to use ngIf instead of show for the app-pop-out
pull/2763/head
CarleyDiaz-Bitwarden 4 years ago committed by GitHub
parent
commit
8de7f522c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      apps/browser/src/popup/components/pop-out.component.ts
  2. 1
      apps/browser/src/popup/scss/base.scss
  3. 2
      apps/browser/src/popup/vault/current-tab.component.html

5
apps/browser/src/popup/components/pop-out.component.ts

@ -18,7 +18,10 @@ export class PopOutComponent implements OnInit { @@ -18,7 +18,10 @@ export class PopOutComponent implements OnInit {
ngOnInit() {
if (this.show) {
if (this.popupUtilsService.inSidebar(window) && this.platformUtilsService.isFirefox()) {
if (
(this.popupUtilsService.inSidebar(window) && this.platformUtilsService.isFirefox()) ||
this.popupUtilsService.inPopout(window)
) {
this.show = false;
}
}

1
apps/browser/src/popup/scss/base.scss

@ -215,6 +215,7 @@ header { @@ -215,6 +215,7 @@ header {
app-pop-out {
display: flex;
padding-right: 0.5em;
}
.title {

2
apps/browser/src/popup/vault/current-tab.component.html

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
<header>
<h1 class="sr-only">{{ "currentTab" | i18n }}</h1>
<div class="left">
<app-pop-out [show]="!inSidebar"></app-pop-out>
<app-pop-out *ngIf="!inSidebar"></app-pop-out>
<button
type="button"
appBlurClick

Loading…
Cancel
Save