From 2539932e16129992a2c0889b4ff527c265a8e2c7 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 27 May 2021 15:59:55 +0200 Subject: 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 --- server/controllers/static.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'server/controllers/static.ts') 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' import * as express from 'express' import { join } from 'path' import { serveIndexHTML } from '@server/lib/client-html' -import { getEnabledResolutions, getRegisteredPlugins, getRegisteredThemes } from '@server/lib/config' +import { ServerConfigManager } from '@server/lib/server-config-manager' import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' import { HttpNodeinfoDiasporaSoftwareNsSchema20 } from '../../shared/models/nodeinfo/nodeinfo.model' import { root } from '../helpers/core-utils' @@ -203,10 +203,10 @@ async function generateNodeinfo (req: express.Request, res: express.Response) { } }, plugin: { - registered: getRegisteredPlugins() + registered: ServerConfigManager.Instance.getRegisteredPlugins() }, theme: { - registered: getRegisteredThemes(), + registered: ServerConfigManager.Instance.getRegisteredThemes(), default: getThemeOrDefault(CONFIG.THEME.DEFAULT, DEFAULT_THEME_NAME) }, email: { @@ -222,13 +222,13 @@ async function generateNodeinfo (req: express.Request, res: express.Response) { webtorrent: { enabled: CONFIG.TRANSCODING.WEBTORRENT.ENABLED }, - enabledResolutions: getEnabledResolutions('vod') + enabledResolutions: ServerConfigManager.Instance.getEnabledResolutions('vod') }, live: { enabled: CONFIG.LIVE.ENABLED, transcoding: { enabled: CONFIG.LIVE.TRANSCODING.ENABLED, - enabledResolutions: getEnabledResolutions('live') + enabledResolutions: ServerConfigManager.Instance.getEnabledResolutions('live') } }, import: { -- cgit v1.2.3