mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 10:43:35 +00:00
Merge pull request #1491 from Hinton/feature/safari-webext
Safari Web Extension Port from App Extension
This commit is contained in:
@@ -58,13 +58,12 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
||||
// ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1562620
|
||||
this.initU2f = false;
|
||||
}
|
||||
const isSafari = this.platformUtilsService.isSafari();
|
||||
await super.ngOnInit();
|
||||
if (this.selectedProviderType == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isSafari && this.selectedProviderType === TwoFactorProviderType.Email &&
|
||||
if (this.selectedProviderType === TwoFactorProviderType.Email &&
|
||||
this.popupUtilsService.inPopup(window)) {
|
||||
const confirmed = await this.platformUtilsService.showDialog(this.i18nService.t('popup2faCloseMessage'),
|
||||
null, this.i18nService.t('yes'), this.i18nService.t('no'));
|
||||
|
||||
@@ -185,8 +185,6 @@ export const routerTransition = trigger('routerTransition', [
|
||||
|
||||
transition('tabs => premium', inSlideLeft),
|
||||
transition('premium => tabs', outSlideRight),
|
||||
]);
|
||||
|
||||
if (!BrowserApi.isSafariApi) {
|
||||
routerTransition.definitions.push(transition('tabs => lock', inSlideDown));
|
||||
}
|
||||
transition('tabs => lock', inSlideDown),
|
||||
]);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<ng-container *ngIf="show">
|
||||
<ng-container>
|
||||
<button (click)="expand()" appA11yTitle="{{'popOutNewWindow' | i18n}}">
|
||||
<i class="fa fa-external-link fa-rotate-270 fa-lg fa-fw" aria-hidden="true"></i>
|
||||
</button>
|
||||
|
||||
@@ -22,8 +22,7 @@ export class PopOutComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
if (this.show) {
|
||||
this.show = !this.platformUtilsService.isSafari();
|
||||
if (this.show && this.popupUtilsService.inSidebar(window) && this.platformUtilsService.isFirefox()) {
|
||||
if (this.popupUtilsService.inSidebar(window) && this.platformUtilsService.isFirefox()) {
|
||||
this.show = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,8 +68,6 @@ export class PopupUtilsService {
|
||||
chrome.tabs.create({
|
||||
url: href,
|
||||
});
|
||||
} else if ((typeof safari !== 'undefined')) {
|
||||
// Safari can't open popup in full page tab :(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
</div>
|
||||
<div class="box-footer">{{'disableChangedPasswordNotificationDesc' | i18n}}</div>
|
||||
</div>
|
||||
<div class="box" *ngIf="showDisableContextMenu">
|
||||
<div class="box">
|
||||
<div class="box-content">
|
||||
<div class="box-content-row box-content-row-checkbox" appBoxRow>
|
||||
<label for="context-menu">{{'disableContextMenuItem' | i18n}}</label>
|
||||
|
||||
@@ -29,7 +29,6 @@ export class OptionsComponent implements OnInit {
|
||||
disableChangedPasswordNotification = false;
|
||||
dontShowCards = false;
|
||||
dontShowIdentities = false;
|
||||
showDisableContextMenu = true;
|
||||
showClearClipboard = true;
|
||||
theme: string;
|
||||
themeOptions: any[];
|
||||
@@ -68,8 +67,6 @@ export class OptionsComponent implements OnInit {
|
||||
}
|
||||
|
||||
async ngOnInit() {
|
||||
this.showDisableContextMenu = !this.platformUtilsService.isSafari();
|
||||
|
||||
this.enableAutoFillOnPageLoad = await this.storageService.get<boolean>(
|
||||
ConstantsService.enableAutoFillOnPageLoadKey);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<header>
|
||||
<div class="left" *ngIf="showLeftHeader">
|
||||
<div class="left">
|
||||
<app-pop-out [show]="!inSidebar"></app-pop-out>
|
||||
<button type="button" appBlurClick (click)="refresh()" appA11yTitle="{{'refresh' | i18n}}" *ngIf="inSidebar">
|
||||
<i class="fa fa-retweet fa-lg fa-fw" aria-hidden="true"></i>
|
||||
|
||||
@@ -49,7 +49,6 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
||||
hostname: string;
|
||||
searchText: string;
|
||||
inSidebar = false;
|
||||
showLeftHeader = false;
|
||||
searchTypeSearch = false;
|
||||
loaded = false;
|
||||
|
||||
@@ -68,7 +67,7 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
async ngOnInit() {
|
||||
this.showLeftHeader = this.searchTypeSearch = !this.platformUtilsService.isSafari();
|
||||
this.searchTypeSearch = !this.platformUtilsService.isSafari();
|
||||
this.inSidebar = this.popupUtilsService.inSidebar(window);
|
||||
|
||||
this.broadcasterService.subscribe(BroadcasterSubscriptionId, (message: any) => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<header>
|
||||
<div class="left" *ngIf="showLeftHeader">
|
||||
<div class="left">
|
||||
<app-pop-out></app-pop-out>
|
||||
</div>
|
||||
<div class="search">
|
||||
|
||||
@@ -92,8 +92,7 @@ export class GroupingsComponent extends BaseGroupingsComponent implements OnInit
|
||||
|
||||
async ngOnInit() {
|
||||
this.searchTypeSearch = !this.platformUtilsService.isSafari();
|
||||
this.showLeftHeader = !this.platformUtilsService.isSafari() &&
|
||||
!(this.popupUtils.inSidebar(window) && this.platformUtilsService.isFirefox());
|
||||
this.showLeftHeader = !(this.popupUtils.inSidebar(window) && this.platformUtilsService.isFirefox());
|
||||
this.stateService.remove('CiphersComponent');
|
||||
|
||||
this.broadcasterService.subscribe(ComponentId, (message: any) => {
|
||||
|
||||
Reference in New Issue
Block a user