import { Component, ElementRef, EventEmitter, OnInit, Output, ViewChild } from '@angular/core'
-import { NotificationsService } from 'angular2-notifications'
+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 { 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 { AuthService } from '@app/core'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
@Component({
protected formValidatorService: FormValidatorService,
private videoChangeOwnershipValidatorsService: VideoAcceptOwnershipValidatorsService,
private videoOwnershipService: VideoOwnershipService,
- private notificationsService: NotificationsService,
+ private notifier: Notifier,
private authService: AuthService,
private videoChannelService: VideoChannelService,
private modalService: NgbModal,
.acceptOwnership(videoChangeOwnership.id, { channelId: channel })
.subscribe(
() => {
- this.notificationsService.success(this.i18n('Success'), this.i18n('Ownership accepted'))
+ this.notifier.success(this.i18n('Ownership accepted'))
if (this.accepted) this.accepted.emit()
this.videoChangeOwnership = undefined
},
- err => this.notificationsService.error(this.i18n('Error'), err.message)
+ err => this.notifier.error(err.message)
)
}
}