return follow.follower.name + '@' + follow.follower.host
}
- protected reloadData () {
+ protected reloadDataInternal () {
this.followService.getFollowers({ pagination: this.pagination, sort: this.sort, search: this.search })
.subscribe({
next: resultList => {
}
async removeFollowing (follows: ActorFollow[]) {
+ const icuParams = { count: follows.length, entryName: this.buildFollowingName(follows[0]) }
+
const message = prepareIcu($localize`Do you really want to unfollow {count, plural, =1 {{entryName}?} other {{count} entries?}}`)(
- { count: follows.length, entryName: this.buildFollowingName(follows[0]) },
+ icuParams,
$localize`Do you really want to unfollow these entries?`
)
next: () => {
// eslint-disable-next-line max-len
const message = prepareIcu($localize`You are not following {count, plural, =1 {{entryName} anymore.} other {these {count} entries anymore.}}`)(
- { count: follows.length, entryName: this.buildFollowingName(follows[0]) },
+ icuParams,
$localize`You are not following them anymore.`
)
})
}
- protected reloadData () {
+ protected reloadDataInternal () {
this.followService.getFollowing({ pagination: this.pagination, sort: this.sort, search: this.search })
.subscribe({
next: resultList => {
}
- protected reloadData () {
+ protected reloadDataInternal () {
const options = {
pagination: this.pagination,
sort: this.sort,
this.reloadData()
}
- protected reloadData () {
+ protected reloadDataInternal () {
this.adminRegistrationService.listRegistrations({
pagination: this.pagination,
sort: this.sort,
})
}
- protected reloadData () {
+ protected reloadDataInternal () {
this.videoBlocklistService.listBlocks({
pagination: this.pagination,
sort: this.sort,
search: this.search
- })
- .subscribe({
- next: async resultList => {
- this.totalRecords = resultList.total
+ }).subscribe({
+ next: async resultList => {
+ this.totalRecords = resultList.total
- this.blocklist = resultList.data
+ this.blocklist = resultList.data
- for (const element of this.blocklist) {
- Object.assign(element, {
- reasonHtml: await this.toHtml(element.reason)
- })
- }
- },
+ for (const element of this.blocklist) {
+ Object.assign(element, {
+ reasonHtml: await this.toHtml(element.reason)
+ })
+ }
+ },
- error: err => this.notifier.error(err.message)
- })
+ error: err => this.notifier.error(err.message)
+ })
}
}
return this.markdownRenderer.textMarkdownToHTML({ markdown: text, withHtml: true, withEmoji: true })
}
- reloadData () {
+ protected reloadDataInternal () {
this.videoCommentService.getAdminVideoComments({
pagination: this.pagination,
sort: this.sort,
})
}
- protected reloadData () {
- this.selectedRows = []
-
+ protected reloadDataInternal () {
this.userAdminService.getUsers({
pagination: this.pagination,
sort: this.sort,
return files.reduce((p, f) => p += f.size, 0)
}
- reloadData () {
- this.selectedRows = []
+ async removeVideoFile (video: Video, file: VideoFile, type: 'hls' | 'webtorrent') {
+ const message = $localize`Are you sure you want to delete this ${file.resolution.label} file?`
+ const res = await this.confirmService.confirm(message, $localize`Delete file`)
+ if (res === false) return
+
+ this.videoService.removeFile(video.uuid, file.id, type)
+ .subscribe({
+ next: () => {
+ this.notifier.success($localize`File removed.`)
+ this.reloadData()
+ },
+
+ error: err => this.notifier.error(err.message)
+ })
+ }
+ protected reloadDataInternal () {
this.loading = true
this.videoAdminService.getAdminVideos({
})
}
- async removeVideoFile (video: Video, file: VideoFile, type: 'hls' | 'webtorrent') {
- const message = $localize`Are you sure you want to delete this ${file.resolution.label} file?`
- const res = await this.confirmService.confirm(message, $localize`Delete file`)
- if (res === false) return
-
- this.videoService.removeFile(video.uuid, file.id, type)
- .subscribe({
- next: () => {
- this.notifier.success($localize`File removed.`)
- this.reloadData()
- },
-
- error: err => this.notifier.error(err.message)
- })
- }
-
private async removeVideos (videos: Video[]) {
const message = prepareIcu($localize`Are you sure you want to delete {count, plural, =1 {this video} other {these {count} videos}}?`)(
{ count: videos.length },
this.reloadData()
}
- protected reloadData () {
+ protected reloadDataInternal () {
let jobState = this.jobState as JobState
if (this.jobState === 'all') jobState = null
})
}
- protected reloadData () {
+ protected reloadDataInternal () {
return this.videoOwnershipService.getOwnershipChanges(this.pagination, this.sort)
.subscribe({
next: resultList => {
]
}
- protected reloadData () {
+ protected reloadDataInternal () {
this.error = undefined
this.authService.userInformationLoaded
})
}
- protected reloadData () {
+ protected reloadDataInternal () {
this.videoImportService.getMyVideoImports(this.pagination, this.sort, this.search)
.subscribe({
next: resultList => {
return this.selectedRows.length !== 0
}
- protected abstract reloadData (): void
+ protected abstract reloadDataInternal (): void
+
+ protected reloadData () {
+ this.selectedRows = []
+
+ this.reloadDataInternal()
+ }
private getSortLocalStorageKey () {
return 'rest-table-sort-' + this.getIdentifier()
return Actor.IS_LOCAL(abuse.reporterAccount.host)
}
- protected reloadData () {
+ protected reloadDataInternal () {
debugLogger('Loading data.')
const options = {
)
}
- protected reloadData () {
+ protected reloadDataInternal () {
const operation = this.mode === BlocklistComponentType.Account
? this.blocklistService.getUserAccountBlocklist({
pagination: this.pagination,
})
}
- protected reloadData () {
+ protected reloadDataInternal () {
const operation = this.mode === BlocklistComponentType.Account
? this.blocklistService.getUserServerBlocklist({
pagination: this.pagination,