mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 10:43:35 +00:00
Merge branch 'master' of https://github.com/bitwarden/browser into feature/safari-webext
# Conflicts: # src/background/runtime.background.ts
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
import { ConstantsService } from 'jslib/services/constants.service'
|
||||
import { ConstantsService } from 'jslib/services/constants.service';
|
||||
import { CryptoFunctionService } from 'jslib/abstractions/cryptoFunction.service';
|
||||
import { EnvironmentService } from 'jslib/abstractions/environment.service';
|
||||
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||||
|
||||
@@ -25,6 +25,7 @@ import { BroadcasterService } from 'jslib/angular/services/broadcaster.service';
|
||||
import { TwoFactorComponent as BaseTwoFactorComponent } from 'jslib/angular/components/two-factor.component';
|
||||
|
||||
import { PopupUtilsService } from '../services/popup-utils.service';
|
||||
import { BrowserApi } from '../../browser/browserApi';
|
||||
|
||||
const BroadcasterSubscriptionId = 'TwoFactorComponent';
|
||||
|
||||
@@ -37,7 +38,7 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
||||
|
||||
constructor(authService: AuthService, router: Router,
|
||||
i18nService: I18nService, apiService: ApiService,
|
||||
platformUtilsService: PlatformUtilsService, syncService: SyncService,
|
||||
platformUtilsService: PlatformUtilsService, private syncService: SyncService,
|
||||
environmentService: EnvironmentService, private ngZone: NgZone,
|
||||
private broadcasterService: BroadcasterService, private changeDetectorRef: ChangeDetectorRef,
|
||||
private popupUtilsService: PopupUtilsService, stateService: StateService,
|
||||
@@ -80,6 +81,20 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
||||
this.popupUtilsService.popOut(window);
|
||||
}
|
||||
}
|
||||
|
||||
const queryParamsSub = this.route.queryParams.subscribe(async (qParams) => {
|
||||
if (qParams.sso === 'true') {
|
||||
super.onSuccessfulLogin = () => {
|
||||
BrowserApi.reloadOpenWindows();
|
||||
const thisWindow = window.open('', '_self');
|
||||
thisWindow.close();
|
||||
return this.syncService.fullSync(true);
|
||||
};
|
||||
if (queryParamsSub != null) {
|
||||
queryParamsSub.unsubscribe();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
<select id="format" name="Format" [(ngModel)]="format">
|
||||
<option value="json">.json</option>
|
||||
<option value="csv">.csv</option>
|
||||
<option value="encrypted_json">.json (Encrypted)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="box-content-row box-content-row-flex" appBoxRow>
|
||||
@@ -40,7 +41,13 @@
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<p>{{'exportMasterPassword' | i18n}}</p>
|
||||
<strong>{{'warning' | i18n}}</strong>: {{'exportWarningDesc' | i18n}}
|
||||
<strong>{{'warning' | i18n}}</strong>:
|
||||
<span *ngIf="!encryptedFormat">
|
||||
{{'exportWarningDesc' | i18n}}
|
||||
</span>
|
||||
<span *ngIf="encryptedFormat">
|
||||
{{'encExportWarningDesc' | i18n}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</content>
|
||||
|
||||
@@ -340,7 +340,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box" *ngIf="(!editMode || cloneMode) && ownershipOptions && ownershipOptions.length > 1">
|
||||
<div class="box" *ngIf="allowOwnershipOptions()">
|
||||
<div class="box-header">
|
||||
{{'ownership' | i18n}}
|
||||
</div>
|
||||
|
||||
@@ -15,6 +15,7 @@ import { FolderService } from 'jslib/abstractions/folder.service';
|
||||
import { I18nService } from 'jslib/abstractions/i18n.service';
|
||||
import { MessagingService } from 'jslib/abstractions/messaging.service';
|
||||
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||||
import { PolicyService } from 'jslib/abstractions/policy.service';
|
||||
import { StateService } from 'jslib/abstractions/state.service';
|
||||
import { UserService } from 'jslib/abstractions/user.service';
|
||||
|
||||
@@ -36,9 +37,9 @@ export class AddEditComponent extends BaseAddEditComponent {
|
||||
userService: UserService, collectionService: CollectionService,
|
||||
messagingService: MessagingService, private route: ActivatedRoute,
|
||||
private router: Router, private location: Location,
|
||||
eventService: EventService) {
|
||||
eventService: EventService, policyService: PolicyService) {
|
||||
super(cipherService, folderService, i18nService, platformUtilsService, auditService, stateService,
|
||||
userService, collectionService, messagingService, eventService);
|
||||
userService, collectionService, messagingService, eventService, policyService);
|
||||
}
|
||||
|
||||
async ngOnInit() {
|
||||
@@ -161,4 +162,9 @@ export class AddEditComponent extends BaseAddEditComponent {
|
||||
const u = (uri as any);
|
||||
u.showCurrentUris = !u.showCurrentUris;
|
||||
}
|
||||
|
||||
allowOwnershipOptions(): boolean {
|
||||
return (!this.editMode || this.cloneMode) && this.ownershipOptions
|
||||
&& (this.ownershipOptions.length > 1 || !this.allowPersonal);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user