]>
Commit | Line | Data |
---|---|---|
bfa1a32b C |
1 | import { RegisterClientHookOptions } from '@shared/models/plugins/register-client-hook.model' |
2 | ||
3 | export type RegisterClientOptions = { | |
4 | registerHook: (options: RegisterClientHookOptions) => void | |
5 | ||
d75db01f C |
6 | peertubeHelpers: RegisterClientHelpers |
7 | } | |
8 | ||
9 | export type RegisterClientHelpers = { | |
10 | getBaseStaticRoute: () => string | |
11 | ||
eb8f702c RK |
12 | isLoggedIn: () => boolean |
13 | ||
d75db01f | 14 | getSettings: () => Promise<{ [ name: string ]: string }> |
23bdacf8 | 15 | |
f757be65 C |
16 | notifier: { |
17 | info: (text: string, title?: string, timeout?: number) => void, | |
18 | error: (text: string, title?: string, timeout?: number) => void, | |
19 | success: (text: string, title?: string, timeout?: number) => void | |
20 | } | |
74c2dece | 21 | |
437e8e06 K |
22 | showModal: (input: { |
23 | title: string, | |
24 | content: string, | |
25 | close?: boolean, | |
26 | cancel?: { value: string, action?: () => void }, | |
27 | confirm?: { value: string, action?: () => void } | |
28 | }) => void | |
29 | ||
8c7725dc K |
30 | markdownRenderer: { |
31 | textMarkdownToHTML: (textMarkdown: string) => Promise<string> | |
32 | enhancedMarkdownToHTML: (enhancedMarkdown: string) => Promise<string> | |
33 | } | |
34 | ||
d75db01f | 35 | translate: (toTranslate: string) => Promise<string> |
bfa1a32b | 36 | } |