aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-01-11 10:46:02 +0100
committerChocobozzz <me@florianbigard.com>2021-01-11 10:46:02 +0100
commit078b4716cdd4dbf1b15c1a864ccab999ed3d0e8e (patch)
treede9f00d823e5fcdcf5b6ae9492d0ae868673cac1 /client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts
parentfcb771222854d4239f97b60969e3f11e434a2239 (diff)
downloadPeerTube-078b4716cdd4dbf1b15c1a864ccab999ed3d0e8e.tar.gz
PeerTube-078b4716cdd4dbf1b15c1a864ccab999ed3d0e8e.tar.zst
PeerTube-078b4716cdd4dbf1b15c1a864ccab999ed3d0e8e.zip
Fix theme npm link
Diffstat (limited to 'client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts')
-rw-r--r--client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts12
1 files changed, 8 insertions, 4 deletions
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 1a6b4eba3..4c571dee4 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
@@ -39,13 +39,13 @@ export class PluginSearchComponent implements OnInit {
39 private searchSubject = new Subject<string>() 39 private searchSubject = new Subject<string>()
40 40
41 constructor ( 41 constructor (
42 private pluginService: PluginApiService, 42 private pluginApiService: PluginApiService,
43 private notifier: Notifier, 43 private notifier: Notifier,
44 private confirmService: ConfirmService, 44 private confirmService: ConfirmService,
45 private router: Router, 45 private router: Router,
46 private route: ActivatedRoute 46 private route: ActivatedRoute
47 ) { 47 ) {
48 this.pluginTypeOptions = this.pluginService.getPluginTypeOptions() 48 this.pluginTypeOptions = this.pluginApiService.getPluginTypeOptions()
49 } 49 }
50 50
51 ngOnInit () { 51 ngOnInit () {
@@ -83,7 +83,7 @@ export class PluginSearchComponent implements OnInit {
83 loadMorePlugins () { 83 loadMorePlugins () {
84 this.isSearching = true 84 this.isSearching = true
85 85
86 this.pluginService.searchAvailablePlugins(this.pluginType, this.pagination, this.sort, this.search) 86 this.pluginApiService.searchAvailablePlugins(this.pluginType, this.pagination, this.sort, this.search)
87 .subscribe( 87 .subscribe(
88 res => { 88 res => {
89 this.isSearching = false 89 this.isSearching = false
@@ -115,6 +115,10 @@ export class PluginSearchComponent implements OnInit {
115 return !!this.installing[plugin.npmName] 115 return !!this.installing[plugin.npmName]
116 } 116 }
117 117
118 getPluginOrThemeHref (name: string) {
119 return this.pluginApiService.getPluginOrThemeHref(this.pluginType, name)
120 }
121
118 async install (plugin: PeerTubePluginIndex) { 122 async install (plugin: PeerTubePluginIndex) {
119 if (this.installing[plugin.npmName]) return 123 if (this.installing[plugin.npmName]) return
120 124
@@ -126,7 +130,7 @@ export class PluginSearchComponent implements OnInit {
126 130
127 this.installing[plugin.npmName] = true 131 this.installing[plugin.npmName] = true
128 132
129 this.pluginService.install(plugin.npmName) 133 this.pluginApiService.install(plugin.npmName)
130 .subscribe( 134 .subscribe(
131 () => { 135 () => {
132 this.installing[plugin.npmName] = false 136 this.installing[plugin.npmName] = false