aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-24 11:04:02 +0200
committerChocobozzz <me@florianbigard.com>2018-08-27 09:41:54 +0200
commitf5b0af50c85e2f8b6b2b054ac1f47123cacbe08d (patch)
tree1b2f8a578b2d35138ac326d65674a9c9d740e8c9 /client/src/app
parentaa55a4da422330fe2816f1764b64f6607a0ca4aa (diff)
downloadPeerTube-f5b0af50c85e2f8b6b2b054ac1f47123cacbe08d.tar.gz
PeerTube-f5b0af50c85e2f8b6b2b054ac1f47123cacbe08d.tar.zst
PeerTube-f5b0af50c85e2f8b6b2b054ac1f47123cacbe08d.zip
Search video channel handle/uri
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/+accounts/account-video-channels/account-video-channels.component.html2
-rw-r--r--client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.html6
-rw-r--r--client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.html8
-rw-r--r--client/src/app/+video-channels/video-channels.component.scss7
-rw-r--r--client/src/app/search/search.component.html6
-rw-r--r--client/src/app/shared/video/video.service.ts12
6 files changed, 14 insertions, 27 deletions
diff --git a/client/src/app/+accounts/account-video-channels/account-video-channels.component.html b/client/src/app/+accounts/account-video-channels/account-video-channels.component.html
index 114a9e517..c3ef1d894 100644
--- a/client/src/app/+accounts/account-video-channels/account-video-channels.component.html
+++ b/client/src/app/+accounts/account-video-channels/account-video-channels.component.html
@@ -1,6 +1,6 @@
1<div *ngIf="account" class="row"> 1<div *ngIf="account" class="row">
2 <a 2 <a
3 *ngFor="let videoChannel of videoChannels" [routerLink]="[ '/video-channels', videoChannel.name ]" 3 *ngFor="let videoChannel of videoChannels" [routerLink]="[ '/video-channels', videoChannel.nameWithHost ]"
4 class="video-channel" i18n-title title="See this video channel" 4 class="video-channel" i18n-title title="See this video channel"
5 > 5 >
6 <img [src]="videoChannel.avatarUrl" alt="Avatar" /> 6 <img [src]="videoChannel.avatarUrl" alt="Avatar" />
diff --git a/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.html b/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.html
index 3752de49f..2d76990f7 100644
--- a/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.html
+++ b/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.html
@@ -1,13 +1,13 @@
1<div class="video-channels" myInfiniteScroller [autoInit]="true" (nearOfBottom)="onNearOfBottom()"> 1<div class="video-channels" myInfiniteScroller [autoInit]="true" (nearOfBottom)="onNearOfBottom()">
2 <div *ngFor="let videoChannel of videoChannels" class="video-channel"> 2 <div *ngFor="let videoChannel of videoChannels" class="video-channel">
3 <a [routerLink]="[ '/video-channels', videoChannel.name ]"> 3 <a [routerLink]="[ '/video-channels', videoChannel.nameWithHost ]">
4 <img [src]="videoChannel.avatarUrl" alt="Avatar" /> 4 <img [src]="videoChannel.avatarUrl" alt="Avatar" />
5 </a> 5 </a>
6 6
7 <div class="video-channel-info"> 7 <div class="video-channel-info">
8 <a [routerLink]="[ '/video-channels', videoChannel.name ]" class="video-channel-names" i18n-title title="Go to the channel"> 8 <a [routerLink]="[ '/video-channels', videoChannel.nameWithHost ]" class="video-channel-names" i18n-title title="Go to the channel">
9 <div class="video-channel-display-name">{{ videoChannel.displayName }}</div> 9 <div class="video-channel-display-name">{{ videoChannel.displayName }}</div>
10 <div class="video-channel-name">{{ videoChannel.name }}</div> 10 <div class="video-channel-name">{{ videoChannel.nameWithHost }}</div>
11 </a> 11 </a>
12 12
13 <div i18n class="video-channel-followers">{{ videoChannel.followersCount }} subscribers</div> 13 <div i18n class="video-channel-followers">{{ videoChannel.followersCount }} subscribers</div>
diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.html b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.html
index 548645a76..df74b19b6 100644
--- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.html
+++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.html
@@ -7,14 +7,14 @@
7 7
8<div class="video-channels"> 8<div class="video-channels">
9 <div *ngFor="let videoChannel of videoChannels" class="video-channel"> 9 <div *ngFor="let videoChannel of videoChannels" class="video-channel">
10 <a [routerLink]="[ '/video-channels', videoChannel.name ]"> 10 <a [routerLink]="[ '/video-channels', videoChannel.nameWithHost ]">
11 <img [src]="videoChannel.avatarUrl" alt="Avatar" /> 11 <img [src]="videoChannel.avatarUrl" alt="Avatar" />
12 </a> 12 </a>
13 13
14 <div class="video-channel-info"> 14 <div class="video-channel-info">
15 <a [routerLink]="[ '/video-channels', videoChannel.name ]" class="video-channel-names" i18n-title title="Go to the channel"> 15 <a [routerLink]="[ '/video-channels', videoChannel.nameWithHost ]" class="video-channel-names" i18n-title title="Go to the channel">
16 <div class="video-channel-display-name">{{ videoChannel.displayName }}</div> 16 <div class="video-channel-display-name">{{ videoChannel.displayName }}</div>
17 <div class="video-channel-name">{{ videoChannel.name }}</div> 17 <div class="video-channel-name">{{ videoChannel.nameWithHost }}</div>
18 </a> 18 </a>
19 19
20 <div i18n class="video-channel-followers">{{ videoChannel.followersCount }} subscribers</div> 20 <div i18n class="video-channel-followers">{{ videoChannel.followersCount }} subscribers</div>
@@ -23,7 +23,7 @@
23 <div class="video-channel-buttons"> 23 <div class="video-channel-buttons">
24 <my-delete-button (click)="deleteVideoChannel(videoChannel)"></my-delete-button> 24 <my-delete-button (click)="deleteVideoChannel(videoChannel)"></my-delete-button>
25 25
26 <my-edit-button [routerLink]="[ 'update', videoChannel.name ]"></my-edit-button> 26 <my-edit-button [routerLink]="[ 'update', videoChannel.nameWithHost ]"></my-edit-button>
27 </div> 27 </div>
28 </div> 28 </div>
29</div> 29</div>
diff --git a/client/src/app/+video-channels/video-channels.component.scss b/client/src/app/+video-channels/video-channels.component.scss
index a63b1ec06..711b1839d 100644
--- a/client/src/app/+video-channels/video-channels.component.scss
+++ b/client/src/app/+video-channels/video-channels.component.scss
@@ -11,11 +11,4 @@
11 .actor-name { 11 .actor-name {
12 flex-grow: 1; 12 flex-grow: 1;
13 } 13 }
14
15 my-subscribe-button {
16 /deep/ span[role=button] {
17 padding: 7px 12px;
18 font-size: 16px;
19 }
20 }
21} \ No newline at end of file 14} \ No newline at end of file
diff --git a/client/src/app/search/search.component.html b/client/src/app/search/search.component.html
index 83d014987..0d09ebbe6 100644
--- a/client/src/app/search/search.component.html
+++ b/client/src/app/search/search.component.html
@@ -27,14 +27,14 @@
27 </div> 27 </div>
28 28
29 <div *ngFor="let videoChannel of videoChannels" class="entry video-channel"> 29 <div *ngFor="let videoChannel of videoChannels" class="entry video-channel">
30 <a [routerLink]="[ '/video-channels', videoChannel.name ]"> 30 <a [routerLink]="[ '/video-channels', videoChannel.nameWithHost ]">
31 <img [src]="videoChannel.avatarUrl" alt="Avatar" /> 31 <img [src]="videoChannel.avatarUrl" alt="Avatar" />
32 </a> 32 </a>
33 33
34 <div class="video-channel-info"> 34 <div class="video-channel-info">
35 <a [routerLink]="[ '/video-channels', videoChannel.name ]" class="video-channel-names"> 35 <a [routerLink]="[ '/video-channels', videoChannel.nameWithHost ]" class="video-channel-names">
36 <div class="video-channel-display-name">{{ videoChannel.displayName }}</div> 36 <div class="video-channel-display-name">{{ videoChannel.displayName }}</div>
37 <div class="video-channel-name">{{ videoChannel.name }}</div> 37 <div class="video-channel-name">{{ videoChannel.nameWithHost }}</div>
38 </a> 38 </a>
39 39
40 <div i18n class="video-channel-followers">{{ videoChannel.followersCount }} subscribers</div> 40 <div i18n class="video-channel-followers">{{ videoChannel.followersCount }} subscribers</div>
diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts
index 1a934c8e2..558db9543 100644
--- a/client/src/app/shared/video/video.service.ts
+++ b/client/src/app/shared/video/video.service.ts
@@ -4,14 +4,7 @@ import { Injectable } from '@angular/core'
4import { Observable } from 'rxjs' 4import { Observable } from 'rxjs'
5import { Video as VideoServerModel, VideoDetails as VideoDetailsServerModel } from '../../../../../shared' 5import { Video as VideoServerModel, VideoDetails as VideoDetailsServerModel } from '../../../../../shared'
6import { ResultList } from '../../../../../shared/models/result-list.model' 6import { ResultList } from '../../../../../shared/models/result-list.model'
7import { 7import { UserVideoRate, UserVideoRateUpdate, VideoFilter, VideoRateType, VideoUpdate } from '../../../../../shared/models/videos'
8 UserVideoRate,
9 UserVideoRateUpdate,
10 VideoChannel,
11 VideoFilter,
12 VideoRateType,
13 VideoUpdate
14} from '../../../../../shared/models/videos'
15import { FeedFormat } from '../../../../../shared/models/feeds/feed-format.enum' 8import { FeedFormat } from '../../../../../shared/models/feeds/feed-format.enum'
16import { environment } from '../../../environments/environment' 9import { environment } from '../../../environments/environment'
17import { ComponentPagination } from '../rest/component-pagination.model' 10import { ComponentPagination } from '../rest/component-pagination.model'
@@ -28,6 +21,7 @@ import { AccountService } from '@app/shared/account/account.service'
28import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' 21import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
29import { ServerService } from '@app/core' 22import { ServerService } from '@app/core'
30import { UserSubscriptionService } from '@app/shared/user-subscription' 23import { UserSubscriptionService } from '@app/shared/user-subscription'
24import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
31 25
32@Injectable() 26@Injectable()
33export class VideoService { 27export class VideoService {
@@ -151,7 +145,7 @@ export class VideoService {
151 params = this.restService.addRestGetParams(params, pagination, sort) 145 params = this.restService.addRestGetParams(params, pagination, sort)
152 146
153 return this.authHttp 147 return this.authHttp
154 .get<ResultList<Video>>(VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannel.name + '/videos', { params }) 148 .get<ResultList<Video>>(VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannel.nameWithHost + '/videos', { params })
155 .pipe( 149 .pipe(
156 switchMap(res => this.extractVideos(res)), 150 switchMap(res => this.extractVideos(res)),
157 catchError(err => this.restExtractor.handleError(err)) 151 catchError(err => this.restExtractor.handleError(err))