Skip to content

Build your personal knowledge base with Trilium Notes

feat(mica): add back toggleable

Elian Doranf4efefe480f6
diff --git a/src/public/stylesheets/theme-next.css b/src/public/stylesheets/theme-next.css
index 20d6ffac6a..39fd64cb43 100644
--- a/src/public/stylesheets/theme-next.css
+++ b/src/public/stylesheets/theme-next.css
@@ -413,7 +413,7 @@ body.layout-horizontal {
}
/* #region Mica */
-body.electron.platform-win32 {
+body.background-effects.platform-win32 {
--launcher-pane-horizontal-border-color: rgba(0, 0, 0, 0.15);
--launcher-pane-background-color: rgba(255, 255, 255, 0.7);
--tab-background-color: transparent;
@@ -424,27 +424,27 @@ body.electron.platform-win32 {
}
@media (prefers-color-scheme: dark) {
- body.electron.platform-win32 {
+ body.background-effects.platform-win32 {
--launcher-pane-horizontal-border-color: rgba(0, 0, 0, 0.5);
--launcher-pane-background-color: rgba(255, 255, 255, 0.09);
}
}
-body.electron.platform-win32.layout-vertical {
+body.background-effects.platform-win32.layout-vertical {
--left-pane-background-color: transparent;
--launcher-pane-background-color: rgba(255, 255, 255, 0.055);
--left-pane-item-hover-background: rgba(127, 127, 127, 0.05);
--background-material: mica;
}
-body.electron.platform-win32,
-body.electron.platform-win32 #root-widget,
-body.electron.platform-win32 #launcher-pane .launcher-button {
+body.background-effects.platform-win32,
+body.background-effects.platform-win32 #root-widget,
+body.background-effects.platform-win32 #launcher-pane .launcher-button {
background: transparent !important;
}
-body.electron.platform-win32.layout-horizontal #horizontal-main-container,
-body.electron.platform-win32.layout-vertical #vertical-main-container {
+body.background-effects.platform-win32.layout-horizontal #horizontal-main-container,
+body.background-effects.platform-win32.layout-vertical #vertical-main-container {
background-color: var(--root-background);
}
/* #endregion */
diff --git a/src/routes/index.ts b/src/routes/index.ts
index 60caf7ccc7..8dda180f6c 100644
--- a/src/routes/index.ts
+++ b/src/routes/index.ts
@@ -37,6 +37,7 @@ function index(req: Request, res: Response) {
platform: process.platform,
isElectron,
hasNativeTitleBar: (isElectron && options.nativeTitleBarVisible === "true"),
+ hasBackgroundEffects: (isElectron && 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 29afdcfd35..2de4a1817a 100644
--- a/src/views/desktop.ejs
+++ b/src/views/desktop.ejs
@@ -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' : '' %> <%= hasNativeTitleBar ? 'native-titlebar' : '' %>">
+<body class="desktop heading-style-<%= headingStyle %> layout-<%= layoutOrientation %> platform-<%= platform %> <%= isElectron ? 'electron' : '' %> <%= hasNativeTitleBar ? 'native-titlebar' : '' %> <%= hasBackgroundEffects ? 'background-effects' : '' %>">
<noscript><%= t("javascript-required") %></noscript>
<script>