Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(desktop/setup): window with no traffic lights or draggable on macOS
Elian Doran360d9d520221
diff --git a/apps/client/src/setup.css b/apps/client/src/setup.cssindex 5c533939c6..c86c48307f 100644--- a/apps/client/src/setup.css+++ b/apps/client/src/setup.css@@ -250,6 +250,24 @@ body.setup.background-effects .setup-container {background: transparent;}+/* macOS: draggable title bar region and traffic light buttons */+body.setup.platform-darwin {+ .drag-region {+ position: absolute;+ top: 0;+ left: 0;+ right: 0;+ height: 40px;+ -webkit-app-region: drag;+ z-index: 10;+ }++ .back-button {+ -webkit-app-region: no-drag;+ z-index: 11;+ }+}+@keyframes lds-ring {0% {transform: rotate(0deg);diff --git a/apps/client/src/setup.tsx b/apps/client/src/setup.tsxindex 8794df91a7..4d85277433 100644--- a/apps/client/src/setup.tsx+++ b/apps/client/src/setup.tsx@@ -70,6 +70,7 @@ function App() {return (<div class="setup-container">+ <div class="drag-region" />{transitioning && prevState !== null && (<divclass={`slide-page slide-out-${direction}`}diff --git a/apps/server/src/services/window.ts b/apps/server/src/services/window.tsindex af41a9e66d..0c90ab87df 100644--- a/apps/server/src/services/window.ts+++ b/apps/server/src/services/window.ts@@ -397,7 +397,7 @@ async function createSetupWindow() {icon: getIcon(),// Background effects (Mica on Windows, vibrancy on macOS)...(isWindows && { backgroundMaterial: "mica" as const }),- ...(isMac && { transparent: true, visualEffectState: "active" as const, vibrancy: "under-window" as const }),+ ...(isMac && { transparent: true, visualEffectState: "active" as const, vibrancy: "under-window" as const, titleBarStyle: "hiddenInset" as const }),webPreferences: {// necessary for e.g. utils.isElectron()nodeIntegration: true,