aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/root-helpers
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/root-helpers')
-rw-r--r--client/src/root-helpers/logger.ts2
-rw-r--r--client/src/root-helpers/plugins-manager.ts7
-rw-r--r--client/src/root-helpers/video.ts8
3 files changed, 9 insertions, 8 deletions
diff --git a/client/src/root-helpers/logger.ts b/client/src/root-helpers/logger.ts
index 8181c13f3..108228d84 100644
--- a/client/src/root-helpers/logger.ts
+++ b/client/src/root-helpers/logger.ts
@@ -1,4 +1,4 @@
1import { ClientLogCreate } from '@shared/models/server' 1import { ClientLogCreate } from '@peertube/peertube-models'
2import { peertubeLocalStorage } from './peertube-web-storage' 2import { peertubeLocalStorage } from './peertube-web-storage'
3import { OAuthUserTokens } from './users' 3import { OAuthUserTokens } from './users'
4 4
diff --git a/client/src/root-helpers/plugins-manager.ts b/client/src/root-helpers/plugins-manager.ts
index fd7b5233b..e987f16d6 100644
--- a/client/src/root-helpers/plugins-manager.ts
+++ b/client/src/root-helpers/plugins-manager.ts
@@ -3,7 +3,7 @@ import * as debug from 'debug'
3import { firstValueFrom, ReplaySubject } from 'rxjs' 3import { firstValueFrom, ReplaySubject } from 'rxjs'
4import { first, shareReplay } from 'rxjs/operators' 4import { first, shareReplay } from 'rxjs/operators'
5import { RegisterClientHelpers } from 'src/types/register-client-option.model' 5import { RegisterClientHelpers } from 'src/types/register-client-option.model'
6import { getExternalAuthHref, getHookType, internalRunHook } from '@shared/core-utils/plugins/hooks' 6import { getExternalAuthHref, getHookType, internalRunHook } from '@peertube/peertube-core-utils'
7import { 7import {
8 ClientHookName, 8 ClientHookName,
9 clientHookObject, 9 clientHookObject,
@@ -11,13 +11,14 @@ import {
11 HTMLServerConfig, 11 HTMLServerConfig,
12 PluginClientScope, 12 PluginClientScope,
13 PluginType, 13 PluginType,
14 PluginType_Type,
14 RegisterClientFormFieldOptions, 15 RegisterClientFormFieldOptions,
15 RegisterClientHookOptions, 16 RegisterClientHookOptions,
16 RegisterClientRouteOptions, 17 RegisterClientRouteOptions,
17 RegisterClientSettingsScriptOptions, 18 RegisterClientSettingsScriptOptions,
18 RegisterClientVideoFieldOptions, 19 RegisterClientVideoFieldOptions,
19 ServerConfigPlugin 20 ServerConfigPlugin
20} from '@shared/models' 21} from '@peertube/peertube-models'
21import { environment } from '../environments/environment' 22import { environment } from '../environments/environment'
22import { ClientScript } from '../types' 23import { ClientScript } from '../types'
23import { logger } from './logger' 24import { logger } from './logger'
@@ -32,7 +33,7 @@ type Hooks = { [ name: string ]: HookStructValue[] }
32type PluginInfo = { 33type PluginInfo = {
33 plugin: ServerConfigPlugin 34 plugin: ServerConfigPlugin
34 clientScript: ClientScriptJSON 35 clientScript: ClientScriptJSON
35 pluginType: PluginType 36 pluginType: PluginType_Type
36 isTheme: boolean 37 isTheme: boolean
37} 38}
38 39
diff --git a/client/src/root-helpers/video.ts b/client/src/root-helpers/video.ts
index 4a44615fb..4ee29df13 100644
--- a/client/src/root-helpers/video.ts
+++ b/client/src/root-helpers/video.ts
@@ -1,4 +1,4 @@
1import { HTMLServerConfig, Video, VideoPrivacy } from '@shared/models' 1import { HTMLServerConfig, Video, VideoPrivacy, VideoPrivacyType } from '@peertube/peertube-models'
2 2
3function buildVideoOrPlaylistEmbed (options: { 3function buildVideoOrPlaylistEmbed (options: {
4 embedUrl: string 4 embedUrl: string
@@ -42,13 +42,13 @@ function isP2PEnabled (video: Video, config: HTMLServerConfig, userP2PEnabled: b
42} 42}
43 43
44function videoRequiresUserAuth (video: Video, videoPassword?: string) { 44function videoRequiresUserAuth (video: Video, videoPassword?: string) {
45 return new Set([ VideoPrivacy.PRIVATE, VideoPrivacy.INTERNAL ]).has(video.privacy.id) || 45 return new Set<VideoPrivacyType>([ VideoPrivacy.PRIVATE, VideoPrivacy.INTERNAL ]).has(video.privacy.id) ||
46 (video.privacy.id === VideoPrivacy.PASSWORD_PROTECTED && !videoPassword) 46 (video.privacy.id === VideoPrivacy.PASSWORD_PROTECTED && !videoPassword)
47 47
48} 48}
49 49
50function videoRequiresFileToken (video: Video, videoPassword?: string) { 50function videoRequiresFileToken (video: Video) {
51 return new Set([ VideoPrivacy.PRIVATE, VideoPrivacy.INTERNAL, VideoPrivacy.PASSWORD_PROTECTED ]).has(video.privacy.id) 51 return new Set<VideoPrivacyType>([ VideoPrivacy.PRIVATE, VideoPrivacy.INTERNAL, VideoPrivacy.PASSWORD_PROTECTED ]).has(video.privacy.id)
52} 52}
53 53
54export { 54export {