1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 02:03:39 +00:00

show popout conditionals

This commit is contained in:
Kyle Spearrin
2018-04-11 10:48:48 -04:00
parent 45033eb81e
commit 1e3a82586a
5 changed files with 16 additions and 8 deletions

View File

@@ -1,3 +1,5 @@
<button (click)="expand()" title="{{'popOutNewWindow' | i18n}}">
<i class="fa fa-external-link fa-rotate-270 fa-lg fa-fw"></i>
</button>
<ng-container *ngIf="show">
<button (click)="expand()" title="{{'popOutNewWindow' | i18n}}">
<i class="fa fa-external-link fa-rotate-270 fa-lg fa-fw"></i>
</button>
</ng-container>

View File

@@ -1,4 +1,7 @@
import { Component } from '@angular/core';
import {
Component,
Input,
} from '@angular/core';
import { Angulartics2 } from 'angulartics2';
@@ -13,8 +16,12 @@ import { PopupUtilsService } from '../services/popup-utils.service';
templateUrl: 'pop-out.component.html',
})
export class PopOutComponent {
@Input() show = true;
constructor(private analytics: Angulartics2, private platformUtilsService: PlatformUtilsService,
private popupUtilsService: PopupUtilsService) { }
private popupUtilsService: PopupUtilsService) {
this.show = !this.platformUtilsService.isSafari();
}
expand() {
this.analytics.eventTrack.next({ action: 'Pop Out Window' });