aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-06-09 16:07:10 +0200
committerRigel Kent <sendmemail@rigelk.eu>2020-06-10 21:12:09 +0200
commit3487330d308166afb542cbacae0475693c0b059e (patch)
tree6a7b6ea3dd105661354bf0df6c6d3f7a7abe64e8 /client/src/app/+admin
parent5baee5fca418487e72ddcd6419d31bca8659b668 (diff)
downloadPeerTube-3487330d308166afb542cbacae0475693c0b059e.tar.gz
PeerTube-3487330d308166afb542cbacae0475693c0b059e.tar.zst
PeerTube-3487330d308166afb542cbacae0475693c0b059e.zip
preserve original variable names server-side
Diffstat (limited to 'client/src/app/+admin')
-rw-r--r--client/src/app/+admin/admin.component.ts2
-rw-r--r--client/src/app/+admin/moderation/moderation.component.ts2
-rw-r--r--client/src/app/+admin/moderation/moderation.routes.ts2
-rw-r--r--client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts4
-rw-r--r--client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts14
-rw-r--r--client/src/app/+admin/users/user-edit/user-create.component.ts2
-rw-r--r--client/src/app/+admin/users/user-edit/user-edit.component.html2
-rw-r--r--client/src/app/+admin/users/user-edit/user-edit.ts2
-rw-r--r--client/src/app/+admin/users/user-edit/user-update.component.ts4
9 files changed, 17 insertions, 17 deletions
diff --git a/client/src/app/+admin/admin.component.ts b/client/src/app/+admin/admin.component.ts
index 4cf3da0e8..a97a33cf5 100644
--- a/client/src/app/+admin/admin.component.ts
+++ b/client/src/app/+admin/admin.component.ts
@@ -37,7 +37,7 @@ export class AdminComponent implements OnInit {
37 } 37 }
38 38
39 hasVideoBlocklistRight () { 39 hasVideoBlocklistRight () {
40 return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLOCKS) 40 return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLACKLIST)
41 } 41 }
42 42
43 hasConfigRight () { 43 hasConfigRight () {
diff --git a/client/src/app/+admin/moderation/moderation.component.ts b/client/src/app/+admin/moderation/moderation.component.ts
index d48305eed..1b1df6f09 100644
--- a/client/src/app/+admin/moderation/moderation.component.ts
+++ b/client/src/app/+admin/moderation/moderation.component.ts
@@ -25,7 +25,7 @@ export class ModerationComponent implements OnInit {
25 } 25 }
26 26
27 hasVideoBlocklistRight () { 27 hasVideoBlocklistRight () {
28 return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLOCKS) 28 return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLACKLIST)
29 } 29 }
30 30
31 hasAccountsBlocklistRight () { 31 hasAccountsBlocklistRight () {
diff --git a/client/src/app/+admin/moderation/moderation.routes.ts b/client/src/app/+admin/moderation/moderation.routes.ts
index aeb555c4a..c08333f17 100644
--- a/client/src/app/+admin/moderation/moderation.routes.ts
+++ b/client/src/app/+admin/moderation/moderation.routes.ts
@@ -57,7 +57,7 @@ export const ModerationRoutes: Routes = [
57 component: VideoBlockListComponent, 57 component: VideoBlockListComponent,
58 canActivate: [ UserRightGuard ], 58 canActivate: [ UserRightGuard ],
59 data: { 59 data: {
60 userRight: UserRight.MANAGE_VIDEO_BLOCKS, 60 userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
61 meta: { 61 meta: {
62 title: 'Videos blocked' 62 title: 'Videos blocked'
63 } 63 }
diff --git a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts
index ca37bccf3..a36acc2ab 100644
--- a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts
+++ b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts
@@ -107,7 +107,7 @@ export class VideoAbuseListComponent extends RestTable implements OnInit, AfterV
107 this.videoBlocklistService.blockVideo(videoAbuse.video.id, undefined, true) 107 this.videoBlocklistService.blockVideo(videoAbuse.video.id, undefined, true)
108 .subscribe( 108 .subscribe(
109 () => { 109 () => {
110 this.notifier.success(this.i18n('Video blocklisted.')) 110 this.notifier.success(this.i18n('Video blocked.'))
111 111
112 this.updateVideoAbuseState(videoAbuse, VideoAbuseState.ACCEPTED) 112 this.updateVideoAbuseState(videoAbuse, VideoAbuseState.ACCEPTED)
113 }, 113 },
@@ -123,7 +123,7 @@ export class VideoAbuseListComponent extends RestTable implements OnInit, AfterV
123 this.videoBlocklistService.unblockVideo(videoAbuse.video.id) 123 this.videoBlocklistService.unblockVideo(videoAbuse.video.id)
124 .subscribe( 124 .subscribe(
125 () => { 125 () => {
126 this.notifier.success(this.i18n('Video unblocklisted.')) 126 this.notifier.success(this.i18n('Video unblocked.'))
127 127
128 this.updateVideoAbuseState(videoAbuse, VideoAbuseState.ACCEPTED) 128 this.updateVideoAbuseState(videoAbuse, VideoAbuseState.ACCEPTED)
129 }, 129 },
diff --git a/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts b/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts
index e72ab5348..7b3691332 100644
--- a/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts
+++ b/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts
@@ -3,7 +3,7 @@ import { SortMeta } from 'primeng/api'
3import { Notifier, ServerService } from '@app/core' 3import { Notifier, ServerService } from '@app/core'
4import { ConfirmService } from '../../../core' 4import { ConfirmService } from '../../../core'
5import { RestPagination, RestTable, VideoBlockService } from '../../../shared' 5import { RestPagination, RestTable, VideoBlockService } from '../../../shared'
6import { VideoBlocklist, VideoBlockType } from '../../../../../../shared' 6import { VideoBlacklist, VideoBlacklistType } from '../../../../../../shared'
7import { I18n } from '@ngx-translate/i18n-polyfill' 7import { I18n } from '@ngx-translate/i18n-polyfill'
8import { DropdownAction } from '../../../shared/buttons/action-dropdown.component' 8import { DropdownAction } from '../../../shared/buttons/action-dropdown.component'
9import { Video } from '../../../shared/video/video.model' 9import { Video } from '../../../shared/video/video.model'
@@ -18,13 +18,13 @@ import { VideoService } from '@app/shared/video/video.service'
18 styleUrls: [ '../moderation.component.scss', './video-block-list.component.scss' ] 18 styleUrls: [ '../moderation.component.scss', './video-block-list.component.scss' ]
19}) 19})
20export class VideoBlockListComponent extends RestTable implements OnInit { 20export class VideoBlockListComponent extends RestTable implements OnInit {
21 blocklist: (VideoBlocklist & { reasonHtml?: string })[] = [] 21 blocklist: (VideoBlacklist & { reasonHtml?: string })[] = []
22 totalRecords = 0 22 totalRecords = 0
23 sort: SortMeta = { field: 'createdAt', order: -1 } 23 sort: SortMeta = { field: 'createdAt', order: -1 }
24 pagination: RestPagination = { count: this.rowsPerPage, start: 0 } 24 pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
25 listBlockTypeFilter: VideoBlockType = undefined 25 blocklistTypeFilter: VideoBlacklistType = undefined
26 26
27 videoBlocklistActions: DropdownAction<VideoBlocklist>[][] = [] 27 videoBlocklistActions: DropdownAction<VideoBlacklist>[][] = []
28 28
29 constructor ( 29 constructor (
30 private notifier: Notifier, 30 private notifier: Notifier,
@@ -99,7 +99,7 @@ export class VideoBlockListComponent extends RestTable implements OnInit {
99 .subscribe(config => { 99 .subscribe(config => {
100 // don't filter if auto-blacklist is not enabled as this will be the only list 100 // don't filter if auto-blacklist is not enabled as this will be the only list
101 if (config.autoBlacklist.videos.ofUsers.enabled) { 101 if (config.autoBlacklist.videos.ofUsers.enabled) {
102 this.listBlockTypeFilter = VideoBlockType.MANUAL 102 this.blocklistTypeFilter = VideoBlacklistType.MANUAL
103 } 103 }
104 }) 104 })
105 105
@@ -141,7 +141,7 @@ export class VideoBlockListComponent extends RestTable implements OnInit {
141 return 'VideoBlockListComponent' 141 return 'VideoBlockListComponent'
142 } 142 }
143 143
144 getVideoUrl (videoBlock: VideoBlocklist) { 144 getVideoUrl (videoBlock: VideoBlacklist) {
145 return Video.buildClientUrl(videoBlock.video.uuid) 145 return Video.buildClientUrl(videoBlock.video.uuid)
146 } 146 }
147 147
@@ -155,7 +155,7 @@ export class VideoBlockListComponent extends RestTable implements OnInit {
155 return this.markdownRenderer.textMarkdownToHTML(text) 155 return this.markdownRenderer.textMarkdownToHTML(text)
156 } 156 }
157 157
158 async unblockVideo (entry: VideoBlocklist) { 158 async unblockVideo (entry: VideoBlacklist) {
159 const confirmMessage = this.i18n( 159 const confirmMessage = this.i18n(
160 'Do you really want to unblock this video? It will be available again in the videos list.' 160 'Do you really want to unblock this video? It will be available again in the videos list.'
161 ) 161 )
diff --git a/client/src/app/+admin/users/user-edit/user-create.component.ts b/client/src/app/+admin/users/user-edit/user-create.component.ts
index a394418cb..b459eb8fa 100644
--- a/client/src/app/+admin/users/user-edit/user-create.component.ts
+++ b/client/src/app/+admin/users/user-edit/user-create.component.ts
@@ -52,7 +52,7 @@ export class UserCreateComponent extends UserEdit implements OnInit {
52 role: this.userValidatorsService.USER_ROLE, 52 role: this.userValidatorsService.USER_ROLE,
53 videoQuota: this.userValidatorsService.USER_VIDEO_QUOTA, 53 videoQuota: this.userValidatorsService.USER_VIDEO_QUOTA,
54 videoQuotaDaily: this.userValidatorsService.USER_VIDEO_QUOTA_DAILY, 54 videoQuotaDaily: this.userValidatorsService.USER_VIDEO_QUOTA_DAILY,
55 byPassAutoBlacklist: null 55 byPassAutoBlock: null
56 }, defaultValues) 56 }, defaultValues)
57 } 57 }
58 58
diff --git a/client/src/app/+admin/users/user-edit/user-edit.component.html b/client/src/app/+admin/users/user-edit/user-edit.component.html
index d30a606d6..0454df7b7 100644
--- a/client/src/app/+admin/users/user-edit/user-edit.component.html
+++ b/client/src/app/+admin/users/user-edit/user-edit.component.html
@@ -164,7 +164,7 @@
164 164
165 <div class="form-group"> 165 <div class="form-group">
166 <my-peertube-checkbox 166 <my-peertube-checkbox
167 inputName="byPassAutoBlacklist" formControlName="byPassAutoBlacklist" 167 inputName="byPassAutoBlock" formControlName="byPassAutoBlock"
168 i18n-labelText labelText="Doesn't need review before a video goes public" 168 i18n-labelText labelText="Doesn't need review before a video goes public"
169 ></my-peertube-checkbox> 169 ></my-peertube-checkbox>
170 </div> 170 </div>
diff --git a/client/src/app/+admin/users/user-edit/user-edit.ts b/client/src/app/+admin/users/user-edit/user-edit.ts
index 98249bcc1..5f5cc590c 100644
--- a/client/src/app/+admin/users/user-edit/user-edit.ts
+++ b/client/src/app/+admin/users/user-edit/user-edit.ts
@@ -88,7 +88,7 @@ export abstract class UserEdit extends FormReactive implements OnInit {
88 } 88 }
89 89
90 protected buildAdminFlags (formValue: any) { 90 protected buildAdminFlags (formValue: any) {
91 return formValue.byPassAutoBlacklist ? UserAdminFlag.BYPASS_VIDEO_AUTO_BLOCK : UserAdminFlag.NONE 91 return formValue.byPassAutoBlock ? UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST : UserAdminFlag.NONE
92 } 92 }
93 93
94 protected buildQuotaOptions () { 94 protected buildQuotaOptions () {
diff --git a/client/src/app/+admin/users/user-edit/user-update.component.ts b/client/src/app/+admin/users/user-edit/user-update.component.ts
index f2bd8c8ec..035c0d4bb 100644
--- a/client/src/app/+admin/users/user-edit/user-update.component.ts
+++ b/client/src/app/+admin/users/user-edit/user-update.component.ts
@@ -56,7 +56,7 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy {
56 role: this.userValidatorsService.USER_ROLE, 56 role: this.userValidatorsService.USER_ROLE,
57 videoQuota: this.userValidatorsService.USER_VIDEO_QUOTA, 57 videoQuota: this.userValidatorsService.USER_VIDEO_QUOTA,
58 videoQuotaDaily: this.userValidatorsService.USER_VIDEO_QUOTA_DAILY, 58 videoQuotaDaily: this.userValidatorsService.USER_VIDEO_QUOTA_DAILY,
59 byPassAutoBlacklist: null 59 byPassAutoBlock: null
60 }, defaultValues) 60 }, defaultValues)
61 61
62 this.paramsSub = this.route.params.subscribe(routeParams => { 62 this.paramsSub = this.route.params.subscribe(routeParams => {
@@ -125,7 +125,7 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy {
125 role: userJson.role.toString(), 125 role: userJson.role.toString(),
126 videoQuota: userJson.videoQuota, 126 videoQuota: userJson.videoQuota,
127 videoQuotaDaily: userJson.videoQuotaDaily, 127 videoQuotaDaily: userJson.videoQuotaDaily,
128 byPassAutoBlacklist: userJson.adminFlags & UserAdminFlag.BYPASS_VIDEO_AUTO_BLOCK 128 byPassAutoBlock: userJson.adminFlags & UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST
129 }) 129 })
130 } 130 }
131} 131}