mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +00:00
Fix ModalService refactor bugs (#1168)
This commit is contained in:
@@ -124,7 +124,7 @@ export class ClientsComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async addExistingOrganization() {
|
async addExistingOrganization() {
|
||||||
const [modal, childComponent] = await this.modalService.openViewRef(AddOrganizationComponent, this.addModalRef, comp => {
|
const [modal] = await this.modalService.openViewRef(AddOrganizationComponent, this.addModalRef, comp => {
|
||||||
comp.providerId = this.providerId;
|
comp.providerId = this.providerId;
|
||||||
comp.organizations = this.addableOrganizations;
|
comp.organizations = this.addableOrganizations;
|
||||||
comp.onAddedOrganization.subscribe(async () => {
|
comp.onAddedOrganization.subscribe(async () => {
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { ComponentFactoryResolver } from '@angular/core';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
|
|
||||||
|
import { ModalService } from 'jslib-angular/services/modal.service';
|
||||||
|
|
||||||
import { ProviderGuardService } from './services/provider-guard.service';
|
import { ProviderGuardService } from './services/provider-guard.service';
|
||||||
import { ProviderTypeGuardService } from './services/provider-type-guard.service';
|
import { ProviderTypeGuardService } from './services/provider-type-guard.service';
|
||||||
import { ProviderService } from './services/provider.service';
|
import { ProviderService } from './services/provider.service';
|
||||||
@@ -59,4 +62,8 @@ import { OssModule } from 'src/app/oss.module';
|
|||||||
ProviderTypeGuardService,
|
ProviderTypeGuardService,
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class ProvidersModule {}
|
export class ProvidersModule {
|
||||||
|
constructor(modalService: ModalService, componentFactoryResolver: ComponentFactoryResolver) {
|
||||||
|
modalService.registerComponentFactoryResolver(AddOrganizationComponent, componentFactoryResolver);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
2
jslib
2
jslib
Submodule jslib updated: f02720a1c6...d50531886b
@@ -72,7 +72,7 @@ export class SendComponent extends BaseSendComponent {
|
|||||||
|
|
||||||
async editSend(send: SendView) {
|
async editSend(send: SendView) {
|
||||||
const [modal, childComponent] = await this.modalService.openViewRef(AddEditComponent, this.sendAddEditModalRef, comp => {
|
const [modal, childComponent] = await this.modalService.openViewRef(AddEditComponent, this.sendAddEditModalRef, comp => {
|
||||||
childComponent.sendId = send == null ? null : send.id;
|
comp.sendId = send == null ? null : send.id;
|
||||||
comp.onSavedSend.subscribe(async (s: SendView) => {
|
comp.onSavedSend.subscribe(async (s: SendView) => {
|
||||||
modal.close();
|
modal.close();
|
||||||
await this.load();
|
await this.load();
|
||||||
|
|||||||
Reference in New Issue
Block a user