aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+about
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-06-23 14:10:17 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-06-23 16:00:49 +0200
commit67ed6552b831df66713bac9e672738796128d33f (patch)
tree59c97d41e0b49d75a90aa3de987968ab9b1ff447 /client/src/app/+about
parent0c4bacbff53bc732f5a2677d62a6ead7752e2405 (diff)
downloadPeerTube-67ed6552b831df66713bac9e672738796128d33f.tar.gz
PeerTube-67ed6552b831df66713bac9e672738796128d33f.tar.zst
PeerTube-67ed6552b831df66713bac9e672738796128d33f.zip
Reorganize client shared modules
Diffstat (limited to 'client/src/app/+about')
-rw-r--r--client/src/app/+about/about-follows/about-follows.component.ts10
-rw-r--r--client/src/app/+about/about-instance/about-instance.component.ts10
-rw-r--r--client/src/app/+about/about-instance/about-instance.resolver.ts11
-rw-r--r--client/src/app/+about/about-instance/contact-admin-modal.component.ts7
-rw-r--r--client/src/app/+about/about-peertube/about-peertube-contributors.component.ts2
-rw-r--r--client/src/app/+about/about.module.ts21
6 files changed, 32 insertions, 29 deletions
diff --git a/client/src/app/+about/about-follows/about-follows.component.ts b/client/src/app/+about/about-follows/about-follows.component.ts
index fc265fecb..17c6903b8 100644
--- a/client/src/app/+about/about-follows/about-follows.component.ts
+++ b/client/src/app/+about/about-follows/about-follows.component.ts
@@ -1,10 +1,8 @@
1import { Component, OnInit } from '@angular/core'
2import { FollowService } from '@app/shared/instance/follow.service'
3import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model'
4import { Notifier } from '@app/core'
5import { RestService } from '@app/shared'
6import { SortMeta } from 'primeng/api' 1import { SortMeta } from 'primeng/api'
7import { Subject } from 'rxjs' 2import { Subject } from 'rxjs'
3import { Component, OnInit } from '@angular/core'
4import { ComponentPagination, hasMoreItems, Notifier, RestService } from '@app/core'
5import { InstanceFollowService } from '@app/shared/shared-instance'
8 6
9@Component({ 7@Component({
10 selector: 'my-about-follows', 8 selector: 'my-about-follows',
@@ -38,7 +36,7 @@ export class AboutFollowsComponent implements OnInit {
38 constructor ( 36 constructor (
39 private restService: RestService, 37 private restService: RestService,
40 private notifier: Notifier, 38 private notifier: Notifier,
41 private followService: FollowService 39 private followService: InstanceFollowService
42 ) { } 40 ) { }
43 41
44 ngOnInit () { 42 ngOnInit () {
diff --git a/client/src/app/+about/about-instance/about-instance.component.ts b/client/src/app/+about/about-instance/about-instance.component.ts
index 15841be74..c57ac69ab 100644
--- a/client/src/app/+about/about-instance/about-instance.component.ts
+++ b/client/src/app/+about/about-instance/about-instance.component.ts
@@ -1,11 +1,11 @@
1import { Component, OnInit, ViewChild, AfterViewChecked } from '@angular/core' 1import { ViewportScroller } from '@angular/common'
2import { Notifier, ServerService } from '@app/core' 2import { AfterViewChecked, Component, OnInit, ViewChild } from '@angular/core'
3import { ActivatedRoute } from '@angular/router'
3import { ContactAdminModalComponent } from '@app/+about/about-instance/contact-admin-modal.component' 4import { ContactAdminModalComponent } from '@app/+about/about-instance/contact-admin-modal.component'
4import { InstanceService } from '@app/shared/instance/instance.service' 5import { ServerService } from '@app/core'
6import { InstanceService } from '@app/shared/shared-instance'
5import { ServerConfig } from '@shared/models' 7import { ServerConfig } from '@shared/models'
6import { ActivatedRoute } from '@angular/router'
7import { ResolverData } from './about-instance.resolver' 8import { ResolverData } from './about-instance.resolver'
8import { ViewportScroller } from '@angular/common'
9 9
10@Component({ 10@Component({
11 selector: 'my-about-instance', 11 selector: 'my-about-instance',
diff --git a/client/src/app/+about/about-instance/about-instance.resolver.ts b/client/src/app/+about/about-instance/about-instance.resolver.ts
index 94c6abe5a..b2349ba12 100644
--- a/client/src/app/+about/about-instance/about-instance.resolver.ts
+++ b/client/src/app/+about/about-instance/about-instance.resolver.ts
@@ -1,17 +1,16 @@
1import { forkJoin } from 'rxjs'
2import { map, switchMap } from 'rxjs/operators'
1import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
2import { ActivatedRouteSnapshot, Resolve } from '@angular/router' 4import { ActivatedRouteSnapshot, Resolve } from '@angular/router'
3import { map, switchMap } from 'rxjs/operators' 5import { InstanceService } from '@app/shared/shared-instance'
4import { forkJoin } from 'rxjs'
5import { InstanceService } from '@app/shared/instance/instance.service'
6import { About } from '@shared/models/server' 6import { About } from '@shared/models/server'
7 7
8export type ResolverData = { about: About, languages: string[], categories: string[] } 8export type ResolverData = { about: About, languages: string[], categories: string[] }
9 9
10@Injectable() 10@Injectable()
11export class AboutInstanceResolver implements Resolve<any> { 11export class AboutInstanceResolver implements Resolve<any> {
12 constructor ( 12
13 private instanceService: InstanceService 13 constructor (private instanceService: InstanceService) {}
14 ) {}
15 14
16 resolve (route: ActivatedRouteSnapshot) { 15 resolve (route: ActivatedRouteSnapshot) {
17 return this.instanceService.getAbout() 16 return this.instanceService.getAbout()
diff --git a/client/src/app/+about/about-instance/contact-admin-modal.component.ts b/client/src/app/+about/about-instance/contact-admin-modal.component.ts
index d5e146b82..5199402e6 100644
--- a/client/src/app/+about/about-instance/contact-admin-modal.component.ts
+++ b/client/src/app/+about/about-instance/contact-admin-modal.component.ts
@@ -1,11 +1,10 @@
1import { Component, OnInit, ViewChild } from '@angular/core' 1import { Component, OnInit, ViewChild } from '@angular/core'
2import { Notifier, ServerService } from '@app/core' 2import { Notifier, ServerService } from '@app/core'
3import { I18n } from '@ngx-translate/i18n-polyfill' 3import { FormReactive, FormValidatorService, InstanceValidatorsService } from '@app/shared/shared-forms'
4import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' 4import { InstanceService } from '@app/shared/shared-instance'
5import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 5import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
6import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' 6import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
7import { FormReactive, InstanceValidatorsService } from '@app/shared' 7import { I18n } from '@ngx-translate/i18n-polyfill'
8import { InstanceService } from '@app/shared/instance/instance.service'
9import { ServerConfig } from '@shared/models' 8import { ServerConfig } from '@shared/models'
10 9
11@Component({ 10@Component({
diff --git a/client/src/app/+about/about-peertube/about-peertube-contributors.component.ts b/client/src/app/+about/about-peertube/about-peertube-contributors.component.ts
index fa2c0daa0..da1fcdc92 100644
--- a/client/src/app/+about/about-peertube/about-peertube-contributors.component.ts
+++ b/client/src/app/+about/about-peertube/about-peertube-contributors.component.ts
@@ -1,5 +1,5 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { MarkdownService } from '@app/shared/renderer' 2import { MarkdownService } from '@app/core'
3 3
4@Component({ 4@Component({
5 selector: 'my-about-peertube-contributors', 5 selector: 'my-about-peertube-contributors',
diff --git a/client/src/app/+about/about.module.ts b/client/src/app/+about/about.module.ts
index 84d697540..1aca14033 100644
--- a/client/src/app/+about/about.module.ts
+++ b/client/src/app/+about/about.module.ts
@@ -1,18 +1,25 @@
1import { NgModule } from '@angular/core' 1import { NgModule } from '@angular/core'
2import { AboutRoutingModule } from './about-routing.module' 2import { AboutFollowsComponent } from '@app/+about/about-follows/about-follows.component'
3import { AboutComponent } from './about.component'
4import { SharedModule } from '../shared'
5import { AboutInstanceComponent } from '@app/+about/about-instance/about-instance.component' 3import { AboutInstanceComponent } from '@app/+about/about-instance/about-instance.component'
6import { AboutPeertubeComponent } from '@app/+about/about-peertube/about-peertube.component' 4import { AboutInstanceResolver } from '@app/+about/about-instance/about-instance.resolver'
7import { ContactAdminModalComponent } from '@app/+about/about-instance/contact-admin-modal.component' 5import { ContactAdminModalComponent } from '@app/+about/about-instance/contact-admin-modal.component'
8import { AboutFollowsComponent } from '@app/+about/about-follows/about-follows.component'
9import { AboutPeertubeContributorsComponent } from '@app/+about/about-peertube/about-peertube-contributors.component' 6import { AboutPeertubeContributorsComponent } from '@app/+about/about-peertube/about-peertube-contributors.component'
10import { AboutInstanceResolver } from '@app/+about/about-instance/about-instance.resolver' 7import { AboutPeertubeComponent } from '@app/+about/about-peertube/about-peertube.component'
8import { SharedFormModule } from '@app/shared/shared-forms'
9import { SharedGlobalIconModule } from '@app/shared/shared-icons'
10import { SharedInstanceModule } from '@app/shared/shared-instance'
11import { SharedMainModule } from '@app/shared/shared-main'
12import { AboutRoutingModule } from './about-routing.module'
13import { AboutComponent } from './about.component'
11 14
12@NgModule({ 15@NgModule({
13 imports: [ 16 imports: [
14 AboutRoutingModule, 17 AboutRoutingModule,
15 SharedModule 18
19 SharedMainModule,
20 SharedFormModule,
21 SharedInstanceModule,
22 SharedGlobalIconModule
16 ], 23 ],
17 24
18 declarations: [ 25 declarations: [