aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/plugins
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-17 11:27:47 +0200
committerChocobozzz <me@florianbigard.com>2021-08-17 14:01:45 +0200
commit1378c0d343028f3d40d7d795422684ab9e6a1599 (patch)
tree08062b84a38a7e2dfe0aa674e7ca8e1b7321044e /client/src/app/+admin/plugins
parentc186a67f90203af6bfa434f026efdc99193bcd65 (diff)
downloadPeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.gz
PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.zst
PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.zip
Fix client lint
Diffstat (limited to 'client/src/app/+admin/plugins')
-rw-r--r--client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts24
-rw-r--r--client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts16
-rw-r--r--client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts16
3 files changed, 28 insertions, 28 deletions
diff --git a/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts b/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts
index 968abcbe5..85f9879bf 100644
--- a/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts
+++ b/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts
@@ -61,16 +61,16 @@ export class PluginListInstalledComponent implements OnInit {
61 61
62 loadMorePlugins () { 62 loadMorePlugins () {
63 this.pluginApiService.getPlugins(this.pluginType, this.pagination, this.sort) 63 this.pluginApiService.getPlugins(this.pluginType, this.pagination, this.sort)
64 .subscribe( 64 .subscribe({
65 res => { 65 next: res => {
66 this.plugins = this.plugins.concat(res.data) 66 this.plugins = this.plugins.concat(res.data)
67 this.pagination.totalItems = res.total 67 this.pagination.totalItems = res.total
68 68
69 this.onDataSubject.next(res.data) 69 this.onDataSubject.next(res.data)
70 }, 70 },
71 71
72 err => this.notifier.error(err.message) 72 error: err => this.notifier.error(err.message)
73 ) 73 })
74 } 74 }
75 75
76 onNearOfBottom () { 76 onNearOfBottom () {
@@ -113,16 +113,16 @@ export class PluginListInstalledComponent implements OnInit {
113 if (res === false) return 113 if (res === false) return
114 114
115 this.pluginApiService.uninstall(plugin.name, plugin.type) 115 this.pluginApiService.uninstall(plugin.name, plugin.type)
116 .subscribe( 116 .subscribe({
117 () => { 117 next: () => {
118 this.notifier.success($localize`${plugin.name} uninstalled.`) 118 this.notifier.success($localize`${plugin.name} uninstalled.`)
119 119
120 this.plugins = this.plugins.filter(p => p.name !== plugin.name) 120 this.plugins = this.plugins.filter(p => p.name !== plugin.name)
121 this.pagination.totalItems-- 121 this.pagination.totalItems--
122 }, 122 },
123 123
124 err => this.notifier.error(err.message) 124 error: err => this.notifier.error(err.message)
125 ) 125 })
126 } 126 }
127 127
128 async update (plugin: PeerTubePlugin) { 128 async update (plugin: PeerTubePlugin) {
@@ -143,8 +143,8 @@ export class PluginListInstalledComponent implements OnInit {
143 143
144 this.pluginApiService.update(plugin.name, plugin.type) 144 this.pluginApiService.update(plugin.name, plugin.type)
145 .pipe() 145 .pipe()
146 .subscribe( 146 .subscribe({
147 res => { 147 next: res => {
148 this.updating[updatingKey] = false 148 this.updating[updatingKey] = false
149 149
150 this.notifier.success($localize`${plugin.name} updated.`) 150 this.notifier.success($localize`${plugin.name} updated.`)
@@ -152,8 +152,8 @@ export class PluginListInstalledComponent implements OnInit {
152 Object.assign(plugin, res) 152 Object.assign(plugin, res)
153 }, 153 },
154 154
155 err => this.notifier.error(err.message) 155 error: err => this.notifier.error(err.message)
156 ) 156 })
157 } 157 }
158 158
159 getShowRouterLink (plugin: PeerTubePlugin) { 159 getShowRouterLink (plugin: PeerTubePlugin) {
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 0a6e57904..803777eb3 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
@@ -84,8 +84,8 @@ export class PluginSearchComponent implements OnInit {
84 this.isSearching = true 84 this.isSearching = true
85 85
86 this.pluginApiService.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 next: res => {
89 this.isSearching = false 89 this.isSearching = false
90 90
91 this.plugins = this.plugins.concat(res.data) 91 this.plugins = this.plugins.concat(res.data)
@@ -94,13 +94,13 @@ export class PluginSearchComponent implements OnInit {
94 this.onDataSubject.next(res.data) 94 this.onDataSubject.next(res.data)
95 }, 95 },
96 96
97 err => { 97 error: err => {
98 console.error(err) 98 console.error(err)
99 99
100 const message = $localize`The plugin index is not available. Please retry later.` 100 const message = $localize`The plugin index is not available. Please retry later.`
101 this.notifier.error(message) 101 this.notifier.error(message)
102 } 102 }
103 ) 103 })
104 } 104 }
105 105
106 onNearOfBottom () { 106 onNearOfBottom () {
@@ -139,8 +139,8 @@ export class PluginSearchComponent implements OnInit {
139 this.installing[plugin.npmName] = true 139 this.installing[plugin.npmName] = true
140 140
141 this.pluginApiService.install(plugin.npmName) 141 this.pluginApiService.install(plugin.npmName)
142 .subscribe( 142 .subscribe({
143 () => { 143 next: () => {
144 this.installing[plugin.npmName] = false 144 this.installing[plugin.npmName] = false
145 this.pluginInstalled = true 145 this.pluginInstalled = true
146 146
@@ -149,7 +149,7 @@ export class PluginSearchComponent implements OnInit {
149 plugin.installed = true 149 plugin.installed = true
150 }, 150 },
151 151
152 err => this.notifier.error(err.message) 152 error: err => this.notifier.error(err.message)
153 ) 153 })
154 } 154 }
155} 155}
diff --git a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts
index c3d14d2b3..10fb52911 100644
--- a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts
+++ b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts
@@ -50,13 +50,13 @@ export class PluginShowInstalledComponent extends FormReactive implements OnInit
50 const settings = this.form.value 50 const settings = this.form.value
51 51
52 this.pluginAPIService.updatePluginSettings(this.plugin.name, this.plugin.type, settings) 52 this.pluginAPIService.updatePluginSettings(this.plugin.name, this.plugin.type, settings)
53 .subscribe( 53 .subscribe({
54 () => { 54 next: () => {
55 this.notifier.success($localize`Settings updated.`) 55 this.notifier.success($localize`Settings updated.`)
56 }, 56 },
57 57
58 err => this.notifier.error(err.message) 58 error: err => this.notifier.error(err.message)
59 ) 59 })
60 } 60 }
61 61
62 hasRegisteredSettings () { 62 hasRegisteredSettings () {
@@ -83,8 +83,8 @@ export class PluginShowInstalledComponent extends FormReactive implements OnInit
83 return this.pluginAPIService.getPluginRegisteredSettings(plugin.name, plugin.type) 83 return this.pluginAPIService.getPluginRegisteredSettings(plugin.name, plugin.type)
84 .pipe(map(data => ({ plugin, registeredSettings: data.registeredSettings }))) 84 .pipe(map(data => ({ plugin, registeredSettings: data.registeredSettings })))
85 })) 85 }))
86 .subscribe( 86 .subscribe({
87 async ({ plugin, registeredSettings }) => { 87 next: async ({ plugin, registeredSettings }) => {
88 this.plugin = plugin 88 this.plugin = plugin
89 89
90 this.registeredSettings = await this.translateSettings(registeredSettings) 90 this.registeredSettings = await this.translateSettings(registeredSettings)
@@ -94,8 +94,8 @@ export class PluginShowInstalledComponent extends FormReactive implements OnInit
94 this.buildSettingsForm() 94 this.buildSettingsForm()
95 }, 95 },
96 96
97 err => this.notifier.error(err.message) 97 error: err => this.notifier.error(err.message)
98 ) 98 })
99 } 99 }
100 100
101 private buildSettingsForm () { 101 private buildSettingsForm () {