aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorJohn Livingston <38844060+JohnXLivingston@users.noreply.github.com>2021-06-03 12:28:26 +0200
committerGitHub <noreply@github.com>2021-06-03 12:28:26 +0200
commit9777fe9eebe53debdf45091cab98f72a5987e05a (patch)
tree0f85ae9dc3ef89e0ca111d21e4a48d942ff3f991 /client
parent63da15eb18065ef6c419f073c95fec6ef5541652 (diff)
downloadPeerTube-9777fe9eebe53debdf45091cab98f72a5987e05a.tar.gz
PeerTube-9777fe9eebe53debdf45091cab98f72a5987e05a.tar.zst
PeerTube-9777fe9eebe53debdf45091cab98f72a5987e05a.zip
Adding frontend peertubeHelpers.getBaseRouterRoute. (#4153)
* Adding frontend peertubeHelpers.getBaseRouterRoute. * Fix doctoc.
Diffstat (limited to 'client')
-rw-r--r--client/src/app/core/plugins/plugin.service.ts5
-rw-r--r--client/src/standalone/videos/embed.ts2
-rw-r--r--client/src/types/register-client-option.model.ts2
3 files changed, 9 insertions, 0 deletions
diff --git a/client/src/app/core/plugins/plugin.service.ts b/client/src/app/core/plugins/plugin.service.ts
index 6a1a46e73..a3de98390 100644
--- a/client/src/app/core/plugins/plugin.service.ts
+++ b/client/src/app/core/plugins/plugin.service.ts
@@ -250,6 +250,11 @@ export class PluginService implements ClientHook {
250 return environment.apiUrl + `${pathPrefix}/${plugin.name}/${plugin.version}/static` 250 return environment.apiUrl + `${pathPrefix}/${plugin.name}/${plugin.version}/static`
251 }, 251 },
252 252
253 getBaseRouterRoute: () => {
254 const pathPrefix = this.getPluginPathPrefix(pluginInfo.isTheme)
255 return environment.apiUrl + `${pathPrefix}/${plugin.name}/${plugin.version}/router`
256 },
257
253 getSettings: () => { 258 getSettings: () => {
254 const path = PluginService.BASE_PLUGIN_API_URL + '/' + npmName + '/public-settings' 259 const path = PluginService.BASE_PLUGIN_API_URL + '/' + npmName + '/public-settings'
255 260
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts
index 4ce5c78e8..a367feb8e 100644
--- a/client/src/standalone/videos/embed.ts
+++ b/client/src/standalone/videos/embed.ts
@@ -781,6 +781,8 @@ export class PeerTubeEmbed {
781 return { 781 return {
782 getBaseStaticRoute: unimplemented, 782 getBaseStaticRoute: unimplemented,
783 783
784 getBaseRouterRoute: unimplemented,
785
784 getSettings: unimplemented, 786 getSettings: unimplemented,
785 787
786 isLoggedIn: unimplemented, 788 isLoggedIn: unimplemented,
diff --git a/client/src/types/register-client-option.model.ts b/client/src/types/register-client-option.model.ts
index 8802edc32..59bcbc5ff 100644
--- a/client/src/types/register-client-option.model.ts
+++ b/client/src/types/register-client-option.model.ts
@@ -19,6 +19,8 @@ export type RegisterClientOptions = {
19export type RegisterClientHelpers = { 19export type RegisterClientHelpers = {
20 getBaseStaticRoute: () => string 20 getBaseStaticRoute: () => string
21 21
22 getBaseRouterRoute: () => string
23
22 isLoggedIn: () => boolean 24 isLoggedIn: () => boolean
23 25
24 getAuthHeader: () => { 'Authorization': string } | undefined 26 getAuthHeader: () => { 'Authorization': string } | undefined