Add newInstanceFollower in notification settings

pull/1765/head
Chocobozzz 2019-04-09 08:18:59 +02:00
parent 883993c81e
commit 846751c98b
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 6 additions and 3 deletions

View File

@ -42,14 +42,16 @@ export class MyAccountNotificationPreferencesComponent implements OnInit {
myVideoImportFinished: this.i18n('Video import finished'), myVideoImportFinished: this.i18n('Video import finished'),
newUserRegistration: this.i18n('A new user registered on your instance'), newUserRegistration: this.i18n('A new user registered on your instance'),
newFollow: this.i18n('You or your channel(s) has a new follower'), newFollow: this.i18n('You or your channel(s) has a new follower'),
commentMention: this.i18n('Someone mentioned you in video comments') commentMention: this.i18n('Someone mentioned you in video comments'),
newInstanceFollower: this.i18n('Your instance has a new follower')
} }
this.notificationSettingKeys = Object.keys(this.labelNotifications) as (keyof UserNotificationSetting)[] this.notificationSettingKeys = Object.keys(this.labelNotifications) as (keyof UserNotificationSetting)[]
this.rightNotifications = { this.rightNotifications = {
videoAbuseAsModerator: UserRight.MANAGE_VIDEO_ABUSES, videoAbuseAsModerator: UserRight.MANAGE_VIDEO_ABUSES,
videoAutoBlacklistAsModerator: UserRight.MANAGE_VIDEO_BLACKLIST, videoAutoBlacklistAsModerator: UserRight.MANAGE_VIDEO_BLACKLIST,
newUserRegistration: UserRight.MANAGE_USERS newUserRegistration: UserRight.MANAGE_USERS,
newInstanceFollower: UserRight.MANAGE_SERVER_FOLLOW
} }
this.emailEnabled = this.serverService.getConfig().email.enabled this.emailEnabled = this.serverService.getConfig().email.enabled

View File

@ -1,4 +1,4 @@
import { UserNotification as UserNotificationServer, UserNotificationType, VideoInfo, ActorInfo } from '../../../../../shared' import { ActorInfo, FollowState, UserNotification as UserNotificationServer, UserNotificationType, VideoInfo } from '../../../../../shared'
import { Actor } from '@app/shared/actor/actor.model' import { Actor } from '@app/shared/actor/actor.model'
export class UserNotification implements UserNotificationServer { export class UserNotification implements UserNotificationServer {
@ -39,6 +39,7 @@ export class UserNotification implements UserNotificationServer {
actorFollow?: { actorFollow?: {
id: number id: number
state: FollowState
follower: ActorInfo & { avatarUrl?: string } follower: ActorInfo & { avatarUrl?: string }
following: { following: {
type: 'account' | 'channel' type: 'account' | 'channel'