diff options
Diffstat (limited to 'server/lib/server-config-manager.ts')
-rw-r--r-- | server/lib/server-config-manager.ts | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/server/lib/server-config-manager.ts b/server/lib/server-config-manager.ts index bdf6492f9..d97f21eb7 100644 --- a/server/lib/server-config-manager.ts +++ b/server/lib/server-config-manager.ts | |||
@@ -3,6 +3,7 @@ import { CONFIG, isEmailEnabled } from '@server/initializers/config' | |||
3 | import { CONSTRAINTS_FIELDS, DEFAULT_THEME_NAME, PEERTUBE_VERSION } from '@server/initializers/constants' | 3 | import { CONSTRAINTS_FIELDS, DEFAULT_THEME_NAME, PEERTUBE_VERSION } from '@server/initializers/constants' |
4 | import { isSignupAllowed, isSignupAllowedForCurrentIP } from '@server/lib/signup' | 4 | import { isSignupAllowed, isSignupAllowedForCurrentIP } from '@server/lib/signup' |
5 | import { ActorCustomPageModel } from '@server/models/account/actor-custom-page' | 5 | import { ActorCustomPageModel } from '@server/models/account/actor-custom-page' |
6 | import { PluginModel } from '@server/models/server/plugin' | ||
6 | import { HTMLServerConfig, RegisteredExternalAuthConfig, RegisteredIdAndPassAuthConfig, ServerConfig } from '@shared/models' | 7 | import { HTMLServerConfig, RegisteredExternalAuthConfig, RegisteredIdAndPassAuthConfig, ServerConfig } from '@shared/models' |
7 | import { Hooks } from './plugins/hooks' | 8 | import { Hooks } from './plugins/hooks' |
8 | import { PluginManager } from './plugins/plugin-manager' | 9 | import { PluginManager } from './plugins/plugin-manager' |
@@ -47,6 +48,28 @@ class ServerConfigManager { | |||
47 | miniature: { | 48 | miniature: { |
48 | preferAuthorDisplayName: CONFIG.CLIENT.VIDEOS.MINIATURE.PREFER_AUTHOR_DISPLAY_NAME | 49 | preferAuthorDisplayName: CONFIG.CLIENT.VIDEOS.MINIATURE.PREFER_AUTHOR_DISPLAY_NAME |
49 | } | 50 | } |
51 | }, | ||
52 | menu: { | ||
53 | login: { | ||
54 | redirectOnSingleExternalAuth: CONFIG.CLIENT.MENU.LOGIN.REDIRECT_ON_SINGLE_EXTERNAL_AUTH | ||
55 | } | ||
56 | } | ||
57 | }, | ||
58 | |||
59 | defaults: { | ||
60 | publish: { | ||
61 | downloadEnabled: CONFIG.DEFAULTS.PUBLISH.DOWNLOAD_ENABLED, | ||
62 | commentsEnabled: CONFIG.DEFAULTS.PUBLISH.COMMENTS_ENABLED, | ||
63 | privacy: CONFIG.DEFAULTS.PUBLISH.PRIVACY, | ||
64 | licence: CONFIG.DEFAULTS.PUBLISH.LICENCE | ||
65 | }, | ||
66 | p2p: { | ||
67 | webapp: { | ||
68 | enabled: CONFIG.DEFAULTS.P2P.WEBAPP.ENABLED | ||
69 | }, | ||
70 | embed: { | ||
71 | enabled: CONFIG.DEFAULTS.P2P.EMBED.ENABLED | ||
72 | } | ||
50 | } | 73 | } |
51 | }, | 74 | }, |
52 | 75 | ||
@@ -247,6 +270,7 @@ class ServerConfigManager { | |||
247 | getRegisteredThemes () { | 270 | getRegisteredThemes () { |
248 | return PluginManager.Instance.getRegisteredThemes() | 271 | return PluginManager.Instance.getRegisteredThemes() |
249 | .map(t => ({ | 272 | .map(t => ({ |
273 | npmName: PluginModel.buildNpmName(t.name, t.type), | ||
250 | name: t.name, | 274 | name: t.name, |
251 | version: t.version, | 275 | version: t.version, |
252 | description: t.description, | 276 | description: t.description, |
@@ -258,6 +282,7 @@ class ServerConfigManager { | |||
258 | getRegisteredPlugins () { | 282 | getRegisteredPlugins () { |
259 | return PluginManager.Instance.getRegisteredPlugins() | 283 | return PluginManager.Instance.getRegisteredPlugins() |
260 | .map(p => ({ | 284 | .map(p => ({ |
285 | npmName: PluginModel.buildNpmName(p.name, p.type), | ||
261 | name: p.name, | 286 | name: p.name, |
262 | version: p.version, | 287 | version: p.version, |
263 | description: p.description, | 288 | description: p.description, |