diff options
Diffstat (limited to 'client/src/app/+admin')
44 files changed, 190 insertions, 403 deletions
diff --git a/client/src/app/+admin/admin-routing.module.ts b/client/src/app/+admin/admin-routing.module.ts index 79c57221b..986dae8eb 100644 --- a/client/src/app/+admin/admin-routing.module.ts +++ b/client/src/app/+admin/admin-routing.module.ts | |||
@@ -1,15 +1,13 @@ | |||
1 | import { NgModule } from '@angular/core' | 1 | import { NgModule } from '@angular/core' |
2 | import { RouterModule, Routes } from '@angular/router' | 2 | import { RouterModule, Routes } from '@angular/router' |
3 | import { ConfigRoutes } from '@app/+admin/config' | 3 | import { ConfigRoutes } from '@app/+admin/config' |
4 | 4 | import { ModerationRoutes } from '@app/+admin/moderation/moderation.routes' | |
5 | import { PluginsRoutes } from '@app/+admin/plugins/plugins.routes' | ||
6 | import { SystemRoutes } from '@app/+admin/system' | ||
5 | import { MetaGuard } from '@ngx-meta/core' | 7 | import { MetaGuard } from '@ngx-meta/core' |
6 | |||
7 | import { AdminComponent } from './admin.component' | 8 | import { AdminComponent } from './admin.component' |
8 | import { FollowsRoutes } from './follows' | 9 | import { FollowsRoutes } from './follows' |
9 | import { UsersRoutes } from './users' | 10 | import { UsersRoutes } from './users' |
10 | import { ModerationRoutes } from '@app/+admin/moderation/moderation.routes' | ||
11 | import { SystemRoutes } from '@app/+admin/system' | ||
12 | import { PluginsRoutes } from '@app/+admin/plugins/plugins.routes' | ||
13 | 11 | ||
14 | const adminRoutes: Routes = [ | 12 | const adminRoutes: Routes = [ |
15 | { | 13 | { |
diff --git a/client/src/app/+admin/admin.component.ts b/client/src/app/+admin/admin.component.ts index a97a33cf5..e47c7a8f4 100644 --- a/client/src/app/+admin/admin.component.ts +++ b/client/src/app/+admin/admin.component.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { UserRight } from '../../../../shared' | 2 | import { AuthService } from '@app/core' |
3 | import { AuthService } from '../core/auth/auth.service' | 3 | import { ListOverflowItem } from '@app/shared/shared-main' |
4 | import { ListOverflowItem } from '@app/shared/misc/list-overflow.component' | ||
5 | import { I18n } from '@ngx-translate/i18n-polyfill' | 4 | import { I18n } from '@ngx-translate/i18n-polyfill' |
5 | import { UserRight } from '@shared/models' | ||
6 | 6 | ||
7 | @Component({ | 7 | @Component({ |
8 | templateUrl: './admin.component.html' | 8 | templateUrl: './admin.component.html' |
diff --git a/client/src/app/+admin/admin.module.ts b/client/src/app/+admin/admin.module.ts index eccec8a49..728227a84 100644 --- a/client/src/app/+admin/admin.module.ts +++ b/client/src/app/+admin/admin.module.ts | |||
@@ -1,39 +1,41 @@ | |||
1 | import { NgModule } from '@angular/core' | 1 | import { ChartModule } from 'primeng/chart' |
2 | import { ConfigComponent, EditCustomConfigComponent } from '@app/+admin/config' | 2 | import { SelectButtonModule } from 'primeng/selectbutton' |
3 | import { ConfigService } from '@app/+admin/config/shared/config.service' | ||
4 | import { TableModule } from 'primeng/table' | 3 | import { TableModule } from 'primeng/table' |
5 | import { SharedModule } from '../shared' | 4 | import { NgModule } from '@angular/core' |
5 | import { SharedFormModule } from '@app/shared/shared-forms' | ||
6 | import { SharedGlobalIconModule } from '@app/shared/shared-icons' | ||
7 | import { SharedMainModule } from '@app/shared/shared-main' | ||
8 | import { SharedModerationModule } from '@app/shared/shared-moderation' | ||
6 | import { AdminRoutingModule } from './admin-routing.module' | 9 | import { AdminRoutingModule } from './admin-routing.module' |
7 | import { AdminComponent } from './admin.component' | 10 | import { AdminComponent } from './admin.component' |
11 | import { ConfigComponent, EditCustomConfigComponent } from './config' | ||
12 | import { ConfigService } from './config/shared/config.service' | ||
8 | import { FollowersListComponent, FollowsComponent, VideoRedundanciesListComponent } from './follows' | 13 | import { FollowersListComponent, FollowsComponent, VideoRedundanciesListComponent } from './follows' |
9 | import { FollowingListComponent } from './follows/following-list/following-list.component' | 14 | import { FollowingListComponent } from './follows/following-list/following-list.component' |
10 | import { UserCreateComponent, UserListComponent, UserPasswordComponent, UsersComponent, UserUpdateComponent } from './users' | 15 | import { RedundancyCheckboxComponent } from './follows/shared/redundancy-checkbox.component' |
11 | import { | 16 | import { VideoRedundancyInformationComponent } from './follows/video-redundancies-list/video-redundancy-information.component' |
12 | ModerationCommentModalComponent, | 17 | import { ModerationCommentModalComponent, VideoAbuseListComponent, VideoBlockListComponent } from './moderation' |
13 | VideoAbuseListComponent, | 18 | import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from './moderation/instance-blocklist' |
14 | VideoBlockListComponent | 19 | import { ModerationComponent } from './moderation/moderation.component' |
15 | } from './moderation' | ||
16 | import { ModerationComponent } from '@app/+admin/moderation/moderation.component' | ||
17 | import { RedundancyCheckboxComponent } from '@app/+admin/follows/shared/redundancy-checkbox.component' | ||
18 | import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist' | ||
19 | import { JobsComponent } from '@app/+admin/system/jobs/jobs.component' | ||
20 | import { JobService, LogsComponent, LogsService, SystemComponent } from '@app/+admin/system' | ||
21 | import { DebugComponent, DebugService } from '@app/+admin/system/debug' | ||
22 | import { PluginsComponent } from '@app/+admin/plugins/plugins.component' | ||
23 | import { PluginListInstalledComponent } from '@app/+admin/plugins/plugin-list-installed/plugin-list-installed.component' | ||
24 | import { PluginSearchComponent } from '@app/+admin/plugins/plugin-search/plugin-search.component' | ||
25 | import { PluginShowInstalledComponent } from '@app/+admin/plugins/plugin-show-installed/plugin-show-installed.component' | ||
26 | import { SelectButtonModule } from 'primeng/selectbutton' | ||
27 | import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service' | ||
28 | import { VideoRedundancyInformationComponent } from '@app/+admin/follows/video-redundancies-list/video-redundancy-information.component' | ||
29 | import { ChartModule } from 'primeng/chart' | ||
30 | import { VideoAbuseDetailsComponent } from './moderation/video-abuse-list/video-abuse-details.component' | 20 | import { VideoAbuseDetailsComponent } from './moderation/video-abuse-list/video-abuse-details.component' |
21 | import { PluginListInstalledComponent } from './plugins/plugin-list-installed/plugin-list-installed.component' | ||
22 | import { PluginSearchComponent } from './plugins/plugin-search/plugin-search.component' | ||
23 | import { PluginShowInstalledComponent } from './plugins/plugin-show-installed/plugin-show-installed.component' | ||
24 | import { PluginsComponent } from './plugins/plugins.component' | ||
25 | import { PluginApiService } from './plugins/shared/plugin-api.service' | ||
26 | import { JobService, LogsComponent, LogsService, SystemComponent } from './system' | ||
27 | import { DebugComponent, DebugService } from './system/debug' | ||
28 | import { JobsComponent } from './system/jobs/jobs.component' | ||
29 | import { UserCreateComponent, UserListComponent, UserPasswordComponent, UsersComponent, UserUpdateComponent } from './users' | ||
31 | 30 | ||
32 | @NgModule({ | 31 | @NgModule({ |
33 | imports: [ | 32 | imports: [ |
34 | AdminRoutingModule, | 33 | AdminRoutingModule, |
35 | 34 | ||
36 | SharedModule, | 35 | SharedMainModule, |
36 | SharedFormModule, | ||
37 | SharedModerationModule, | ||
38 | SharedGlobalIconModule, | ||
37 | 39 | ||
38 | TableModule, | 40 | TableModule, |
39 | SelectButtonModule, | 41 | SelectButtonModule, |
diff --git a/client/src/app/+admin/config/config.routes.ts b/client/src/app/+admin/config/config.routes.ts index 2ca2f8fde..7c1a1a166 100644 --- a/client/src/app/+admin/config/config.routes.ts +++ b/client/src/app/+admin/config/config.routes.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Routes } from '@angular/router' | 1 | import { Routes } from '@angular/router' |
2 | import { EditCustomConfigComponent } from '@app/+admin/config/edit-custom-config' | 2 | import { EditCustomConfigComponent } from '@app/+admin/config/edit-custom-config' |
3 | import { UserRightGuard } from '@app/core' | 3 | import { UserRightGuard } from '@app/core' |
4 | import { UserRight } from '../../../../../shared/models/users' | 4 | import { UserRight } from '@shared/models' |
5 | import { ConfigComponent } from './config.component' | 5 | import { ConfigComponent } from './config.component' |
6 | 6 | ||
7 | export const ConfigRoutes: Routes = [ | 7 | export const ConfigRoutes: Routes = [ |
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts index 3a47ba25e..69629770f 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts | |||
@@ -1,16 +1,14 @@ | |||
1 | import { AfterViewChecked, Component, OnInit, ViewChild } from '@angular/core' | ||
2 | import { ConfigService } from '@app/+admin/config/shared/config.service' | ||
3 | import { ServerService } from '@app/core/server/server.service' | ||
4 | import { CustomConfigValidatorsService, FormReactive, UserValidatorsService } from '@app/shared' | ||
5 | import { Notifier } from '@app/core' | ||
6 | import { CustomConfig } from '../../../../../../shared/models/server/custom-config.model' | ||
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
8 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' | ||
9 | import { SelectItem } from 'primeng/api' | 1 | import { SelectItem } from 'primeng/api' |
10 | import { forkJoin } from 'rxjs' | 2 | import { forkJoin } from 'rxjs' |
11 | import { ServerConfig } from '@shared/models' | ||
12 | import { ViewportScroller } from '@angular/common' | 3 | import { ViewportScroller } from '@angular/common' |
4 | import { AfterViewChecked, Component, OnInit, ViewChild } from '@angular/core' | ||
5 | import { ConfigService } from '@app/+admin/config/shared/config.service' | ||
6 | import { Notifier } from '@app/core' | ||
7 | import { ServerService } from '@app/core/server/server.service' | ||
8 | import { CustomConfigValidatorsService, FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' | ||
13 | import { NgbNav } from '@ng-bootstrap/ng-bootstrap' | 9 | import { NgbNav } from '@ng-bootstrap/ng-bootstrap' |
10 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
11 | import { CustomConfig, ServerConfig } from '@shared/models' | ||
14 | 12 | ||
15 | @Component({ | 13 | @Component({ |
16 | selector: 'my-edit-custom-config', | 14 | selector: 'my-edit-custom-config', |
diff --git a/client/src/app/+admin/config/shared/batch-domains-modal.component.html b/client/src/app/+admin/config/shared/batch-domains-modal.component.html deleted file mode 100644 index 1b85c8f48..000000000 --- a/client/src/app/+admin/config/shared/batch-domains-modal.component.html +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | <ng-template #modal> | ||
2 | <div class="modal-header"> | ||
3 | <h4 i18n class="modal-title">{{ action }}</h4> | ||
4 | |||
5 | <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hide()"></my-global-icon> | ||
6 | </div> | ||
7 | |||
8 | <div class="modal-body"> | ||
9 | <form novalidate [formGroup]="form" (ngSubmit)="submit()"> | ||
10 | <div class="form-group"> | ||
11 | <label i18n for="hosts">1 host (without "http://") per line</label> | ||
12 | |||
13 | <textarea | ||
14 | [placeholder]="placeholder" formControlName="domains" type="text" id="hosts" name="hosts" | ||
15 | class="form-control" [ngClass]="{ 'input-error': formErrors['domains'] }" ngbAutofocus | ||
16 | ></textarea> | ||
17 | |||
18 | <div *ngIf="formErrors.domains" class="form-error"> | ||
19 | {{ formErrors.domains }} | ||
20 | |||
21 | <div *ngIf="form.controls['domains'].errors.validDomains"> | ||
22 | {{ form.controls['domains'].errors.validDomains.value }} | ||
23 | </div> | ||
24 | </div> | ||
25 | </div> | ||
26 | |||
27 | <ng-content select="warning"></ng-content> | ||
28 | |||
29 | <div class="form-group inputs"> | ||
30 | <input | ||
31 | type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel" | ||
32 | (click)="hide()" (key.enter)="hide()" | ||
33 | > | ||
34 | |||
35 | <input | ||
36 | type="submit" [value]="action" class="action-button-submit" | ||
37 | [disabled]="!form.valid" | ||
38 | > | ||
39 | </div> | ||
40 | </form> | ||
41 | </div> | ||
42 | |||
43 | </ng-template> | ||
diff --git a/client/src/app/+admin/config/shared/batch-domains-modal.component.scss b/client/src/app/+admin/config/shared/batch-domains-modal.component.scss deleted file mode 100644 index 9621a566f..000000000 --- a/client/src/app/+admin/config/shared/batch-domains-modal.component.scss +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | textarea { | ||
2 | height: 200px; | ||
3 | } | ||
diff --git a/client/src/app/+admin/config/shared/batch-domains-modal.component.ts b/client/src/app/+admin/config/shared/batch-domains-modal.component.ts deleted file mode 100644 index 620f2726b..000000000 --- a/client/src/app/+admin/config/shared/batch-domains-modal.component.ts +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | import { Component, OnInit, ViewChild, Input, Output, EventEmitter } from '@angular/core' | ||
2 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
3 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | ||
4 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | ||
5 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' | ||
6 | import { FormReactive } from '@app/shared/forms' | ||
7 | import { BatchDomainsValidatorsService } from './batch-domains-validators.service' | ||
8 | |||
9 | @Component({ | ||
10 | selector: 'my-batch-domains-modal', | ||
11 | templateUrl: './batch-domains-modal.component.html', | ||
12 | styleUrls: [ './batch-domains-modal.component.scss' ] | ||
13 | }) | ||
14 | export class BatchDomainsModalComponent extends FormReactive implements OnInit { | ||
15 | @ViewChild('modal', { static: true }) modal: NgbModal | ||
16 | @Input() placeholder = 'example.com' | ||
17 | @Input() action: string | ||
18 | @Output() domains = new EventEmitter<string[]>() | ||
19 | |||
20 | private openedModal: NgbModalRef | ||
21 | |||
22 | constructor ( | ||
23 | protected formValidatorService: FormValidatorService, | ||
24 | private modalService: NgbModal, | ||
25 | private batchDomainsValidatorsService: BatchDomainsValidatorsService, | ||
26 | private i18n: I18n | ||
27 | ) { | ||
28 | super() | ||
29 | } | ||
30 | |||
31 | ngOnInit () { | ||
32 | if (!this.action) this.action = this.i18n('Process domains') | ||
33 | |||
34 | this.buildForm({ | ||
35 | domains: this.batchDomainsValidatorsService.DOMAINS | ||
36 | }) | ||
37 | } | ||
38 | |||
39 | openModal () { | ||
40 | this.openedModal = this.modalService.open(this.modal, { centered: true }) | ||
41 | } | ||
42 | |||
43 | hide () { | ||
44 | this.openedModal.close() | ||
45 | } | ||
46 | |||
47 | submit () { | ||
48 | this.domains.emit( | ||
49 | this.batchDomainsValidatorsService.getNotEmptyHosts(this.form.controls['domains'].value) | ||
50 | ) | ||
51 | this.form.reset() | ||
52 | this.hide() | ||
53 | } | ||
54 | } | ||
diff --git a/client/src/app/+admin/config/shared/batch-domains-validators.service.ts b/client/src/app/+admin/config/shared/batch-domains-validators.service.ts deleted file mode 100644 index 46fa6514d..000000000 --- a/client/src/app/+admin/config/shared/batch-domains-validators.service.ts +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
2 | import { Validators, ValidatorFn } from '@angular/forms' | ||
3 | import { Injectable } from '@angular/core' | ||
4 | import { BuildFormValidator, validateHost } from '@app/shared/forms/form-validators' | ||
5 | |||
6 | @Injectable() | ||
7 | export class BatchDomainsValidatorsService { | ||
8 | readonly DOMAINS: BuildFormValidator | ||
9 | |||
10 | constructor (private i18n: I18n) { | ||
11 | this.DOMAINS = { | ||
12 | VALIDATORS: [ Validators.required, this.validDomains, this.isHostsUnique ], | ||
13 | MESSAGES: { | ||
14 | 'required': this.i18n('Domain is required.'), | ||
15 | 'validDomains': this.i18n('Domains entered are invalid.'), | ||
16 | 'uniqueDomains': this.i18n('Domains entered contain duplicates.') | ||
17 | } | ||
18 | } | ||
19 | } | ||
20 | |||
21 | getNotEmptyHosts (hosts: string) { | ||
22 | return hosts | ||
23 | .split('\n') | ||
24 | .filter((host: string) => host && host.length !== 0) // Eject empty hosts | ||
25 | } | ||
26 | |||
27 | private validDomains: ValidatorFn = (control) => { | ||
28 | if (!control.value) return null | ||
29 | |||
30 | const newHostsErrors = [] | ||
31 | const hosts = this.getNotEmptyHosts(control.value) | ||
32 | |||
33 | for (const host of hosts) { | ||
34 | if (validateHost(host) === false) { | ||
35 | newHostsErrors.push(this.i18n('{{host}} is not valid', { host })) | ||
36 | } | ||
37 | } | ||
38 | |||
39 | /* Is not valid. */ | ||
40 | if (newHostsErrors.length !== 0) { | ||
41 | return { | ||
42 | 'validDomains': { | ||
43 | reason: 'invalid', | ||
44 | value: newHostsErrors.join('. ') + '.' | ||
45 | } | ||
46 | } | ||
47 | } | ||
48 | |||
49 | /* Is valid. */ | ||
50 | return null | ||
51 | } | ||
52 | |||
53 | private isHostsUnique: ValidatorFn = (control) => { | ||
54 | if (!control.value) return null | ||
55 | |||
56 | const hosts = this.getNotEmptyHosts(control.value) | ||
57 | |||
58 | if (hosts.every((host: string) => hosts.indexOf(host) === hosts.lastIndexOf(host))) { | ||
59 | return null | ||
60 | } else { | ||
61 | return { | ||
62 | 'uniqueDomains': { | ||
63 | reason: 'invalid' | ||
64 | } | ||
65 | } | ||
66 | } | ||
67 | } | ||
68 | } | ||
diff --git a/client/src/app/+admin/config/shared/config.service.ts b/client/src/app/+admin/config/shared/config.service.ts index 874b8094d..f182946b8 100644 --- a/client/src/app/+admin/config/shared/config.service.ts +++ b/client/src/app/+admin/config/shared/config.service.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { catchError } from 'rxjs/operators' | 1 | import { catchError } from 'rxjs/operators' |
2 | import { HttpClient } from '@angular/common/http' | 2 | import { HttpClient } from '@angular/common/http' |
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { CustomConfig } from '../../../../../../shared/models/server/custom-config.model' | 4 | import { RestExtractor } from '@app/core' |
5 | import { environment } from '../../../../environments/environment' | ||
6 | import { RestExtractor } from '../../../shared' | ||
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | 5 | import { I18n } from '@ngx-translate/i18n-polyfill' |
6 | import { CustomConfig } from '@shared/models' | ||
7 | import { environment } from '../../../../environments/environment' | ||
8 | 8 | ||
9 | @Injectable() | 9 | @Injectable() |
10 | export class ConfigService { | 10 | export class ConfigService { |
diff --git a/client/src/app/+admin/follows/followers-list/followers-list.component.ts b/client/src/app/+admin/follows/followers-list/followers-list.component.ts index 17352a601..63135f898 100644 --- a/client/src/app/+admin/follows/followers-list/followers-list.component.ts +++ b/client/src/app/+admin/follows/followers-list/followers-list.component.ts | |||
@@ -1,10 +1,9 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | ||
2 | import { ConfirmService, Notifier } from '@app/core' | ||
3 | import { SortMeta } from 'primeng/api' | 1 | import { SortMeta } from 'primeng/api' |
4 | import { ActorFollow } from '../../../../../../shared/models/actors/follow.model' | 2 | import { Component, OnInit } from '@angular/core' |
5 | import { RestPagination, RestTable } from '../../../shared' | 3 | import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' |
6 | import { FollowService } from '@app/shared/instance/follow.service' | 4 | import { InstanceFollowService } from '@app/shared/shared-instance' |
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | 5 | import { I18n } from '@ngx-translate/i18n-polyfill' |
6 | import { ActorFollow } from '@shared/models' | ||
8 | 7 | ||
9 | @Component({ | 8 | @Component({ |
10 | selector: 'my-followers-list', | 9 | selector: 'my-followers-list', |
@@ -21,7 +20,7 @@ export class FollowersListComponent extends RestTable implements OnInit { | |||
21 | private confirmService: ConfirmService, | 20 | private confirmService: ConfirmService, |
22 | private notifier: Notifier, | 21 | private notifier: Notifier, |
23 | private i18n: I18n, | 22 | private i18n: I18n, |
24 | private followService: FollowService | 23 | private followService: InstanceFollowService |
25 | ) { | 24 | ) { |
26 | super() | 25 | super() |
27 | } | 26 | } |
diff --git a/client/src/app/+admin/follows/following-list/following-list.component.ts b/client/src/app/+admin/follows/following-list/following-list.component.ts index 6ddbf02d6..dae8923b5 100644 --- a/client/src/app/+admin/follows/following-list/following-list.component.ts +++ b/client/src/app/+admin/follows/following-list/following-list.component.ts | |||
@@ -1,12 +1,10 @@ | |||
1 | import { Component, OnInit, ViewChild } from '@angular/core' | ||
2 | import { Notifier } from '@app/core' | ||
3 | import { SortMeta } from 'primeng/api' | 1 | import { SortMeta } from 'primeng/api' |
4 | import { ActorFollow } from '../../../../../../shared/models/actors/follow.model' | 2 | import { Component, OnInit, ViewChild } from '@angular/core' |
5 | import { ConfirmService } from '../../../core/confirm/confirm.service' | 3 | import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' |
6 | import { RestPagination, RestTable } from '../../../shared' | 4 | import { InstanceFollowService } from '@app/shared/shared-instance' |
7 | import { FollowService } from '@app/shared/instance/follow.service' | 5 | import { BatchDomainsModalComponent } from '@app/shared/shared-moderation' |
8 | import { I18n } from '@ngx-translate/i18n-polyfill' | 6 | import { I18n } from '@ngx-translate/i18n-polyfill' |
9 | import { BatchDomainsModalComponent } from '@app/+admin/config/shared/batch-domains-modal.component' | 7 | import { ActorFollow } from '@shared/models' |
10 | 8 | ||
11 | @Component({ | 9 | @Component({ |
12 | selector: 'my-followers-list', | 10 | selector: 'my-followers-list', |
@@ -24,7 +22,7 @@ export class FollowingListComponent extends RestTable implements OnInit { | |||
24 | constructor ( | 22 | constructor ( |
25 | private notifier: Notifier, | 23 | private notifier: Notifier, |
26 | private confirmService: ConfirmService, | 24 | private confirmService: ConfirmService, |
27 | private followService: FollowService, | 25 | private followService: InstanceFollowService, |
28 | private i18n: I18n | 26 | private i18n: I18n |
29 | ) { | 27 | ) { |
30 | super() | 28 | super() |
diff --git a/client/src/app/+admin/follows/follows.routes.ts b/client/src/app/+admin/follows/follows.routes.ts index 8270ae444..817074536 100644 --- a/client/src/app/+admin/follows/follows.routes.ts +++ b/client/src/app/+admin/follows/follows.routes.ts | |||
@@ -1,11 +1,10 @@ | |||
1 | import { Routes } from '@angular/router' | 1 | import { Routes } from '@angular/router' |
2 | 2 | import { VideoRedundanciesListComponent } from '@app/+admin/follows/video-redundancies-list' | |
3 | import { UserRightGuard } from '../../core' | 3 | import { UserRightGuard } from '@app/core' |
4 | import { FollowsComponent } from './follows.component' | 4 | import { UserRight } from '@shared/models' |
5 | import { FollowersListComponent } from './followers-list' | 5 | import { FollowersListComponent } from './followers-list' |
6 | import { UserRight } from '../../../../../shared' | ||
7 | import { FollowingListComponent } from './following-list/following-list.component' | 6 | import { FollowingListComponent } from './following-list/following-list.component' |
8 | import { VideoRedundanciesListComponent } from '@app/+admin/follows/video-redundancies-list' | 7 | import { FollowsComponent } from './follows.component' |
9 | 8 | ||
10 | export const FollowsRoutes: Routes = [ | 9 | export const FollowsRoutes: Routes = [ |
11 | { | 10 | { |
diff --git a/client/src/app/+admin/follows/shared/redundancy-checkbox.component.ts b/client/src/app/+admin/follows/shared/redundancy-checkbox.component.ts index 9d7883d97..662143abc 100644 --- a/client/src/app/+admin/follows/shared/redundancy-checkbox.component.ts +++ b/client/src/app/+admin/follows/shared/redundancy-checkbox.component.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, Input } from '@angular/core' | 1 | import { Component, Input } from '@angular/core' |
2 | import { Notifier } from '@app/core' | 2 | import { Notifier } from '@app/core' |
3 | import { RedundancyService } from '@app/shared/shared-main' | ||
3 | import { I18n } from '@ngx-translate/i18n-polyfill' | 4 | import { I18n } from '@ngx-translate/i18n-polyfill' |
4 | import { RedundancyService } from '@app/shared/video/redundancy.service' | ||
5 | 5 | ||
6 | @Component({ | 6 | @Component({ |
7 | selector: 'my-redundancy-checkbox', | 7 | selector: 'my-redundancy-checkbox', |
diff --git a/client/src/app/+admin/follows/video-redundancies-list/index.ts b/client/src/app/+admin/follows/video-redundancies-list/index.ts index 6a7c7f483..07e734b1a 100644 --- a/client/src/app/+admin/follows/video-redundancies-list/index.ts +++ b/client/src/app/+admin/follows/video-redundancies-list/index.ts | |||
@@ -1 +1,2 @@ | |||
1 | export * from './video-redundancies-list.component' | 1 | export * from './video-redundancies-list.component' |
2 | export * from './video-redundancy-information.component' | ||
diff --git a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts index 267a1f58e..0048882bc 100644 --- a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts +++ b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts | |||
@@ -1,14 +1,12 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { BytesPipe } from 'ngx-pipes' |
2 | import { Notifier, ServerService } from '@app/core' | ||
3 | import { SortMeta } from 'primeng/api' | 2 | import { SortMeta } from 'primeng/api' |
4 | import { ConfirmService } from '../../../core/confirm/confirm.service' | 3 | import { Component, OnInit } from '@angular/core' |
5 | import { RestPagination, RestTable } from '../../../shared' | 4 | import { ConfirmService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' |
5 | import { peertubeLocalStorage } from '@app/helpers/peertube-web-storage' | ||
6 | import { RedundancyService } from '@app/shared/shared-main' | ||
6 | import { I18n } from '@ngx-translate/i18n-polyfill' | 7 | import { I18n } from '@ngx-translate/i18n-polyfill' |
7 | import { VideoRedundanciesTarget, VideoRedundancy } from '@shared/models' | 8 | import { VideoRedundanciesTarget, VideoRedundancy } from '@shared/models' |
8 | import { peertubeLocalStorage } from '@app/shared/misc/peertube-web-storage' | ||
9 | import { VideosRedundancyStats } from '@shared/models/server' | 9 | import { VideosRedundancyStats } from '@shared/models/server' |
10 | import { BytesPipe } from 'ngx-pipes' | ||
11 | import { RedundancyService } from '@app/shared/video/redundancy.service' | ||
12 | 10 | ||
13 | @Component({ | 11 | @Component({ |
14 | selector: 'my-video-redundancies-list', | 12 | selector: 'my-video-redundancies-list', |
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', |
diff --git a/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts b/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts index a8973f2b2..af31f1144 100644 --- a/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts +++ b/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts | |||
@@ -1,14 +1,13 @@ | |||
1 | import { Subject } from 'rxjs' | ||
1 | import { Component, OnInit } from '@angular/core' | 2 | import { Component, OnInit } from '@angular/core' |
2 | import { PluginType } from '@shared/models/plugins/plugin.type' | ||
3 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
4 | import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service' | ||
5 | import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' | ||
6 | import { ConfirmService, Notifier } from '@app/core' | ||
7 | import { PeerTubePlugin } from '@shared/models/plugins/peertube-plugin.model' | ||
8 | import { ActivatedRoute, Router } from '@angular/router' | 3 | import { ActivatedRoute, Router } from '@angular/router' |
9 | import { compareSemVer } from '@shared/core-utils/miscs/miscs' | 4 | import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service' |
5 | import { ComponentPagination, ConfirmService, hasMoreItems, Notifier } from '@app/core' | ||
10 | import { PluginService } from '@app/core/plugins/plugin.service' | 6 | import { PluginService } from '@app/core/plugins/plugin.service' |
11 | import { Subject } from 'rxjs' | 7 | import { I18n } from '@ngx-translate/i18n-polyfill' |
8 | import { compareSemVer } from '@shared/core-utils/miscs/miscs' | ||
9 | import { PeerTubePlugin } from '@shared/models/plugins/peertube-plugin.model' | ||
10 | import { PluginType } from '@shared/models/plugins/plugin.type' | ||
12 | 11 | ||
13 | @Component({ | 12 | @Component({ |
14 | selector: 'my-plugin-list-installed', | 13 | selector: 'my-plugin-list-installed', |
diff --git a/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts b/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts index dc59e759b..ccf9f1ed5 100644 --- a/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts +++ b/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts | |||
@@ -1,14 +1,12 @@ | |||
1 | import { Subject } from 'rxjs' | ||
2 | import { debounceTime, distinctUntilChanged } from 'rxjs/operators' | ||
1 | import { Component, OnInit } from '@angular/core' | 3 | import { Component, OnInit } from '@angular/core' |
2 | import { Notifier, ServerService } from '@app/core' | ||
3 | import { ConfirmService } from '../../../core' | ||
4 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
5 | import { PluginType } from '@shared/models/plugins/plugin.type' | ||
6 | import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service' | ||
7 | import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' | ||
8 | import { ActivatedRoute, Router } from '@angular/router' | 4 | import { ActivatedRoute, Router } from '@angular/router' |
5 | import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service' | ||
6 | import { ComponentPagination, ConfirmService, hasMoreItems, Notifier, ServerService } from '@app/core' | ||
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
9 | import { PeerTubePluginIndex } from '@shared/models/plugins/peertube-plugin-index.model' | 8 | import { PeerTubePluginIndex } from '@shared/models/plugins/peertube-plugin-index.model' |
10 | import { Subject } from 'rxjs' | 9 | import { PluginType } from '@shared/models/plugins/plugin.type' |
11 | import { debounceTime, distinctUntilChanged } from 'rxjs/operators' | ||
12 | 10 | ||
13 | @Component({ | 11 | @Component({ |
14 | selector: 'my-plugin-search', | 12 | selector: 'my-plugin-search', |
diff --git a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts index 13d12b145..dde03f1da 100644 --- a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts +++ b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts | |||
@@ -1,13 +1,12 @@ | |||
1 | import { Component, OnDestroy, OnInit } from '@angular/core' | ||
2 | import { PeerTubePlugin } from '@shared/models/plugins/peertube-plugin.model' | ||
3 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
4 | import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service' | ||
5 | import { Notifier } from '@app/core' | ||
6 | import { ActivatedRoute } from '@angular/router' | ||
7 | import { Subscription } from 'rxjs' | 1 | import { Subscription } from 'rxjs' |
8 | import { map, switchMap } from 'rxjs/operators' | 2 | import { map, switchMap } from 'rxjs/operators' |
9 | import { BuildFormArgument, FormReactive, FormValidatorService } from '@app/shared' | 3 | import { Component, OnDestroy, OnInit } from '@angular/core' |
10 | import { RegisterServerSettingOptions } from '@shared/models/plugins/register-server-setting.model' | 4 | import { ActivatedRoute } from '@angular/router' |
5 | import { Notifier } from '@app/core' | ||
6 | import { BuildFormArgument, FormReactive, FormValidatorService } from '@app/shared/shared-forms' | ||
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
8 | import { PeerTubePlugin, RegisterServerSettingOptions } from '@shared/models' | ||
9 | import { PluginApiService } from '../shared/plugin-api.service' | ||
11 | 10 | ||
12 | @Component({ | 11 | @Component({ |
13 | selector: 'my-plugin-show-installed', | 12 | selector: 'my-plugin-show-installed', |
diff --git a/client/src/app/+admin/plugins/shared/plugin-api.service.ts b/client/src/app/+admin/plugins/shared/plugin-api.service.ts index f6ef68e9c..bf9129e01 100644 --- a/client/src/app/+admin/plugins/shared/plugin-api.service.ts +++ b/client/src/app/+admin/plugins/shared/plugin-api.service.ts | |||
@@ -1,19 +1,21 @@ | |||
1 | import { Observable } from 'rxjs' | ||
1 | import { catchError, map, switchMap } from 'rxjs/operators' | 2 | import { catchError, map, switchMap } from 'rxjs/operators' |
2 | import { HttpClient, HttpParams } from '@angular/common/http' | 3 | import { HttpClient, HttpParams } from '@angular/common/http' |
3 | import { Injectable } from '@angular/core' | 4 | import { Injectable } from '@angular/core' |
4 | import { environment } from '../../../../environments/environment' | 5 | import { ComponentPagination, RestExtractor, RestService } from '@app/core' |
5 | import { RestExtractor, RestService } from '../../../shared' | ||
6 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
7 | import { PluginType } from '@shared/models/plugins/plugin.type' | ||
8 | import { ComponentPagination } from '@app/shared/rest/component-pagination.model' | ||
9 | import { peertubeTranslate, ResultList } from '@shared/models' | ||
10 | import { PeerTubePlugin } from '@shared/models/plugins/peertube-plugin.model' | ||
11 | import { ManagePlugin } from '@shared/models/plugins/manage-plugin.model' | ||
12 | import { InstallOrUpdatePlugin } from '@shared/models/plugins/install-plugin.model' | ||
13 | import { PeerTubePluginIndex } from '@shared/models/plugins/peertube-plugin-index.model' | ||
14 | import { RegisteredServerSettings, RegisterServerSettingOptions } from '@shared/models/plugins/register-server-setting.model' | ||
15 | import { PluginService } from '@app/core/plugins/plugin.service' | 6 | import { PluginService } from '@app/core/plugins/plugin.service' |
16 | import { Observable } from 'rxjs' | 7 | import { I18n } from '@ngx-translate/i18n-polyfill' |
8 | import { | ||
9 | InstallOrUpdatePlugin, | ||
10 | ManagePlugin, | ||
11 | PeerTubePlugin, | ||
12 | PeerTubePluginIndex, | ||
13 | peertubeTranslate, | ||
14 | PluginType, | ||
15 | RegisteredServerSettings, | ||
16 | ResultList | ||
17 | } from '@shared/models' | ||
18 | import { environment } from '../../../../environments/environment' | ||
17 | 19 | ||
18 | @Injectable() | 20 | @Injectable() |
19 | export class PluginApiService { | 21 | export class PluginApiService { |
diff --git a/client/src/app/+admin/system/debug/debug.component.ts b/client/src/app/+admin/system/debug/debug.component.ts index 8a77f79f7..a88d837f3 100644 --- a/client/src/app/+admin/system/debug/debug.component.ts +++ b/client/src/app/+admin/system/debug/debug.component.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { Notifier } from '@app/core' | 2 | import { Notifier } from '@app/core' |
3 | import { Debug } from '@shared/models/server' | 3 | import { Debug } from '@shared/models' |
4 | import { DebugService } from '@app/+admin/system/debug/debug.service' | 4 | import { DebugService } from './debug.service' |
5 | 5 | ||
6 | @Component({ | 6 | @Component({ |
7 | templateUrl: './debug.component.html', | 7 | templateUrl: './debug.component.html', |
diff --git a/client/src/app/+admin/system/debug/debug.service.ts b/client/src/app/+admin/system/debug/debug.service.ts index 6c722d177..ab1d0a7fa 100644 --- a/client/src/app/+admin/system/debug/debug.service.ts +++ b/client/src/app/+admin/system/debug/debug.service.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { Observable } from 'rxjs' | ||
1 | import { catchError } from 'rxjs/operators' | 2 | import { catchError } from 'rxjs/operators' |
2 | import { HttpClient } from '@angular/common/http' | 3 | import { HttpClient } from '@angular/common/http' |
3 | import { Injectable } from '@angular/core' | 4 | import { Injectable } from '@angular/core' |
4 | import { Observable } from 'rxjs' | 5 | import { RestExtractor } from '@app/core' |
6 | import { Debug } from '@shared/models' | ||
5 | import { environment } from '../../../../environments/environment' | 7 | import { environment } from '../../../../environments/environment' |
6 | import { RestExtractor, RestService } from '../../../shared' | ||
7 | import { Debug } from '@shared/models/server' | ||
8 | 8 | ||
9 | @Injectable() | 9 | @Injectable() |
10 | export class DebugService { | 10 | export class DebugService { |
@@ -12,7 +12,6 @@ export class DebugService { | |||
12 | 12 | ||
13 | constructor ( | 13 | constructor ( |
14 | private authHttp: HttpClient, | 14 | private authHttp: HttpClient, |
15 | private restService: RestService, | ||
16 | private restExtractor: RestExtractor | 15 | private restExtractor: RestExtractor |
17 | ) {} | 16 | ) {} |
18 | 17 | ||
diff --git a/client/src/app/+admin/system/index.ts b/client/src/app/+admin/system/index.ts index 226d999d2..8cced0cdb 100644 --- a/client/src/app/+admin/system/index.ts +++ b/client/src/app/+admin/system/index.ts | |||
@@ -1,3 +1,4 @@ | |||
1 | export * from './debug' | ||
1 | export * from './jobs' | 2 | export * from './jobs' |
2 | export * from './logs' | 3 | export * from './logs' |
3 | export * from './system.component' | 4 | export * from './system.component' |
diff --git a/client/src/app/+admin/system/jobs/job.service.ts b/client/src/app/+admin/system/jobs/job.service.ts index 1e2291ad1..1ac50f050 100644 --- a/client/src/app/+admin/system/jobs/job.service.ts +++ b/client/src/app/+admin/system/jobs/job.service.ts | |||
@@ -1,12 +1,11 @@ | |||
1 | import { SortMeta } from 'primeng/api' | ||
2 | import { Observable } from 'rxjs' | ||
1 | import { catchError, map } from 'rxjs/operators' | 3 | import { catchError, map } from 'rxjs/operators' |
2 | import { HttpClient, HttpParams } from '@angular/common/http' | 4 | import { HttpClient, HttpParams } from '@angular/common/http' |
3 | import { Injectable } from '@angular/core' | 5 | import { Injectable } from '@angular/core' |
4 | import { SortMeta } from 'primeng/api' | 6 | import { RestExtractor, RestPagination, RestService } from '@app/core' |
5 | import { Observable } from 'rxjs' | 7 | import { Job, ResultList } from '@shared/models' |
6 | import { ResultList } from '../../../../../../shared' | ||
7 | import { Job } from '../../../../../../shared/models/server/job.model' | ||
8 | import { environment } from '../../../../environments/environment' | 8 | import { environment } from '../../../../environments/environment' |
9 | import { RestExtractor, RestPagination, RestService } from '../../../shared' | ||
10 | import { JobStateClient } from '../../../../types/job-state-client.type' | 9 | import { JobStateClient } from '../../../../types/job-state-client.type' |
11 | import { JobTypeClient } from '../../../../types/job-type-client.type' | 10 | import { JobTypeClient } from '../../../../types/job-type-client.type' |
12 | 11 | ||
diff --git a/client/src/app/+admin/system/jobs/jobs.component.ts b/client/src/app/+admin/system/jobs/jobs.component.ts index 4f7f7c368..38a78de33 100644 --- a/client/src/app/+admin/system/jobs/jobs.component.ts +++ b/client/src/app/+admin/system/jobs/jobs.component.ts | |||
@@ -1,14 +1,12 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | ||
2 | import { peertubeLocalStorage } from '@app/shared/misc/peertube-web-storage' | ||
3 | import { Notifier } from '@app/core' | ||
4 | import { SortMeta } from 'primeng/api' | 1 | import { SortMeta } from 'primeng/api' |
5 | import { Job, JobType } from '../../../../../../shared/index' | 2 | import { Component, OnInit } from '@angular/core' |
6 | import { JobState } from '../../../../../../shared/models' | 3 | import { Notifier, RestPagination, RestTable } from '@app/core' |
7 | import { RestPagination, RestTable } from '../../../shared' | 4 | import { peertubeLocalStorage } from '@app/helpers/peertube-web-storage' |
8 | import { JobService } from './job.service' | ||
9 | import { I18n } from '@ngx-translate/i18n-polyfill' | 5 | import { I18n } from '@ngx-translate/i18n-polyfill' |
6 | import { Job, JobState, JobType } from '@shared/models' | ||
10 | import { JobStateClient } from '../../../../types/job-state-client.type' | 7 | import { JobStateClient } from '../../../../types/job-state-client.type' |
11 | import { JobTypeClient } from '../../../../types/job-type-client.type' | 8 | import { JobTypeClient } from '../../../../types/job-type-client.type' |
9 | import { JobService } from './job.service' | ||
12 | 10 | ||
13 | @Component({ | 11 | @Component({ |
14 | selector: 'my-jobs', | 12 | selector: 'my-jobs', |
diff --git a/client/src/app/+admin/system/logs/log-row.model.ts b/client/src/app/+admin/system/logs/log-row.model.ts index b22581b5a..615778210 100644 --- a/client/src/app/+admin/system/logs/log-row.model.ts +++ b/client/src/app/+admin/system/logs/log-row.model.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { LogLevel } from '@shared/models/server/log-level.type' | 1 | import { LogLevel } from '@shared/models' |
2 | import omit from 'lodash-es/omit' | 2 | import omit from 'lodash-es/omit' |
3 | 3 | ||
4 | export class LogRow { | 4 | export class LogRow { |
diff --git a/client/src/app/+admin/system/logs/logs.component.ts b/client/src/app/+admin/system/logs/logs.component.ts index b63f11953..51f047188 100644 --- a/client/src/app/+admin/system/logs/logs.component.ts +++ b/client/src/app/+admin/system/logs/logs.component.ts | |||
@@ -1,9 +1,9 @@ | |||
1 | import { Component, ElementRef, OnInit, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, OnInit, ViewChild } from '@angular/core' |
2 | import { LogsService } from '@app/+admin/system/logs/logs.service' | ||
3 | import { Notifier } from '@app/core' | 2 | import { Notifier } from '@app/core' |
4 | import { LogRow } from '@app/+admin/system/logs/log-row.model' | ||
5 | import { I18n } from '@ngx-translate/i18n-polyfill' | 3 | import { I18n } from '@ngx-translate/i18n-polyfill' |
6 | import { LogLevel } from '@shared/models/server/log-level.type' | 4 | import { LogLevel } from '@shared/models' |
5 | import { LogRow } from './log-row.model' | ||
6 | import { LogsService } from './logs.service' | ||
7 | 7 | ||
8 | @Component({ | 8 | @Component({ |
9 | templateUrl: './logs.component.html', | 9 | templateUrl: './logs.component.html', |
diff --git a/client/src/app/+admin/system/logs/logs.service.ts b/client/src/app/+admin/system/logs/logs.service.ts index 41b38c7ba..69439a179 100644 --- a/client/src/app/+admin/system/logs/logs.service.ts +++ b/client/src/app/+admin/system/logs/logs.service.ts | |||
@@ -1,11 +1,11 @@ | |||
1 | import { Observable } from 'rxjs' | ||
1 | import { catchError, map } from 'rxjs/operators' | 2 | import { catchError, map } from 'rxjs/operators' |
2 | import { HttpClient, HttpParams } from '@angular/common/http' | 3 | import { HttpClient, HttpParams } from '@angular/common/http' |
3 | import { Injectable } from '@angular/core' | 4 | import { Injectable } from '@angular/core' |
4 | import { Observable } from 'rxjs' | 5 | import { RestExtractor } from '@app/core' |
6 | import { LogLevel } from '@shared/models' | ||
5 | import { environment } from '../../../../environments/environment' | 7 | import { environment } from '../../../../environments/environment' |
6 | import { RestExtractor, RestService } from '../../../shared' | 8 | import { LogRow } from './log-row.model' |
7 | import { LogRow } from '@app/+admin/system/logs/log-row.model' | ||
8 | import { LogLevel } from '@shared/models/server/log-level.type' | ||
9 | 9 | ||
10 | @Injectable() | 10 | @Injectable() |
11 | export class LogsService { | 11 | export class LogsService { |
@@ -14,7 +14,6 @@ export class LogsService { | |||
14 | 14 | ||
15 | constructor ( | 15 | constructor ( |
16 | private authHttp: HttpClient, | 16 | private authHttp: HttpClient, |
17 | private restService: RestService, | ||
18 | private restExtractor: RestExtractor | 17 | private restExtractor: RestExtractor |
19 | ) {} | 18 | ) {} |
20 | 19 | ||
diff --git a/client/src/app/+admin/system/system.routes.ts b/client/src/app/+admin/system/system.routes.ts index 2d851794d..0e8d98519 100644 --- a/client/src/app/+admin/system/system.routes.ts +++ b/client/src/app/+admin/system/system.routes.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { Routes } from '@angular/router' | 1 | import { Routes } from '@angular/router' |
2 | import { UserRightGuard } from '../../core' | 2 | import { UserRightGuard } from '@app/core' |
3 | import { UserRight } from '../../../../../shared' | 3 | import { UserRight } from '@shared/models' |
4 | import { JobsComponent } from '@app/+admin/system/jobs/jobs.component' | 4 | import { DebugComponent } from './debug' |
5 | import { LogsComponent } from '@app/+admin/system/logs' | 5 | import { JobsComponent } from './jobs/jobs.component' |
6 | import { SystemComponent } from '@app/+admin/system/system.component' | 6 | import { LogsComponent } from './logs' |
7 | import { DebugComponent } from '@app/+admin/system/debug' | 7 | import { SystemComponent } from './system.component' |
8 | 8 | ||
9 | export const SystemRoutes: Routes = [ | 9 | export const SystemRoutes: Routes = [ |
10 | { | 10 | { |
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 b459eb8fa..f9f5b90bd 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 | |||
@@ -1,14 +1,11 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { Router, ActivatedRoute } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { AuthService, Notifier, ServerService } from '@app/core' | ||
4 | import { UserCreate, UserRole } from '../../../../../../shared' | ||
5 | import { UserEdit } from './user-edit' | ||
6 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
7 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' | ||
8 | import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service' | ||
9 | import { ConfigService } from '@app/+admin/config/shared/config.service' | 3 | import { ConfigService } from '@app/+admin/config/shared/config.service' |
10 | import { UserService } from '@app/shared' | 4 | import { AuthService, Notifier, ScreenService, ServerService, UserService } from '@app/core' |
11 | import { ScreenService } from '@app/shared/misc/screen.service' | 5 | import { FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' |
6 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
7 | import { UserCreate, UserRole } from '@shared/models' | ||
8 | import { UserEdit } from './user-edit' | ||
12 | 9 | ||
13 | @Component({ | 10 | @Component({ |
14 | selector: 'my-user-create', | 11 | selector: 'my-user-create', |
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 5f5cc590c..8fa4b0635 100644 --- a/client/src/app/+admin/users/user-edit/user-edit.ts +++ b/client/src/app/+admin/users/user-edit/user-edit.ts | |||
@@ -1,11 +1,8 @@ | |||
1 | import { AuthService, ServerService } from '../../../core' | ||
2 | import { FormReactive } from '../../../shared' | ||
3 | import { ServerConfig, USER_ROLE_LABELS, UserRole, VideoResolution } from '../../../../../../shared' | ||
4 | import { ConfigService } from '@app/+admin/config/shared/config.service' | ||
5 | import { UserAdminFlag } from '@shared/models/users/user-flag.model' | ||
6 | import { OnInit } from '@angular/core' | 1 | import { OnInit } from '@angular/core' |
7 | import { User } from '@app/shared/users/user.model' | 2 | import { ConfigService } from '@app/+admin/config/shared/config.service' |
8 | import { ScreenService } from '@app/shared/misc/screen.service' | 3 | import { AuthService, ScreenService, ServerService, User } from '@app/core' |
4 | import { FormReactive } from '@app/shared/shared-forms' | ||
5 | import { ServerConfig, USER_ROLE_LABELS, UserAdminFlag, UserRole, VideoResolution } from '@shared/models' | ||
9 | 6 | ||
10 | export abstract class UserEdit extends FormReactive implements OnInit { | 7 | export abstract class UserEdit extends FormReactive implements OnInit { |
11 | videoQuotaOptions: { value: string, label: string, disabled?: boolean }[] = [] | 8 | videoQuotaOptions: { value: string, label: string, disabled?: boolean }[] = [] |
diff --git a/client/src/app/+admin/users/user-edit/user-password.component.ts b/client/src/app/+admin/users/user-edit/user-password.component.ts index ecad000f7..33c7de31f 100644 --- a/client/src/app/+admin/users/user-edit/user-password.component.ts +++ b/client/src/app/+admin/users/user-edit/user-password.component.ts | |||
@@ -1,12 +1,8 @@ | |||
1 | import { Component, Input, OnInit } from '@angular/core' | 1 | import { Component, Input, OnInit } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { Notifier, UserService } from '@app/core' |
3 | import { UserService } from '@app/shared/users/user.service' | 3 | import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' |
4 | import { Notifier } from '../../../core' | ||
5 | import { User, UserUpdate } from '../../../../../../shared' | ||
6 | import { I18n } from '@ngx-translate/i18n-polyfill' | 4 | import { I18n } from '@ngx-translate/i18n-polyfill' |
7 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' | 5 | import { UserUpdate } from '@shared/models' |
8 | import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service' | ||
9 | import { FormReactive } from '../../../shared' | ||
10 | 6 | ||
11 | @Component({ | 7 | @Component({ |
12 | selector: 'my-user-password', | 8 | selector: 'my-user-password', |
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 035c0d4bb..870880fee 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 | |||
@@ -1,18 +1,12 @@ | |||
1 | import { Subscription } from 'rxjs' | ||
1 | import { Component, OnDestroy, OnInit } from '@angular/core' | 2 | import { Component, OnDestroy, OnInit } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | 3 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { Subscription } from 'rxjs' | ||
4 | import { AuthService, Notifier } from '@app/core' | ||
5 | import { ServerService } from '../../../core' | ||
6 | import { UserEdit } from './user-edit' | ||
7 | import { User as UserType, UserUpdate, UserRole } from '../../../../../../shared' | ||
8 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
9 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' | ||
10 | import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service' | ||
11 | import { ConfigService } from '@app/+admin/config/shared/config.service' | 4 | import { ConfigService } from '@app/+admin/config/shared/config.service' |
12 | import { UserService } from '@app/shared' | 5 | import { AuthService, Notifier, ScreenService, ServerService, User, UserService } from '@app/core' |
13 | import { UserAdminFlag } from '@shared/models/users/user-flag.model' | 6 | import { FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' |
14 | import { User } from '@app/shared/users/user.model' | 7 | import { I18n } from '@ngx-translate/i18n-polyfill' |
15 | import { ScreenService } from '@app/shared/misc/screen.service' | 8 | import { User as UserType, UserAdminFlag, UserRole, UserUpdate } from '@shared/models' |
9 | import { UserEdit } from './user-edit' | ||
16 | 10 | ||
17 | @Component({ | 11 | @Component({ |
18 | selector: 'my-user-update', | 12 | selector: 'my-user-update', |
diff --git a/client/src/app/+admin/users/user-list/user-list.component.ts b/client/src/app/+admin/users/user-list/user-list.component.ts index da50b7ed0..8f01c7d51 100644 --- a/client/src/app/+admin/users/user-list/user-list.component.ts +++ b/client/src/app/+admin/users/user-list/user-list.component.ts | |||
@@ -1,13 +1,10 @@ | |||
1 | import { Component, OnInit, ViewChild } from '@angular/core' | ||
2 | import { AuthService, Notifier } from '@app/core' | ||
3 | import { SortMeta } from 'primeng/api' | 1 | import { SortMeta } from 'primeng/api' |
4 | import { ConfirmService, ServerService } from '../../../core' | 2 | import { Component, OnInit, ViewChild } from '@angular/core' |
5 | import { RestPagination, RestTable, UserService } from '../../../shared' | 3 | import { AuthService, ConfirmService, Notifier, RestPagination, RestTable, ServerService, UserService } from '@app/core' |
4 | import { Actor, DropdownAction } from '@app/shared/shared-main' | ||
5 | import { UserBanModalComponent } from '@app/shared/shared-moderation' | ||
6 | import { I18n } from '@ngx-translate/i18n-polyfill' | 6 | import { I18n } from '@ngx-translate/i18n-polyfill' |
7 | import { ServerConfig, User } from '../../../../../../shared' | 7 | import { ServerConfig, User } from '@shared/models' |
8 | import { UserBanModalComponent } from '@app/shared/moderation' | ||
9 | import { DropdownAction } from '@app/shared/buttons/action-dropdown.component' | ||
10 | import { Actor } from '@app/shared/actor/actor.model' | ||
11 | 8 | ||
12 | @Component({ | 9 | @Component({ |
13 | selector: 'my-user-list', | 10 | selector: 'my-user-list', |
diff --git a/client/src/app/+admin/users/users.routes.ts b/client/src/app/+admin/users/users.routes.ts index 2d4f9305e..6560f0260 100644 --- a/client/src/app/+admin/users/users.routes.ts +++ b/client/src/app/+admin/users/users.routes.ts | |||
@@ -1,11 +1,9 @@ | |||
1 | import { Routes } from '@angular/router' | 1 | import { Routes } from '@angular/router' |
2 | 2 | import { ServerConfigResolver, UserRightGuard } from '@app/core' | |
3 | import { UserRightGuard } from '../../core' | 3 | import { UserRight } from '@shared/models' |
4 | import { UserRight } from '../../../../../shared' | ||
5 | import { UsersComponent } from './users.component' | ||
6 | import { UserCreateComponent, UserUpdateComponent } from './user-edit' | 4 | import { UserCreateComponent, UserUpdateComponent } from './user-edit' |
7 | import { UserListComponent } from './user-list' | 5 | import { UserListComponent } from './user-list' |
8 | import { ServerConfigResolver } from '@app/core/routing/server-config-resolver.service' | 6 | import { UsersComponent } from './users.component' |
9 | 7 | ||
10 | export const UsersRoutes: Routes = [ | 8 | export const UsersRoutes: Routes = [ |
11 | { | 9 | { |