feat(next): improve left margin to allow moving

This commit is contained in:
Elian Doran 2024-12-05 20:34:55 +02:00
parent b9129f62b4
commit aefd139592
No known key found for this signature in database
3 changed files with 8 additions and 2 deletions

View File

@ -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;

View File

@ -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),

View File

@ -6,7 +6,7 @@
<link rel="manifest" crossorigin="use-credentials" href="manifest.webmanifest">
<title>TriliumNext Notes</title>
</head>
<body class="desktop heading-style-<%= headingStyle %> layout-<%= layoutOrientation %> platform-<%= platform %> <%= isElectron ? 'electron' : '' %>">
<body class="desktop heading-style-<%= headingStyle %> layout-<%= layoutOrientation %> platform-<%= platform %> <%= isElectron ? 'electron' : '' %> <%= hasNativeTitleBar ? 'native-titlebar' : '' %>">
<noscript><%= t("javascript-required") %></noscript>
<script>