projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
74c2dec
)
Better plugin notifier typings
author
Chocobozzz
<me@florianbigard.com>
Wed, 15 Apr 2020 07:21:06 +0000
(09:21 +0200)
committer
Chocobozzz
<me@florianbigard.com>
Wed, 15 Apr 2020 07:21:06 +0000
(09:21 +0200)
client/src/app/core/plugins/plugin.service.ts
patch
|
blob
|
history
client/src/types/register-client-option.model.ts
patch
|
blob
|
history
shared/__ngcc_entry_points__.json
[deleted file]
patch
|
blob
|
history
diff --git
a/client/src/app/core/plugins/plugin.service.ts
b/client/src/app/core/plugins/plugin.service.ts
index b9d55a7e49ef7fb3c5bd4786f3d2547030c298ba..aa6823060f648449a961febc00f795166e658eda 100644
(file)
--- a/
client/src/app/core/plugins/plugin.service.ts
+++ b/
client/src/app/core/plugins/plugin.service.ts
@@
-273,7
+273,11
@@
export class PluginService implements ClientHook {
return this.authService.isLoggedIn()
},
return this.authService.isLoggedIn()
},
- notifier: this.notifier,
+ notifier: {
+ info: (text: string, title?: string, timeout?: number) => this.notifier.info(text, title, timeout),
+ error: (text: string, title?: string, timeout?: number) => this.notifier.error(text, title, timeout),
+ success: (text: string, title?: string, timeout?: number) => this.notifier.success(text, title, timeout)
+ },
translate: (value: string) => {
return this.translationsObservable
translate: (value: string) => {
return this.translationsObservable
diff --git
a/client/src/types/register-client-option.model.ts
b/client/src/types/register-client-option.model.ts
index 1faf13c42c494c46d5f8c1b593fce0a58ade4753..b64652a0ff8ca4bd99a6ad13c9bc9527bd214997 100644
(file)
--- a/
client/src/types/register-client-option.model.ts
+++ b/
client/src/types/register-client-option.model.ts
@@
-1,5
+1,4
@@
import { RegisterClientHookOptions } from '@shared/models/plugins/register-client-hook.model'
import { RegisterClientHookOptions } from '@shared/models/plugins/register-client-hook.model'
-import { Notifier } from '@app/core'
export type RegisterClientOptions = {
registerHook: (options: RegisterClientHookOptions) => void
export type RegisterClientOptions = {
registerHook: (options: RegisterClientHookOptions) => void
@@
-14,7
+13,11
@@
export type RegisterClientHelpers = {
getSettings: () => Promise<{ [ name: string ]: string }>
getSettings: () => Promise<{ [ name: string ]: string }>
- notifier: Notifier
+ notifier: {
+ info: (text: string, title?: string, timeout?: number) => void,
+ error: (text: string, title?: string, timeout?: number) => void,
+ success: (text: string, title?: string, timeout?: number) => void
+ }
translate: (toTranslate: string) => Promise<string>
}
translate: (toTranslate: string) => Promise<string>
}
diff --git
a/shared/__ngcc_entry_points__.json
b/shared/__ngcc_entry_points__.json
deleted file mode 100644
(file)
index
179bdcd
..0000000
--- a/
shared/__ngcc_entry_points__.json
+++ /dev/null
@@
-1
+0,0 @@
-{"ngccVersion":"9.1.0","configFileHash":"87c535c3ce0eac2a54c246892e0e21a1","lockFileHash":"d04bf20520f2518af162e882d32081e4","entryPointPaths":[]}
\ No newline at end of file