X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Bmy-account%2Fmy-account-ownership%2Fmy-account-accept-ownership%2Fmy-account-accept-ownership.component.ts;h=0e62b5ca545c2e9c146e6d0ad23f4cf60936c3eb;hb=8c360747995e17eb5520e22fc3d7bd4c3d26eeee;hp=79d29b139ff0507a2fa21d2b2a2b72fffd029501;hpb=f8b2c1b4f509c037b9650cca2c5befd21f056df3;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.ts b/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.ts index 79d29b139..0e62b5ca5 100644 --- a/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.ts +++ b/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.ts @@ -1,14 +1,10 @@ import { Component, ElementRef, EventEmitter, OnInit, Output, ViewChild } from '@angular/core' import { AuthService, Notifier } from '@app/core' -import { FormReactive } from '@app/shared' -import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' -import { VideoOwnershipService } from '@app/shared/video-ownership' -import { VideoChangeOwnership } from '../../../../../../shared/models/videos' -import { VideoAcceptOwnershipValidatorsService } from '@app/shared/forms/form-validators' -import { VideoChannel } from '@app/shared/video-channel/video-channel.model' -import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' -import { I18n } from '@ngx-translate/i18n-polyfill' +import { FormReactive, FormValidatorService, VideoAcceptOwnershipValidatorsService } from '@app/shared/shared-forms' +import { VideoChannelService, VideoOwnershipService } from '@app/shared/shared-main' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' +import { I18n } from '@ngx-translate/i18n-polyfill' +import { VideoChangeOwnership, VideoChannel } from '@shared/models' @Component({ selector: 'my-account-accept-ownership', @@ -18,7 +14,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap' export class MyAccountAcceptOwnershipComponent extends FormReactive implements OnInit { @Output() accepted = new EventEmitter() - @ViewChild('modal') modal: ElementRef + @ViewChild('modal', { static: true }) modal: ElementRef videoChangeOwnership: VideoChangeOwnership | undefined = undefined @@ -53,7 +49,7 @@ export class MyAccountAcceptOwnershipComponent extends FormReactive implements O show (videoChangeOwnership: VideoChangeOwnership) { this.videoChangeOwnership = videoChangeOwnership this.modalService - .open(this.modal) + .open(this.modal, { centered: true }) .result .then(() => this.acceptOwnership()) .catch(() => this.videoChangeOwnership = undefined)