diff options
Diffstat (limited to 'client/src/root-helpers')
-rw-r--r-- | client/src/root-helpers/logger.ts | 2 | ||||
-rw-r--r-- | client/src/root-helpers/plugins-manager.ts | 7 | ||||
-rw-r--r-- | client/src/root-helpers/video.ts | 8 |
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 @@ | |||
1 | import { ClientLogCreate } from '@shared/models/server' | 1 | import { ClientLogCreate } from '@peertube/peertube-models' |
2 | import { peertubeLocalStorage } from './peertube-web-storage' | 2 | import { peertubeLocalStorage } from './peertube-web-storage' |
3 | import { OAuthUserTokens } from './users' | 3 | import { 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' | |||
3 | import { firstValueFrom, ReplaySubject } from 'rxjs' | 3 | import { firstValueFrom, ReplaySubject } from 'rxjs' |
4 | import { first, shareReplay } from 'rxjs/operators' | 4 | import { first, shareReplay } from 'rxjs/operators' |
5 | import { RegisterClientHelpers } from 'src/types/register-client-option.model' | 5 | import { RegisterClientHelpers } from 'src/types/register-client-option.model' |
6 | import { getExternalAuthHref, getHookType, internalRunHook } from '@shared/core-utils/plugins/hooks' | 6 | import { getExternalAuthHref, getHookType, internalRunHook } from '@peertube/peertube-core-utils' |
7 | import { | 7 | import { |
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' |
21 | import { environment } from '../environments/environment' | 22 | import { environment } from '../environments/environment' |
22 | import { ClientScript } from '../types' | 23 | import { ClientScript } from '../types' |
23 | import { logger } from './logger' | 24 | import { logger } from './logger' |
@@ -32,7 +33,7 @@ type Hooks = { [ name: string ]: HookStructValue[] } | |||
32 | type PluginInfo = { | 33 | type 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 @@ | |||
1 | import { HTMLServerConfig, Video, VideoPrivacy } from '@shared/models' | 1 | import { HTMLServerConfig, Video, VideoPrivacy, VideoPrivacyType } from '@peertube/peertube-models' |
2 | 2 | ||
3 | function buildVideoOrPlaylistEmbed (options: { | 3 | function buildVideoOrPlaylistEmbed (options: { |
4 | embedUrl: string | 4 | embedUrl: string |
@@ -42,13 +42,13 @@ function isP2PEnabled (video: Video, config: HTMLServerConfig, userP2PEnabled: b | |||
42 | } | 42 | } |
43 | 43 | ||
44 | function videoRequiresUserAuth (video: Video, videoPassword?: string) { | 44 | function 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 | ||
50 | function videoRequiresFileToken (video: Video, videoPassword?: string) { | 50 | function 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 | ||
54 | export { | 54 | export { |