aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/search
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-22 16:04:44 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-07-24 10:58:16 +0200
commite8f902c05cb35f6d5e9b75a23ddabd51c220a976 (patch)
treeeb6297bc50206546cbae12c6abc5b50ed802b17e /client/src/app/search
parent93cae47925e4dd68b7d34a41927b2740b4fab1b4 (diff)
downloadPeerTube-e8f902c05cb35f6d5e9b75a23ddabd51c220a976.tar.gz
PeerTube-e8f902c05cb35f6d5e9b75a23ddabd51c220a976.tar.zst
PeerTube-e8f902c05cb35f6d5e9b75a23ddabd51c220a976.zip
Use search client scope
Diffstat (limited to 'client/src/app/search')
-rw-r--r--client/src/app/search/search.component.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/client/src/app/search/search.component.ts b/client/src/app/search/search.component.ts
index b1d732d68..55637771e 100644
--- a/client/src/app/search/search.component.ts
+++ b/client/src/app/search/search.component.ts
@@ -11,6 +11,7 @@ import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
11import { immutableAssign } from '@app/shared/misc/utils' 11import { immutableAssign } from '@app/shared/misc/utils'
12import { Video } from '@app/shared/video/video.model' 12import { Video } from '@app/shared/video/video.model'
13import { HooksService } from '@app/core/plugins/hooks.service' 13import { HooksService } from '@app/core/plugins/hooks.service'
14import { PluginService } from '@app/core/plugins/plugin.service'
14 15
15@Component({ 16@Component({
16 selector: 'my-search', 17 selector: 'my-search',
@@ -43,7 +44,8 @@ export class SearchComponent implements OnInit, OnDestroy {
43 private notifier: Notifier, 44 private notifier: Notifier,
44 private searchService: SearchService, 45 private searchService: SearchService,
45 private authService: AuthService, 46 private authService: AuthService,
46 private hooks: HooksService 47 private hooks: HooksService,
48 private pluginService: PluginService
47 ) { } 49 ) { }
48 50
49 get user () { 51 get user () {
@@ -51,6 +53,8 @@ export class SearchComponent implements OnInit, OnDestroy {
51 } 53 }
52 54
53 ngOnInit () { 55 ngOnInit () {
56 this.pluginService.loadPluginsByScope('search')
57
54 this.subActivatedRoute = this.route.queryParams.subscribe( 58 this.subActivatedRoute = this.route.queryParams.subscribe(
55 queryParams => { 59 queryParams => {
56 const querySearch = queryParams['search'] 60 const querySearch = queryParams['search']
@@ -175,7 +179,7 @@ export class SearchComponent implements OnInit, OnDestroy {
175 return this.hooks.wrapObsFun( 179 return this.hooks.wrapObsFun(
176 this.searchService.searchVideos.bind(this.searchService), 180 this.searchService.searchVideos.bind(this.searchService),
177 params, 181 params,
178 'common', 182 'search',
179 'filter:api.search.videos.list.params', 183 'filter:api.search.videos.list.params',
180 'filter:api.search.videos.list.result' 184 'filter:api.search.videos.list.result'
181 ) 185 )
@@ -190,7 +194,7 @@ export class SearchComponent implements OnInit, OnDestroy {
190 return this.hooks.wrapObsFun( 194 return this.hooks.wrapObsFun(
191 this.searchService.searchVideoChannels.bind(this.searchService), 195 this.searchService.searchVideoChannels.bind(this.searchService),
192 params, 196 params,
193 'common', 197 'search',
194 'filter:api.search.video-channels.list.params', 198 'filter:api.search.video-channels.list.params',
195 'filter:api.search.video-channels.list.result' 199 'filter:api.search.video-channels.list.result'
196 ) 200 )