mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 09:49:20 +02:00
Better live notification label
This commit is contained in:
parent
d5c4cc2b44
commit
82246a0c8d
13 changed files with 73 additions and 35 deletions
|
@ -12,6 +12,7 @@ import { ActorFollowModel } from '../actor/actor-follow.js'
|
|||
import { ApplicationModel } from '../application/application.js'
|
||||
import { PluginModel } from '../server/plugin.js'
|
||||
import { SequelizeModel, throwIfNotValid } from '../shared/index.js'
|
||||
import { getStateLabel } from '../video/formatter/video-api-format.js'
|
||||
import { VideoBlacklistModel } from '../video/video-blacklist.js'
|
||||
import { VideoCaptionModel } from '../video/video-caption.js'
|
||||
import { VideoCommentModel } from '../video/video-comment.js'
|
||||
|
@ -490,7 +491,11 @@ export class UserNotificationModel extends SequelizeModel<UserNotificationModel>
|
|||
id: video.id,
|
||||
uuid: video.uuid,
|
||||
shortUUID: uuidToShort(video.uuid),
|
||||
name: video.name
|
||||
name: video.name,
|
||||
state: {
|
||||
id: video.state,
|
||||
label: getStateLabel(video.state)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -500,12 +505,7 @@ export class UserNotificationModel extends SequelizeModel<UserNotificationModel>
|
|||
threadId: abuse.VideoCommentAbuse.VideoComment.getThreadId(),
|
||||
|
||||
video: abuse.VideoCommentAbuse.VideoComment.Video
|
||||
? {
|
||||
id: abuse.VideoCommentAbuse.VideoComment.Video.id,
|
||||
name: abuse.VideoCommentAbuse.VideoComment.Video.name,
|
||||
shortUUID: uuidToShort(abuse.VideoCommentAbuse.VideoComment.Video.uuid),
|
||||
uuid: abuse.VideoCommentAbuse.VideoComment.Video.uuid
|
||||
}
|
||||
? this.formatVideo(abuse.VideoCommentAbuse.VideoComment.Video)
|
||||
: undefined
|
||||
}
|
||||
: undefined
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue