From 94148c9028829b5576a5dcbfba2c7fb9cf6443d3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 27 Jul 2020 11:40:30 +0200 Subject: Add abuse messages management in my account --- .../my-account-abuses/my-account-abuses-list.component.html | 6 ++++++ .../my-account-abuses/my-account-abuses-list.component.ts | 11 +++++++++++ .../my-account-server-blocklist.component.ts | 2 +- client/src/app/+my-account/my-account-routing.module.ts | 10 ++++++++++ client/src/app/+my-account/my-account.component.ts | 5 +++++ client/src/app/+my-account/my-account.module.ts | 6 +++++- 6 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 client/src/app/+my-account/my-account-abuses/my-account-abuses-list.component.html create mode 100644 client/src/app/+my-account/my-account-abuses/my-account-abuses-list.component.ts (limited to 'client/src/app/+my-account') 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 @@ +

+ + Reports +

+ + 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 @@ + +import { Component } from '@angular/core' + +@Component({ + selector: 'my-account-abuses-list', + templateUrl: './my-account-abuses-list.component.html', + styleUrls: [ ] +}) +export class MyAccountAbusesListComponent { + +} 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 @Component({ selector: 'my-account-server-blocklist', - styleUrls: [ '../../+admin/moderation/moderation.component.scss', '../../shared/shared-moderation/server-blocklist.component.scss' ], + styleUrls: [ '../../shared/shared-moderation/moderation.scss', '../../shared/shared-moderation/server-blocklist.component.scss' ], templateUrl: '../../shared/shared-moderation/server-blocklist.component.html' }) 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 import { MyAccountVideoPlaylistsComponent } from './my-account-video-playlists/my-account-video-playlists.component' import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component' import { MyAccountComponent } from './my-account.component' +import { MyAccountAbusesListComponent } from './my-account-abuses/my-account-abuses-list.component' const myAccountRoutes: Routes = [ { @@ -162,6 +163,15 @@ const myAccountRoutes: Routes = [ title: 'Notifications' } } + }, + { + path: 'abuses', + component: MyAccountAbusesListComponent, + data: { + meta: { + title: 'My abuses' + } + } } ] } 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 @@ -94,6 +94,11 @@ export class MyAccountComponent implements OnInit { routerLink: '/my-account/blocklist/servers', iconName: 'peertube-x' }, + { + label: this.i18n('My abuses'), + routerLink: '/my-account/abuses', + iconName: 'flag' + }, { label: this.i18n('Ownership changes'), routerLink: '/my-account/ownership', 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' import { TableModule } from 'primeng/table' import { DragDropModule } from '@angular/cdk/drag-drop' import { NgModule } from '@angular/core' +import { SharedAbuseListModule } from '@app/shared/shared-abuse-list' import { SharedFormModule } from '@app/shared/shared-forms' import { SharedGlobalIconModule } from '@app/shared/shared-icons' import { SharedMainModule } from '@app/shared/shared-main' @@ -11,6 +12,7 @@ import { SharedUserInterfaceSettingsModule } from '@app/shared/shared-user-setti import { SharedUserSubscriptionModule } from '@app/shared/shared-user-subscription/shared-user-subscription.module' import { SharedVideoMiniatureModule } from '@app/shared/shared-video-miniature' import { SharedVideoPlaylistModule } from '@app/shared/shared-video-playlist/shared-video-playlist.module' +import { MyAccountAbusesListComponent } from './my-account-abuses/my-account-abuses-list.component' import { MyAccountBlocklistComponent } from './my-account-blocklist/my-account-blocklist.component' import { MyAccountServerBlocklistComponent } from './my-account-blocklist/my-account-server-blocklist.component' import { MyAccountHistoryComponent } from './my-account-history/my-account-history.component' @@ -50,7 +52,8 @@ import { MyAccountComponent } from './my-account.component' SharedUserSubscriptionModule, SharedVideoPlaylistModule, SharedUserInterfaceSettingsModule, - SharedGlobalIconModule + SharedGlobalIconModule, + SharedAbuseListModule ], declarations: [ @@ -69,6 +72,7 @@ import { MyAccountComponent } from './my-account.component' MyAccountDangerZoneComponent, MyAccountSubscriptionsComponent, MyAccountBlocklistComponent, + MyAccountAbusesListComponent, MyAccountServerBlocklistComponent, MyAccountHistoryComponent, MyAccountNotificationsComponent, -- cgit v1.2.3