From 5baee5fca418487e72ddcd6419d31bca8659b668 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Tue, 2 Jun 2020 20:50:42 +0200 Subject: rename blacklist to block/blocklist, merge block and auto-block views - also replace whitelist with allowlist - add advanced filters for video-block-list view - move icons in video-block-list and video-abuse-list to left side for visibility - add robot icon to depict automated nature of a block in video-block-list resolves #2790 --- shared/models/users/user-flag.model.ts | 2 +- shared/models/users/user-notification.model.ts | 6 +++--- shared/models/users/user-right.enum.ts | 2 +- shared/models/users/user-role.ts | 2 +- shared/models/videos/blacklist/video-blacklist.model.ts | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'shared/models') diff --git a/shared/models/users/user-flag.model.ts b/shared/models/users/user-flag.model.ts index f5759f18f..e8b5a5c50 100644 --- a/shared/models/users/user-flag.model.ts +++ b/shared/models/users/user-flag.model.ts @@ -1,4 +1,4 @@ export enum UserAdminFlag { NONE = 0, - BY_PASS_VIDEO_AUTO_BLACKLIST = 1 << 0 + BYPASS_VIDEO_AUTO_BLOCK = 1 << 0 } diff --git a/shared/models/users/user-notification.model.ts b/shared/models/users/user-notification.model.ts index e9be1ca7f..2329503a8 100644 --- a/shared/models/users/user-notification.model.ts +++ b/shared/models/users/user-notification.model.ts @@ -5,8 +5,8 @@ export enum UserNotificationType { NEW_COMMENT_ON_MY_VIDEO = 2, NEW_VIDEO_ABUSE_FOR_MODERATORS = 3, - BLACKLIST_ON_MY_VIDEO = 4, - UNBLACKLIST_ON_MY_VIDEO = 5, + BLOCK_ON_MY_VIDEO = 4, + UNBLOCK_ON_MY_VIDEO = 5, MY_VIDEO_PUBLISHED = 6, @@ -17,7 +17,7 @@ export enum UserNotificationType { NEW_FOLLOW = 10, COMMENT_MENTION = 11, - VIDEO_AUTO_BLACKLIST_FOR_MODERATORS = 12, + VIDEO_AUTO_BLOCK_FOR_MODERATORS = 12, NEW_INSTANCE_FOLLOWER = 13, diff --git a/shared/models/users/user-right.enum.ts b/shared/models/users/user-right.enum.ts index 2f88a65de..3fb760709 100644 --- a/shared/models/users/user-right.enum.ts +++ b/shared/models/users/user-right.enum.ts @@ -20,7 +20,7 @@ export enum UserRight { MANAGE_ACCOUNTS_BLOCKLIST, MANAGE_SERVERS_BLOCKLIST, - MANAGE_VIDEO_BLACKLIST, + MANAGE_VIDEO_BLOCKS, REMOVE_ANY_VIDEO, REMOVE_ANY_VIDEO_CHANNEL, diff --git a/shared/models/users/user-role.ts b/shared/models/users/user-role.ts index 2b08b5850..30ec5edce 100644 --- a/shared/models/users/user-role.ts +++ b/shared/models/users/user-role.ts @@ -19,7 +19,7 @@ const userRoleRights: { [ id in UserRole ]: UserRight[] } = { ], [UserRole.MODERATOR]: [ - UserRight.MANAGE_VIDEO_BLACKLIST, + UserRight.MANAGE_VIDEO_BLOCKS, UserRight.MANAGE_VIDEO_ABUSES, UserRight.REMOVE_ANY_VIDEO, UserRight.REMOVE_ANY_VIDEO_CHANNEL, diff --git a/shared/models/videos/blacklist/video-blacklist.model.ts b/shared/models/videos/blacklist/video-blacklist.model.ts index a6e0ef175..e6090b1e9 100644 --- a/shared/models/videos/blacklist/video-blacklist.model.ts +++ b/shared/models/videos/blacklist/video-blacklist.model.ts @@ -1,15 +1,15 @@ import { Video } from '../video.model' -export enum VideoBlacklistType { +export enum VideoBlockType { MANUAL = 1, AUTO_BEFORE_PUBLISHED = 2 } -export interface VideoBlacklist { +export interface VideoBlocklist { id: number unfederated: boolean reason?: string - type: VideoBlacklistType + type: VideoBlockType video: Video -- cgit v1.2.3 From 3487330d308166afb542cbacae0475693c0b059e Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Tue, 9 Jun 2020 16:07:10 +0200 Subject: preserve original variable names server-side --- shared/models/users/user-flag.model.ts | 2 +- shared/models/users/user-notification.model.ts | 6 +++--- shared/models/users/user-right.enum.ts | 2 +- shared/models/users/user-role.ts | 2 +- shared/models/videos/blacklist/video-blacklist.model.ts | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'shared/models') diff --git a/shared/models/users/user-flag.model.ts b/shared/models/users/user-flag.model.ts index e8b5a5c50..b94262d5e 100644 --- a/shared/models/users/user-flag.model.ts +++ b/shared/models/users/user-flag.model.ts @@ -1,4 +1,4 @@ export enum UserAdminFlag { NONE = 0, - BYPASS_VIDEO_AUTO_BLOCK = 1 << 0 + BYPASS_VIDEO_AUTO_BLACKLIST = 1 << 0 } diff --git a/shared/models/users/user-notification.model.ts b/shared/models/users/user-notification.model.ts index 2329503a8..e9be1ca7f 100644 --- a/shared/models/users/user-notification.model.ts +++ b/shared/models/users/user-notification.model.ts @@ -5,8 +5,8 @@ export enum UserNotificationType { NEW_COMMENT_ON_MY_VIDEO = 2, NEW_VIDEO_ABUSE_FOR_MODERATORS = 3, - BLOCK_ON_MY_VIDEO = 4, - UNBLOCK_ON_MY_VIDEO = 5, + BLACKLIST_ON_MY_VIDEO = 4, + UNBLACKLIST_ON_MY_VIDEO = 5, MY_VIDEO_PUBLISHED = 6, @@ -17,7 +17,7 @@ export enum UserNotificationType { NEW_FOLLOW = 10, COMMENT_MENTION = 11, - VIDEO_AUTO_BLOCK_FOR_MODERATORS = 12, + VIDEO_AUTO_BLACKLIST_FOR_MODERATORS = 12, NEW_INSTANCE_FOLLOWER = 13, diff --git a/shared/models/users/user-right.enum.ts b/shared/models/users/user-right.enum.ts index 3fb760709..2f88a65de 100644 --- a/shared/models/users/user-right.enum.ts +++ b/shared/models/users/user-right.enum.ts @@ -20,7 +20,7 @@ export enum UserRight { MANAGE_ACCOUNTS_BLOCKLIST, MANAGE_SERVERS_BLOCKLIST, - MANAGE_VIDEO_BLOCKS, + MANAGE_VIDEO_BLACKLIST, REMOVE_ANY_VIDEO, REMOVE_ANY_VIDEO_CHANNEL, diff --git a/shared/models/users/user-role.ts b/shared/models/users/user-role.ts index 30ec5edce..2b08b5850 100644 --- a/shared/models/users/user-role.ts +++ b/shared/models/users/user-role.ts @@ -19,7 +19,7 @@ const userRoleRights: { [ id in UserRole ]: UserRight[] } = { ], [UserRole.MODERATOR]: [ - UserRight.MANAGE_VIDEO_BLOCKS, + UserRight.MANAGE_VIDEO_BLACKLIST, UserRight.MANAGE_VIDEO_ABUSES, UserRight.REMOVE_ANY_VIDEO, UserRight.REMOVE_ANY_VIDEO_CHANNEL, diff --git a/shared/models/videos/blacklist/video-blacklist.model.ts b/shared/models/videos/blacklist/video-blacklist.model.ts index e6090b1e9..a6e0ef175 100644 --- a/shared/models/videos/blacklist/video-blacklist.model.ts +++ b/shared/models/videos/blacklist/video-blacklist.model.ts @@ -1,15 +1,15 @@ import { Video } from '../video.model' -export enum VideoBlockType { +export enum VideoBlacklistType { MANUAL = 1, AUTO_BEFORE_PUBLISHED = 2 } -export interface VideoBlocklist { +export interface VideoBlacklist { id: number unfederated: boolean reason?: string - type: VideoBlockType + type: VideoBlacklistType video: Video -- cgit v1.2.3