this.initialize()
}
+ getIdentifier () {
+ return 'FollowersListComponent'
+ }
+
acceptFollower (follow: ActorFollow) {
follow.state = 'accepted'
this.initialize()
}
+ getIdentifier () {
+ return 'FollowingListComponent'
+ }
+
async removeFollowing (follow: ActorFollow) {
const res = await this.confirmService.confirm(
this.i18n('Do you really want to unfollow {{host}}?', { host: follow.following.host }),
this.bytesPipe = new BytesPipe()
}
+ getIdentifier () {
+ return 'VideoRedundanciesListComponent'
+ }
+
ngOnInit () {
this.loadSelectLocalStorage()
this.initialize()
}
+ getIdentifier () {
+ return 'InstanceAccountBlocklistComponent'
+ }
+
unblockAccount (accountBlock: AccountBlock) {
const blockedAccount = accountBlock.blockedAccount
this.initialize()
}
+ getIdentifier () {
+ return 'InstanceServerBlocklistComponent'
+ }
+
unblockServer (serverBlock: ServerBlock) {
const host = serverBlock.blockedServer.host
this.initialize()
}
+ getIdentifier () {
+ return 'VideoAbuseListComponent'
+ }
+
openModerationCommentModal (videoAbuse: VideoAbuse) {
this.moderationCommentModal.openModal(videoAbuse)
}
]
}
+ getIdentifier () {
+ return 'VideoBlacklistListComponent'
+ }
+
getVideoUrl (videoBlacklist: VideoBlacklist) {
return Video.buildClientUrl(videoBlacklist.video.uuid)
}
this.initialize()
}
+ getIdentifier () {
+ return 'JobsComponent'
+ }
+
onJobStateOrTypeChanged () {
this.pagination.start = 0
]
}
+ getIdentifier () {
+ return 'UserListComponent'
+ }
+
openBanUserModal (users: User[]) {
for (const user of users) {
if (user.username === 'root') {
this.initialize()
}
+ getIdentifier () {
+ return 'MyAccountBlocklistComponent'
+ }
+
unblockAccount (accountBlock: AccountBlock) {
const blockedAccount = accountBlock.blockedAccount
this.initialize()
}
+ getIdentifier () {
+ return 'MyAccountServerBlocklistComponent'
+ }
+
unblockServer (serverBlock: ServerBlock) {
const host = serverBlock.blockedServer.host
this.initialize()
}
+ getIdentifier () {
+ return 'MyAccountOwnershipComponent'
+ }
+
createByString (account: Account) {
return Account.CREATE_BY_STRING(account.name, account.host)
}
constructor (
private notifier: Notifier,
- private videoImportService: VideoImportService,
- private i18n: I18n
+ private videoImportService: VideoImportService
) {
super()
}
this.initialize()
}
+ getIdentifier () {
+ return 'MyAccountVideoImportsComponent'
+ }
+
isVideoImportSuccess (videoImport: VideoImport) {
return videoImport.state.id === VideoImportState.SUCCESS
}
protected search: string
private searchStream: Subject<string>
- private sortLocalStorageKey = 'rest-table-sort-' + this.constructor.name
+
+ abstract getIdentifier (): string
initialize () {
this.loadSort()
}
loadSort () {
- const result = peertubeLocalStorage.getItem(this.sortLocalStorageKey)
+ const result = peertubeLocalStorage.getItem(this.getSortLocalStorageKey())
if (result) {
try {
this.sort = JSON.parse(result)
} catch (err) {
- console.error('Cannot load sort of local storage key ' + this.sortLocalStorageKey, err)
+ console.error('Cannot load sort of local storage key ' + this.getSortLocalStorageKey(), err)
}
}
}
}
saveSort () {
- peertubeLocalStorage.setItem(this.sortLocalStorageKey, JSON.stringify(this.sort))
+ peertubeLocalStorage.setItem(this.getSortLocalStorageKey(), JSON.stringify(this.sort))
}
initSearch () {
}
protected abstract loadData (): void
+
+ private getSortLocalStorageKey () {
+ return 'rest-table-sort-' + this.getIdentifier()
+ }
}