Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: enable custom title bar in the web app

Abdullah Atta0517f61164e4
diff --git a/apps/web/src/app.tsx b/apps/web/src/app.tsx
index a92d395e7..f20cb124d 100644
--- a/apps/web/src/app.tsx
+++ b/apps/web/src/app.tsx
@@ -136,7 +136,7 @@ function DesktopAppContents({
return (
<>
- {IS_DESKTOP_APP ? <EditorActionBar /> : null}
+ <EditorActionBar />
<Flex
variant="rowFill"
sx={{
diff --git a/apps/web/src/components/editor/action-bar.tsx b/apps/web/src/components/editor/action-bar.tsx
index 4fd436859..c2626a53f 100644
--- a/apps/web/src/components/editor/action-bar.tsx
+++ b/apps/web/src/components/editor/action-bar.tsx
@@ -187,7 +187,7 @@ export function EditorActionBar() {
sx={{
gap: 2,
borderBottom: "1px solid var(--border)",
- px: 2,
+ px: 1,
...(IS_DESKTOP_APP && !isFullscreen && hasNativeWindowControls
? getPlatform() === "darwin"
? { pl: "calc(100vw - env(titlebar-area-width))" }
diff --git a/apps/web/src/hooks/use-window-controls.ts b/apps/web/src/hooks/use-window-controls.ts
index dadfbfc99..1811999b1 100644
--- a/apps/web/src/hooks/use-window-controls.ts
+++ b/apps/web/src/hooks/use-window-controls.ts
@@ -50,17 +50,6 @@ export function useWindowControls() {
isMaximized,
isFullscreen,
hasNativeWindowControls:
- IS_DESKTOP_APP || getPlatform() === "darwin" || getPlatform() === "win32"
+ !IS_DESKTOP_APP || getPlatform() === "darwin" || getPlatform() === "win32"
};
}
-
-function windowControlsMargin() {
- if (
- !window.navigator.windowControlsOverlay ||
- !window.navigator.windowControlsOverlay.visible
- )
- return 0;
- const overlayRect =
- window.navigator.windowControlsOverlay.getTitlebarAreaRect();
- return window.innerWidth - overlayRect.width + 5;
-}