diff options
author | Chocobozzz <me@florianbigard.com> | 2020-06-23 14:10:17 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-06-23 16:00:49 +0200 |
commit | 67ed6552b831df66713bac9e672738796128d33f (patch) | |
tree | 59c97d41e0b49d75a90aa3de987968ab9b1ff447 /client/src/app/+about | |
parent | 0c4bacbff53bc732f5a2677d62a6ead7752e2405 (diff) | |
download | PeerTube-67ed6552b831df66713bac9e672738796128d33f.tar.gz PeerTube-67ed6552b831df66713bac9e672738796128d33f.tar.zst PeerTube-67ed6552b831df66713bac9e672738796128d33f.zip |
Reorganize client shared modules
Diffstat (limited to 'client/src/app/+about')
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 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | ||
2 | import { FollowService } from '@app/shared/instance/follow.service' | ||
3 | import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' | ||
4 | import { Notifier } from '@app/core' | ||
5 | import { RestService } from '@app/shared' | ||
6 | import { SortMeta } from 'primeng/api' | 1 | import { SortMeta } from 'primeng/api' |
7 | import { Subject } from 'rxjs' | 2 | import { Subject } from 'rxjs' |
3 | import { Component, OnInit } from '@angular/core' | ||
4 | import { ComponentPagination, hasMoreItems, Notifier, RestService } from '@app/core' | ||
5 | import { 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 @@ | |||
1 | import { Component, OnInit, ViewChild, AfterViewChecked } from '@angular/core' | 1 | import { ViewportScroller } from '@angular/common' |
2 | import { Notifier, ServerService } from '@app/core' | 2 | import { AfterViewChecked, Component, OnInit, ViewChild } from '@angular/core' |
3 | import { ActivatedRoute } from '@angular/router' | ||
3 | import { ContactAdminModalComponent } from '@app/+about/about-instance/contact-admin-modal.component' | 4 | import { ContactAdminModalComponent } from '@app/+about/about-instance/contact-admin-modal.component' |
4 | import { InstanceService } from '@app/shared/instance/instance.service' | 5 | import { ServerService } from '@app/core' |
6 | import { InstanceService } from '@app/shared/shared-instance' | ||
5 | import { ServerConfig } from '@shared/models' | 7 | import { ServerConfig } from '@shared/models' |
6 | import { ActivatedRoute } from '@angular/router' | ||
7 | import { ResolverData } from './about-instance.resolver' | 8 | import { ResolverData } from './about-instance.resolver' |
8 | import { 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 @@ | |||
1 | import { forkJoin } from 'rxjs' | ||
2 | import { map, switchMap } from 'rxjs/operators' | ||
1 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
2 | import { ActivatedRouteSnapshot, Resolve } from '@angular/router' | 4 | import { ActivatedRouteSnapshot, Resolve } from '@angular/router' |
3 | import { map, switchMap } from 'rxjs/operators' | 5 | import { InstanceService } from '@app/shared/shared-instance' |
4 | import { forkJoin } from 'rxjs' | ||
5 | import { InstanceService } from '@app/shared/instance/instance.service' | ||
6 | import { About } from '@shared/models/server' | 6 | import { About } from '@shared/models/server' |
7 | 7 | ||
8 | export type ResolverData = { about: About, languages: string[], categories: string[] } | 8 | export type ResolverData = { about: About, languages: string[], categories: string[] } |
9 | 9 | ||
10 | @Injectable() | 10 | @Injectable() |
11 | export class AboutInstanceResolver implements Resolve<any> { | 11 | export 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 @@ | |||
1 | import { Component, OnInit, ViewChild } from '@angular/core' | 1 | import { Component, OnInit, ViewChild } from '@angular/core' |
2 | import { Notifier, ServerService } from '@app/core' | 2 | import { Notifier, ServerService } from '@app/core' |
3 | import { I18n } from '@ngx-translate/i18n-polyfill' | 3 | import { FormReactive, FormValidatorService, InstanceValidatorsService } from '@app/shared/shared-forms' |
4 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' | 4 | import { InstanceService } from '@app/shared/shared-instance' |
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 { FormReactive, InstanceValidatorsService } from '@app/shared' | 7 | import { I18n } from '@ngx-translate/i18n-polyfill' |
8 | import { InstanceService } from '@app/shared/instance/instance.service' | ||
9 | import { ServerConfig } from '@shared/models' | 8 | import { 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 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { MarkdownService } from '@app/shared/renderer' | 2 | import { 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 @@ | |||
1 | import { NgModule } from '@angular/core' | 1 | import { NgModule } from '@angular/core' |
2 | import { AboutRoutingModule } from './about-routing.module' | 2 | import { AboutFollowsComponent } from '@app/+about/about-follows/about-follows.component' |
3 | import { AboutComponent } from './about.component' | ||
4 | import { SharedModule } from '../shared' | ||
5 | import { AboutInstanceComponent } from '@app/+about/about-instance/about-instance.component' | 3 | import { AboutInstanceComponent } from '@app/+about/about-instance/about-instance.component' |
6 | import { AboutPeertubeComponent } from '@app/+about/about-peertube/about-peertube.component' | 4 | import { AboutInstanceResolver } from '@app/+about/about-instance/about-instance.resolver' |
7 | import { ContactAdminModalComponent } from '@app/+about/about-instance/contact-admin-modal.component' | 5 | import { ContactAdminModalComponent } from '@app/+about/about-instance/contact-admin-modal.component' |
8 | import { AboutFollowsComponent } from '@app/+about/about-follows/about-follows.component' | ||
9 | import { AboutPeertubeContributorsComponent } from '@app/+about/about-peertube/about-peertube-contributors.component' | 6 | import { AboutPeertubeContributorsComponent } from '@app/+about/about-peertube/about-peertube-contributors.component' |
10 | import { AboutInstanceResolver } from '@app/+about/about-instance/about-instance.resolver' | 7 | import { AboutPeertubeComponent } from '@app/+about/about-peertube/about-peertube.component' |
8 | import { SharedFormModule } from '@app/shared/shared-forms' | ||
9 | import { SharedGlobalIconModule } from '@app/shared/shared-icons' | ||
10 | import { SharedInstanceModule } from '@app/shared/shared-instance' | ||
11 | import { SharedMainModule } from '@app/shared/shared-main' | ||
12 | import { AboutRoutingModule } from './about-routing.module' | ||
13 | import { 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: [ |