]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts
Fix search results on mobile
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / plugins / plugin-list-installed / plugin-list-installed.component.ts
index 67a11c3a895b193e8e516233c99a957f61ef6833..dced14dee9c0a9d3189c46f15d19ec66d43c4169 100644 (file)
@@ -6,13 +6,15 @@ import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pa
 import { ConfirmService, Notifier } from '@app/core'
 import { PeerTubePlugin } from '@shared/models/plugins/peertube-plugin.model'
 import { ActivatedRoute, Router } from '@angular/router'
-import { compareSemVer } from '@app/shared/misc/utils'
+import { compareSemVer } from '@shared/core-utils/miscs/miscs'
+import { PluginService } from '@app/core/plugins/plugin.service'
 
 @Component({
   selector: 'my-plugin-list-installed',
   templateUrl: './plugin-list-installed.component.html',
   styleUrls: [
     '../shared/toggle-plugin-type.scss',
+    '../shared/plugin-list.component.scss',
     './plugin-list-installed.component.scss'
   ]
 })
@@ -33,13 +35,14 @@ export class PluginListInstalledComponent implements OnInit {
 
   constructor (
     private i18n: I18n,
-    private pluginService: PluginApiService,
+    private pluginService: PluginService,
+    private pluginApiService: PluginApiService,
     private notifier: Notifier,
     private confirmService: ConfirmService,
     private router: Router,
     private route: ActivatedRoute
   ) {
-    this.pluginTypeOptions = this.pluginService.getPluginTypeOptions()
+    this.pluginTypeOptions = this.pluginApiService.getPluginTypeOptions()
   }
 
   ngOnInit () {
@@ -59,7 +62,7 @@ export class PluginListInstalledComponent implements OnInit {
   }
 
   loadMorePlugins () {
-    this.pluginService.getPlugins(this.pluginType, this.pagination, this.sort)
+    this.pluginApiService.getPlugins(this.pluginType, this.pagination, this.sort)
         .subscribe(
           res => {
             this.plugins = this.plugins.concat(res.data)
@@ -105,7 +108,7 @@ export class PluginListInstalledComponent implements OnInit {
     )
     if (res === false) return
 
-    this.pluginService.uninstall(plugin.name, plugin.type)
+    this.pluginApiService.uninstall(plugin.name, plugin.type)
       .subscribe(
         () => {
           this.notifier.success(this.i18n('{{pluginName}} uninstalled.', { pluginName: plugin.name }))
@@ -124,7 +127,7 @@ export class PluginListInstalledComponent implements OnInit {
 
     this.updating[updatingKey] = true
 
-    this.pluginService.update(plugin.name, plugin.type)
+    this.pluginApiService.update(plugin.name, plugin.type)
         .pipe()
         .subscribe(
           res => {