webNotifications: { [ id in keyof UserNotificationSetting ]: boolean } = {} as any
labelNotifications: { [ id in keyof UserNotificationSetting ]: string } = {} as any
rightNotifications: { [ id in keyof Partial<UserNotificationSetting> ]: UserRight } = {} as any
- emailEnabled: boolean
+ emailEnabled = false
private savePreferences = debounce(this.savePreferencesImpl.bind(this), 500)
private serverService: ServerService,
private notifier: Notifier
) {
-
this.labelNotifications = {
newVideoFromSubscription: this.i18n('New video from your subscriptions'),
newCommentOnMyVideo: this.i18n('New comment on your video'),
newInstanceFollower: UserRight.MANAGE_SERVER_FOLLOW,
autoInstanceFollowing: UserRight.MANAGE_CONFIGURATION
}
-
- this.emailEnabled = this.serverService.getConfig().email.enabled
}
ngOnInit () {
+ this.serverService.getConfig()
+ .subscribe(config => {
+ this.emailEnabled = config.email.enabled
+ })
+
this.userInformationLoaded.subscribe(() => this.loadNotificationSettings())
}