diff options
author | Chocobozzz <me@florianbigard.com> | 2020-07-27 11:40:30 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-07-31 11:35:19 +0200 |
commit | 94148c9028829b5576a5dcbfba2c7fb9cf6443d3 (patch) | |
tree | 2774f272329111abd03e8441ff936da11fb1a3f3 /client/src/app/+my-account | |
parent | 441e453ae53e491b09c9b09b00b041788176ce64 (diff) | |
download | PeerTube-94148c9028829b5576a5dcbfba2c7fb9cf6443d3.tar.gz PeerTube-94148c9028829b5576a5dcbfba2c7fb9cf6443d3.tar.zst PeerTube-94148c9028829b5576a5dcbfba2c7fb9cf6443d3.zip |
Add abuse messages management in my account
Diffstat (limited to 'client/src/app/+my-account')
6 files changed, 38 insertions, 2 deletions
diff --git a/client/src/app/+my-account/my-account-abuses/my-account-abuses-list.component.html b/client/src/app/+my-account/my-account-abuses/my-account-abuses-list.component.html new file mode 100644 index 000000000..59ca61be6 --- /dev/null +++ b/client/src/app/+my-account/my-account-abuses/my-account-abuses-list.component.html | |||
@@ -0,0 +1,6 @@ | |||
1 | <h1> | ||
2 | <my-global-icon iconName="flag" aria-hidden="true"></my-global-icon> | ||
3 | <ng-container i18n>Reports</ng-container> | ||
4 | </h1> | ||
5 | |||
6 | <my-abuse-list-table viewType="user" baseRoute="/my-account/abuses"></my-abuse-list-table> | ||
diff --git a/client/src/app/+my-account/my-account-abuses/my-account-abuses-list.component.ts b/client/src/app/+my-account/my-account-abuses/my-account-abuses-list.component.ts new file mode 100644 index 000000000..e5dd723ff --- /dev/null +++ b/client/src/app/+my-account/my-account-abuses/my-account-abuses-list.component.ts | |||
@@ -0,0 +1,11 @@ | |||
1 | |||
2 | import { Component } from '@angular/core' | ||
3 | |||
4 | @Component({ | ||
5 | selector: 'my-account-abuses-list', | ||
6 | templateUrl: './my-account-abuses-list.component.html', | ||
7 | styleUrls: [ ] | ||
8 | }) | ||
9 | export class MyAccountAbusesListComponent { | ||
10 | |||
11 | } | ||
diff --git a/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.ts b/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.ts index 9b983a197..50e724f87 100644 --- a/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.ts +++ b/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.ts | |||
@@ -3,7 +3,7 @@ import { BlocklistComponentType, GenericServerBlocklistComponent } from '@app/sh | |||
3 | 3 | ||
4 | @Component({ | 4 | @Component({ |
5 | selector: 'my-account-server-blocklist', | 5 | selector: 'my-account-server-blocklist', |
6 | styleUrls: [ '../../+admin/moderation/moderation.component.scss', '../../shared/shared-moderation/server-blocklist.component.scss' ], | 6 | styleUrls: [ '../../shared/shared-moderation/moderation.scss', '../../shared/shared-moderation/server-blocklist.component.scss' ], |
7 | templateUrl: '../../shared/shared-moderation/server-blocklist.component.html' | 7 | templateUrl: '../../shared/shared-moderation/server-blocklist.component.html' |
8 | }) | 8 | }) |
9 | export class MyAccountServerBlocklistComponent extends GenericServerBlocklistComponent { | 9 | export class MyAccountServerBlocklistComponent extends GenericServerBlocklistComponent { |
diff --git a/client/src/app/+my-account/my-account-routing.module.ts b/client/src/app/+my-account/my-account-routing.module.ts index ac9cf4cfd..0a4897d07 100644 --- a/client/src/app/+my-account/my-account-routing.module.ts +++ b/client/src/app/+my-account/my-account-routing.module.ts | |||
@@ -16,6 +16,7 @@ import { MyAccountVideoPlaylistUpdateComponent } from './my-account-video-playli | |||
16 | import { MyAccountVideoPlaylistsComponent } from './my-account-video-playlists/my-account-video-playlists.component' | 16 | import { MyAccountVideoPlaylistsComponent } from './my-account-video-playlists/my-account-video-playlists.component' |
17 | import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component' | 17 | import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component' |
18 | import { MyAccountComponent } from './my-account.component' | 18 | import { MyAccountComponent } from './my-account.component' |
19 | import { MyAccountAbusesListComponent } from './my-account-abuses/my-account-abuses-list.component' | ||
19 | 20 | ||
20 | const myAccountRoutes: Routes = [ | 21 | const myAccountRoutes: Routes = [ |
21 | { | 22 | { |
@@ -162,6 +163,15 @@ const myAccountRoutes: Routes = [ | |||
162 | title: 'Notifications' | 163 | title: 'Notifications' |
163 | } | 164 | } |
164 | } | 165 | } |
166 | }, | ||
167 | { | ||
168 | path: 'abuses', | ||
169 | component: MyAccountAbusesListComponent, | ||
170 | data: { | ||
171 | meta: { | ||
172 | title: 'My abuses' | ||
173 | } | ||
174 | } | ||
165 | } | 175 | } |
166 | ] | 176 | ] |
167 | } | 177 | } |
diff --git a/client/src/app/+my-account/my-account.component.ts b/client/src/app/+my-account/my-account.component.ts index 5b2238f5a..dc2c8f39c 100644 --- a/client/src/app/+my-account/my-account.component.ts +++ b/client/src/app/+my-account/my-account.component.ts | |||
@@ -95,6 +95,11 @@ export class MyAccountComponent implements OnInit { | |||
95 | iconName: 'peertube-x' | 95 | iconName: 'peertube-x' |
96 | }, | 96 | }, |
97 | { | 97 | { |
98 | label: this.i18n('My abuses'), | ||
99 | routerLink: '/my-account/abuses', | ||
100 | iconName: 'flag' | ||
101 | }, | ||
102 | { | ||
98 | label: this.i18n('Ownership changes'), | 103 | label: this.i18n('Ownership changes'), |
99 | routerLink: '/my-account/ownership', | 104 | routerLink: '/my-account/ownership', |
100 | iconName: 'download' | 105 | iconName: 'download' |
diff --git a/client/src/app/+my-account/my-account.module.ts b/client/src/app/+my-account/my-account.module.ts index 742a516d5..bf5a4fc8a 100644 --- a/client/src/app/+my-account/my-account.module.ts +++ b/client/src/app/+my-account/my-account.module.ts | |||
@@ -3,6 +3,7 @@ import { InputSwitchModule } from 'primeng/inputswitch' | |||
3 | import { TableModule } from 'primeng/table' | 3 | import { TableModule } from 'primeng/table' |
4 | import { DragDropModule } from '@angular/cdk/drag-drop' | 4 | import { DragDropModule } from '@angular/cdk/drag-drop' |
5 | import { NgModule } from '@angular/core' | 5 | import { NgModule } from '@angular/core' |
6 | import { SharedAbuseListModule } from '@app/shared/shared-abuse-list' | ||
6 | import { SharedFormModule } from '@app/shared/shared-forms' | 7 | import { SharedFormModule } from '@app/shared/shared-forms' |
7 | import { SharedGlobalIconModule } from '@app/shared/shared-icons' | 8 | import { SharedGlobalIconModule } from '@app/shared/shared-icons' |
8 | import { SharedMainModule } from '@app/shared/shared-main' | 9 | import { SharedMainModule } from '@app/shared/shared-main' |
@@ -11,6 +12,7 @@ import { SharedUserInterfaceSettingsModule } from '@app/shared/shared-user-setti | |||
11 | import { SharedUserSubscriptionModule } from '@app/shared/shared-user-subscription/shared-user-subscription.module' | 12 | import { SharedUserSubscriptionModule } from '@app/shared/shared-user-subscription/shared-user-subscription.module' |
12 | import { SharedVideoMiniatureModule } from '@app/shared/shared-video-miniature' | 13 | import { SharedVideoMiniatureModule } from '@app/shared/shared-video-miniature' |
13 | import { SharedVideoPlaylistModule } from '@app/shared/shared-video-playlist/shared-video-playlist.module' | 14 | import { SharedVideoPlaylistModule } from '@app/shared/shared-video-playlist/shared-video-playlist.module' |
15 | import { MyAccountAbusesListComponent } from './my-account-abuses/my-account-abuses-list.component' | ||
14 | import { MyAccountBlocklistComponent } from './my-account-blocklist/my-account-blocklist.component' | 16 | import { MyAccountBlocklistComponent } from './my-account-blocklist/my-account-blocklist.component' |
15 | import { MyAccountServerBlocklistComponent } from './my-account-blocklist/my-account-server-blocklist.component' | 17 | import { MyAccountServerBlocklistComponent } from './my-account-blocklist/my-account-server-blocklist.component' |
16 | import { MyAccountHistoryComponent } from './my-account-history/my-account-history.component' | 18 | import { MyAccountHistoryComponent } from './my-account-history/my-account-history.component' |
@@ -50,7 +52,8 @@ import { MyAccountComponent } from './my-account.component' | |||
50 | SharedUserSubscriptionModule, | 52 | SharedUserSubscriptionModule, |
51 | SharedVideoPlaylistModule, | 53 | SharedVideoPlaylistModule, |
52 | SharedUserInterfaceSettingsModule, | 54 | SharedUserInterfaceSettingsModule, |
53 | SharedGlobalIconModule | 55 | SharedGlobalIconModule, |
56 | SharedAbuseListModule | ||
54 | ], | 57 | ], |
55 | 58 | ||
56 | declarations: [ | 59 | declarations: [ |
@@ -69,6 +72,7 @@ import { MyAccountComponent } from './my-account.component' | |||
69 | MyAccountDangerZoneComponent, | 72 | MyAccountDangerZoneComponent, |
70 | MyAccountSubscriptionsComponent, | 73 | MyAccountSubscriptionsComponent, |
71 | MyAccountBlocklistComponent, | 74 | MyAccountBlocklistComponent, |
75 | MyAccountAbusesListComponent, | ||
72 | MyAccountServerBlocklistComponent, | 76 | MyAccountServerBlocklistComponent, |
73 | MyAccountHistoryComponent, | 77 | MyAccountHistoryComponent, |
74 | MyAccountNotificationsComponent, | 78 | MyAccountNotificationsComponent, |