From aefd139592bfcfe1c1a149d16ce672f152088318 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 5 Dec 2024 20:34:55 +0200 Subject: [PATCH] feat(next): improve left margin to allow moving --- src/public/stylesheets/style.css | 4 ++++ src/routes/index.ts | 4 +++- src/views/desktop.ejs | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css index b8a83a3fa..875c98b14 100644 --- a/src/public/stylesheets/style.css +++ b/src/public/stylesheets/style.css @@ -1278,6 +1278,10 @@ textarea { color: var(--muted-text-color); } +body.electron:not(.native-titlebar) .tab-row-container { + padding-left: 2em; +} + #tab-row-left-spacer { width: env(titlebar-area-x); -webkit-app-region: drag; diff --git a/src/routes/index.ts b/src/routes/index.ts index 17a5adad3..a37965b4c 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -28,13 +28,15 @@ function index(req: Request, res: Response) { // The page is restored from cache, but the API call fail. res.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); + const isElectron = utils.isElectron(); res.render(view, { csrfToken: csrfToken, themeCssUrl: getThemeCssUrl(options.theme), headingStyle: options.headingStyle, layoutOrientation: options.layoutOrientation, platform: process.platform, - isElectron: utils.isElectron(), + isElectron, + hasNativeTitleBar: (isElectron && options.nativeTitleBarVisible === "true"), mainFontSize: parseInt(options.mainFontSize), treeFontSize: parseInt(options.treeFontSize), detailFontSize: parseInt(options.detailFontSize), diff --git a/src/views/desktop.ejs b/src/views/desktop.ejs index d2db1f175..f922e9454 100644 --- a/src/views/desktop.ejs +++ b/src/views/desktop.ejs @@ -6,7 +6,7 @@ TriliumNext Notes - +