mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-30 13:03:53 +01:00
show popout conditionals
This commit is contained in:
parent
45033eb81e
commit
1e3a82586a
@ -1,3 +1,5 @@
|
|||||||
<button (click)="expand()" title="{{'popOutNewWindow' | i18n}}">
|
<ng-container *ngIf="show">
|
||||||
<i class="fa fa-external-link fa-rotate-270 fa-lg fa-fw"></i>
|
<button (click)="expand()" title="{{'popOutNewWindow' | i18n}}">
|
||||||
</button>
|
<i class="fa fa-external-link fa-rotate-270 fa-lg fa-fw"></i>
|
||||||
|
</button>
|
||||||
|
</ng-container>
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
import { Component } from '@angular/core';
|
import {
|
||||||
|
Component,
|
||||||
|
Input,
|
||||||
|
} from '@angular/core';
|
||||||
|
|
||||||
import { Angulartics2 } from 'angulartics2';
|
import { Angulartics2 } from 'angulartics2';
|
||||||
|
|
||||||
@ -13,8 +16,12 @@ import { PopupUtilsService } from '../services/popup-utils.service';
|
|||||||
templateUrl: 'pop-out.component.html',
|
templateUrl: 'pop-out.component.html',
|
||||||
})
|
})
|
||||||
export class PopOutComponent {
|
export class PopOutComponent {
|
||||||
|
@Input() show = true;
|
||||||
|
|
||||||
constructor(private analytics: Angulartics2, private platformUtilsService: PlatformUtilsService,
|
constructor(private analytics: Angulartics2, private platformUtilsService: PlatformUtilsService,
|
||||||
private popupUtilsService: PopupUtilsService) { }
|
private popupUtilsService: PopupUtilsService) {
|
||||||
|
this.show = !this.platformUtilsService.isSafari();
|
||||||
|
}
|
||||||
|
|
||||||
expand() {
|
expand() {
|
||||||
this.analytics.eventTrack.next({ action: 'Pop Out Window' });
|
this.analytics.eventTrack.next({ action: 'Pop Out Window' });
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<header>
|
<header>
|
||||||
<div class="left">
|
<div class="left">
|
||||||
|
<app-pop-out [show]="!showSelect"></app-pop-out>
|
||||||
<button type="button" appBlurClick (click)="close()" *ngIf="showSelect">{{'cancel' | i18n}}</button>
|
<button type="button" appBlurClick (click)="close()" *ngIf="showSelect">{{'cancel' | i18n}}</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="center">
|
<div class="center">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<header>
|
<header>
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<app-pop-out *ngIf="showPopout"></app-pop-out>
|
<app-pop-out [show]="!inSidebar"></app-pop-out>
|
||||||
<button type="button" appBlurClick (click)="refresh()" title="{{'refresh' | i18n}}" *ngIf="inSidebar">
|
<button type="button" appBlurClick (click)="refresh()" title="{{'refresh' | i18n}}" *ngIf="inSidebar">
|
||||||
<i class="fa fa-refresh fa-lg fa-fw"></i>
|
<i class="fa fa-refresh fa-lg fa-fw"></i>
|
||||||
</button>
|
</button>
|
||||||
|
@ -43,7 +43,6 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||||||
searchText: string;
|
searchText: string;
|
||||||
canAutofill = false;
|
canAutofill = false;
|
||||||
inSidebar = false;
|
inSidebar = false;
|
||||||
showPopout = true;
|
|
||||||
disableSearch = false;
|
disableSearch = false;
|
||||||
loaded = false;
|
loaded = false;
|
||||||
loadedTimeout: number;
|
loadedTimeout: number;
|
||||||
@ -55,7 +54,6 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||||||
private ngZone: NgZone, private broadcasterService: BroadcasterService,
|
private ngZone: NgZone, private broadcasterService: BroadcasterService,
|
||||||
private changeDetectorRef: ChangeDetectorRef, private syncService: SyncService) {
|
private changeDetectorRef: ChangeDetectorRef, private syncService: SyncService) {
|
||||||
this.inSidebar = popupUtilsService.inSidebar(window);
|
this.inSidebar = popupUtilsService.inSidebar(window);
|
||||||
this.showPopout = !this.inSidebar && !platformUtilsService.isSafari();
|
|
||||||
this.disableSearch = platformUtilsService.isEdge();
|
this.disableSearch = platformUtilsService.isEdge();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user