diff options
author | Chocobozzz <me@florianbigard.com> | 2020-06-23 14:10:17 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-06-23 16:00:49 +0200 |
commit | 67ed6552b831df66713bac9e672738796128d33f (patch) | |
tree | 59c97d41e0b49d75a90aa3de987968ab9b1ff447 /client/src/app/+admin/moderation | |
parent | 0c4bacbff53bc732f5a2677d62a6ead7752e2405 (diff) | |
download | PeerTube-67ed6552b831df66713bac9e672738796128d33f.tar.gz PeerTube-67ed6552b831df66713bac9e672738796128d33f.tar.zst PeerTube-67ed6552b831df66713bac9e672738796128d33f.zip |
Reorganize client shared modules
Diffstat (limited to 'client/src/app/+admin/moderation')
9 files changed, 34 insertions, 45 deletions
diff --git a/client/src/app/+admin/moderation/index.ts b/client/src/app/+admin/moderation/index.ts index e99244b74..16249236c 100644 --- a/client/src/app/+admin/moderation/index.ts +++ b/client/src/app/+admin/moderation/index.ts | |||
@@ -1,3 +1,4 @@ | |||
1 | export * from './instance-blocklist' | ||
1 | export * from './video-abuse-list' | 2 | export * from './video-abuse-list' |
2 | export * from './video-block-list' | 3 | export * from './video-block-list' |
3 | export * from './moderation.component' | 4 | export * from './moderation.component' |
diff --git a/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.ts b/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.ts index 90a176194..d9fec29ce 100644 --- a/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.ts +++ b/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { Component } from '@angular/core' | 1 | import { Component } from '@angular/core' |
2 | import { GenericAccountBlocklistComponent, BlocklistComponentType } from '@app/shared/blocklist' | 2 | import { BlocklistComponentType, GenericAccountBlocklistComponent } from '@app/shared/shared-moderation' |
3 | 3 | ||
4 | @Component({ | 4 | @Component({ |
5 | selector: 'my-instance-account-blocklist', | 5 | selector: 'my-instance-account-blocklist', |
6 | styleUrls: [ '../moderation.component.scss', '../../../shared/blocklist/account-blocklist.component.scss' ], | 6 | styleUrls: [ '../moderation.component.scss', '../../../shared/shared-moderation/account-blocklist.component.scss' ], |
7 | templateUrl: '../../../shared/blocklist/account-blocklist.component.html' | 7 | templateUrl: '../../../shared/shared-moderation/account-blocklist.component.html' |
8 | }) | 8 | }) |
9 | export class InstanceAccountBlocklistComponent extends GenericAccountBlocklistComponent { | 9 | export class InstanceAccountBlocklistComponent extends GenericAccountBlocklistComponent { |
10 | mode = BlocklistComponentType.Instance | 10 | mode = BlocklistComponentType.Instance |
diff --git a/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts b/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts index 9d4ec174a..3afae529f 100644 --- a/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts +++ b/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { Component } from '@angular/core' | 1 | import { Component } from '@angular/core' |
2 | import { GenericServerBlocklistComponent, BlocklistComponentType } from '@app/shared/blocklist' | 2 | import { GenericServerBlocklistComponent, BlocklistComponentType } from '@app/shared/shared-moderation' |
3 | 3 | ||
4 | @Component({ | 4 | @Component({ |
5 | selector: 'my-instance-server-blocklist', | 5 | selector: 'my-instance-server-blocklist', |
6 | styleUrls: [ '../../../shared/blocklist/server-blocklist.component.scss' ], | 6 | styleUrls: [ '../../../shared/shared-moderation/server-blocklist.component.scss' ], |
7 | templateUrl: '../../../shared/blocklist/server-blocklist.component.html' | 7 | templateUrl: '../../../shared/shared-moderation/server-blocklist.component.html' |
8 | }) | 8 | }) |
9 | export class InstanceServerBlocklistComponent extends GenericServerBlocklistComponent { | 9 | export class InstanceServerBlocklistComponent extends GenericServerBlocklistComponent { |
10 | mode = BlocklistComponentType.Instance | 10 | mode = BlocklistComponentType.Instance |
diff --git a/client/src/app/+admin/moderation/moderation.component.ts b/client/src/app/+admin/moderation/moderation.component.ts index 1b1df6f09..806f9d100 100644 --- a/client/src/app/+admin/moderation/moderation.component.ts +++ b/client/src/app/+admin/moderation/moderation.component.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { UserRight } from '../../../../../shared' | ||
3 | import { AuthService, ServerService } from '@app/core' | 2 | import { AuthService, ServerService } from '@app/core' |
3 | import { UserRight } from '@shared/models' | ||
4 | 4 | ||
5 | @Component({ | 5 | @Component({ |
6 | templateUrl: './moderation.component.html', | 6 | templateUrl: './moderation.component.html', |
diff --git a/client/src/app/+admin/moderation/moderation.routes.ts b/client/src/app/+admin/moderation/moderation.routes.ts index c08333f17..cd837bcb9 100644 --- a/client/src/app/+admin/moderation/moderation.routes.ts +++ b/client/src/app/+admin/moderation/moderation.routes.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { Routes } from '@angular/router' | 1 | import { Routes } from '@angular/router' |
2 | import { UserRight } from '../../../../../shared' | 2 | import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist' |
3 | import { UserRightGuard } from '@app/core' | 3 | import { ModerationComponent } from '@app/+admin/moderation/moderation.component' |
4 | import { VideoAbuseListComponent } from '@app/+admin/moderation/video-abuse-list' | 4 | import { VideoAbuseListComponent } from '@app/+admin/moderation/video-abuse-list' |
5 | import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list' | 5 | import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list' |
6 | import { ModerationComponent } from '@app/+admin/moderation/moderation.component' | 6 | import { UserRightGuard } from '@app/core' |
7 | import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist' | 7 | import { UserRight } from '@shared/models' |
8 | 8 | ||
9 | export const ModerationRoutes: Routes = [ | 9 | export const ModerationRoutes: Routes = [ |
10 | { | 10 | { |
diff --git a/client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.ts b/client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.ts index a0471f2b0..3cd763ca4 100644 --- a/client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.ts +++ b/client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.ts | |||
@@ -1,11 +1,11 @@ | |||
1 | import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core' | 1 | import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core' |
2 | import { Notifier } from '@app/core' | 2 | import { Notifier } from '@app/core' |
3 | import { FormReactive, VideoAbuseService, VideoAbuseValidatorsService } from '../../../shared' | 3 | import { FormReactive, FormValidatorService, VideoAbuseValidatorsService } from '@app/shared/shared-forms' |
4 | import { I18n } from '@ngx-translate/i18n-polyfill' | 4 | import { VideoAbuseService } from '@app/shared/shared-moderation' |
5 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 5 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
6 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 6 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
7 | import { FormValidatorService } from '../../../shared/forms/form-validators/form-validator.service' | 7 | import { I18n } from '@ngx-translate/i18n-polyfill' |
8 | import { VideoAbuse } from '../../../../../../shared/models/videos' | 8 | import { VideoAbuse } from '@shared/models' |
9 | 9 | ||
10 | @Component({ | 10 | @Component({ |
11 | selector: 'my-moderation-comment-modal', | 11 | selector: 'my-moderation-comment-modal', |
diff --git a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-details.component.ts b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-details.component.ts index 13485124f..9aa70288d 100644 --- a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-details.component.ts +++ b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-details.component.ts | |||
@@ -1,9 +1,8 @@ | |||
1 | import { Component, Input } from '@angular/core' | 1 | import { Component, Input } from '@angular/core' |
2 | import { Actor } from '@app/shared/actor/actor.model' | 2 | import { Actor } from '@app/shared/shared-main' |
3 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
3 | import { VideoAbusePredefinedReasonsString } from '../../../../../../shared/models/videos/abuse/video-abuse-reason.model' | 4 | import { VideoAbusePredefinedReasonsString } from '../../../../../../shared/models/videos/abuse/video-abuse-reason.model' |
4 | import { ProcessedVideoAbuse } from './video-abuse-list.component' | 5 | import { ProcessedVideoAbuse } from './video-abuse-list.component' |
5 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
6 | import { durationToString } from '@app/shared/misc/utils' | ||
7 | 6 | ||
8 | @Component({ | 7 | @Component({ |
9 | selector: 'my-video-abuse-details', | 8 | selector: 'my-video-abuse-details', |
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 d7f5beef3..b0a655e71 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 | |||
@@ -1,23 +1,16 @@ | |||
1 | import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core' | ||
2 | import { Account } from '@app/shared/account/account.model' | ||
3 | import { Notifier } from '@app/core' | ||
4 | import { SortMeta } from 'primeng/api' | 1 | import { SortMeta } from 'primeng/api' |
5 | import { VideoAbuse, VideoAbuseState } from '../../../../../../shared' | 2 | import { filter } from 'rxjs/operators' |
6 | import { RestPagination, RestTable, VideoAbuseService, VideoBlockService } from '../../../shared' | ||
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
8 | import { DropdownAction } from '../../../shared/buttons/action-dropdown.component' | ||
9 | import { ConfirmService } from '../../../core/index' | ||
10 | import { ModerationCommentModalComponent } from './moderation-comment-modal.component' | ||
11 | import { Video } from '../../../shared/video/video.model' | ||
12 | import { MarkdownService } from '@app/shared/renderer' | ||
13 | import { Actor } from '@app/shared/actor/actor.model' | ||
14 | import { buildVideoEmbed, buildVideoLink } from 'src/assets/player/utils' | 3 | import { buildVideoEmbed, buildVideoLink } from 'src/assets/player/utils' |
4 | import { environment } from 'src/environments/environment' | ||
5 | import { AfterViewInit, Component, OnInit, ViewChild } from '@angular/core' | ||
15 | import { DomSanitizer } from '@angular/platform-browser' | 6 | import { DomSanitizer } from '@angular/platform-browser' |
16 | import { BlocklistService } from '@app/shared/blocklist' | ||
17 | import { VideoService } from '@app/shared/video/video.service' | ||
18 | import { ActivatedRoute, Params, Router } from '@angular/router' | 7 | import { ActivatedRoute, Params, Router } from '@angular/router' |
19 | import { filter } from 'rxjs/operators' | 8 | import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable } from '@app/core' |
20 | import { environment } from 'src/environments/environment' | 9 | import { Account, Actor, DropdownAction, Video, VideoService } from '@app/shared/shared-main' |
10 | import { BlocklistService, VideoAbuseService, VideoBlockService } from '@app/shared/shared-moderation' | ||
11 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
12 | import { VideoAbuse, VideoAbuseState } from '@shared/models' | ||
13 | import { ModerationCommentModalComponent } from './moderation-comment-modal.component' | ||
21 | 14 | ||
22 | export type ProcessedVideoAbuse = VideoAbuse & { | 15 | export type ProcessedVideoAbuse = VideoAbuse & { |
23 | moderationCommentHtml?: string, | 16 | moderationCommentHtml?: string, |
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 c0ac32242..c03f9248e 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 | |||
@@ -1,16 +1,12 @@ | |||
1 | import { Component, OnInit, AfterViewInit } from '@angular/core' | ||
2 | import { SortMeta } from 'primeng/api' | 1 | import { SortMeta } from 'primeng/api' |
3 | import { Notifier, ServerService } from '@app/core' | ||
4 | import { ConfirmService } from '../../../core' | ||
5 | import { RestPagination, RestTable, VideoBlockService } from '../../../shared' | ||
6 | import { VideoBlacklist, VideoBlacklistType } from '../../../../../../shared' | ||
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
8 | import { DropdownAction } from '../../../shared/buttons/action-dropdown.component' | ||
9 | import { Video } from '../../../shared/video/video.model' | ||
10 | import { MarkdownService } from '@app/shared/renderer' | ||
11 | import { Params, ActivatedRoute, Router } from '@angular/router' | ||
12 | import { filter, switchMap } from 'rxjs/operators' | 2 | import { filter, switchMap } from 'rxjs/operators' |
13 | import { VideoService } from '@app/shared/video/video.service' | 3 | import { AfterViewInit, Component, OnInit } from '@angular/core' |
4 | import { ActivatedRoute, Params, Router } from '@angular/router' | ||
5 | import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' | ||
6 | import { DropdownAction, Video, VideoService } from '@app/shared/shared-main' | ||
7 | import { VideoBlockService } from '@app/shared/shared-moderation' | ||
8 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
9 | import { VideoBlacklist, VideoBlacklistType } from '@shared/models' | ||
14 | 10 | ||
15 | @Component({ | 11 | @Component({ |
16 | selector: 'my-video-block-list', | 12 | selector: 'my-video-block-list', |