refactor(views): use ejs partial for injecting window.glob

This commit is contained in:
Panagiotis Papadopoulos
2025-01-08 09:15:16 +01:00
parent 564f1b92d2
commit 14358d1ec0
4 changed files with 27 additions and 44 deletions

View File

@@ -34,6 +34,7 @@ function index(req: Request, res: Response) {
const isElectron = utils.isElectron();
res.render(view, {
device: view,
csrfToken: csrfToken,
themeCssUrl: getThemeCssUrl(theme, themeNote),
themeUseNextAsBase: themeNote?.getAttributeValue("label", "appThemeBase") === "next",
@@ -51,7 +52,7 @@ function index(req: Request, res: Response) {
instanceName: config.General ? config.General.instanceName : null,
appCssNoteIds: getAppCssNoteIds(),
isDev: env.isDev(),
isMainWindow: !req.query.extraWindow,
isMainWindow: (view === "mobile") ? true : !req.query.extraWindow,
isProtectedSessionAvailable: protectedSessionService.isProtectedSessionAvailable(),
maxContentWidth: Math.max(640, parseInt(options.maxContentWidth)),
triliumVersion: packageJson.version,