diff options
author | Chocobozzz <chocobozzz@cpy.re> | 2021-05-27 15:59:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-27 15:59:55 +0200 |
commit | 2539932e16129992a2c0889b4ff527c265a8e2c7 (patch) | |
tree | fb5048e63e02a2485eb96d27455f43e4b22e8ae0 /server/controllers/static.ts | |
parent | eb34ec30e0b57286fc6f85160490d2e973a3b0b1 (diff) | |
download | PeerTube-2539932e16129992a2c0889b4ff527c265a8e2c7.tar.gz PeerTube-2539932e16129992a2c0889b4ff527c265a8e2c7.tar.zst PeerTube-2539932e16129992a2c0889b4ff527c265a8e2c7.zip |
Instance homepage support (#4007)
* Prepare homepage parsers
* Add ability to update instance hompage
* Add ability to set homepage as landing page
* Add homepage preview in admin
* Dynamically update left menu for homepage
* Inject home content in homepage
* Add videos list and channel miniature custom markup
* Remove unused elements in markup service
Diffstat (limited to 'server/controllers/static.ts')
-rw-r--r-- | server/controllers/static.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/controllers/static.ts b/server/controllers/static.ts index 8a747ec52..3870ebfe9 100644 --- a/server/controllers/static.ts +++ b/server/controllers/static.ts | |||
@@ -2,7 +2,7 @@ import * as cors from 'cors' | |||
2 | import * as express from 'express' | 2 | import * as express from 'express' |
3 | import { join } from 'path' | 3 | import { join } from 'path' |
4 | import { serveIndexHTML } from '@server/lib/client-html' | 4 | import { serveIndexHTML } from '@server/lib/client-html' |
5 | import { getEnabledResolutions, getRegisteredPlugins, getRegisteredThemes } from '@server/lib/config' | 5 | import { ServerConfigManager } from '@server/lib/server-config-manager' |
6 | import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' | 6 | import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' |
7 | import { HttpNodeinfoDiasporaSoftwareNsSchema20 } from '../../shared/models/nodeinfo/nodeinfo.model' | 7 | import { HttpNodeinfoDiasporaSoftwareNsSchema20 } from '../../shared/models/nodeinfo/nodeinfo.model' |
8 | import { root } from '../helpers/core-utils' | 8 | import { root } from '../helpers/core-utils' |
@@ -203,10 +203,10 @@ async function generateNodeinfo (req: express.Request, res: express.Response) { | |||
203 | } | 203 | } |
204 | }, | 204 | }, |
205 | plugin: { | 205 | plugin: { |
206 | registered: getRegisteredPlugins() | 206 | registered: ServerConfigManager.Instance.getRegisteredPlugins() |
207 | }, | 207 | }, |
208 | theme: { | 208 | theme: { |
209 | registered: getRegisteredThemes(), | 209 | registered: ServerConfigManager.Instance.getRegisteredThemes(), |
210 | default: getThemeOrDefault(CONFIG.THEME.DEFAULT, DEFAULT_THEME_NAME) | 210 | default: getThemeOrDefault(CONFIG.THEME.DEFAULT, DEFAULT_THEME_NAME) |
211 | }, | 211 | }, |
212 | email: { | 212 | email: { |
@@ -222,13 +222,13 @@ async function generateNodeinfo (req: express.Request, res: express.Response) { | |||
222 | webtorrent: { | 222 | webtorrent: { |
223 | enabled: CONFIG.TRANSCODING.WEBTORRENT.ENABLED | 223 | enabled: CONFIG.TRANSCODING.WEBTORRENT.ENABLED |
224 | }, | 224 | }, |
225 | enabledResolutions: getEnabledResolutions('vod') | 225 | enabledResolutions: ServerConfigManager.Instance.getEnabledResolutions('vod') |
226 | }, | 226 | }, |
227 | live: { | 227 | live: { |
228 | enabled: CONFIG.LIVE.ENABLED, | 228 | enabled: CONFIG.LIVE.ENABLED, |
229 | transcoding: { | 229 | transcoding: { |
230 | enabled: CONFIG.LIVE.TRANSCODING.ENABLED, | 230 | enabled: CONFIG.LIVE.TRANSCODING.ENABLED, |
231 | enabledResolutions: getEnabledResolutions('live') | 231 | enabledResolutions: ServerConfigManager.Instance.getEnabledResolutions('live') |
232 | } | 232 | } |
233 | }, | 233 | }, |
234 | import: { | 234 | import: { |