A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
desktop: permanently disable menu bar
Abdullah Atta3f32673b0a98
diff --git a/apps/desktop/src/api/os-integration.ts b/apps/desktop/src/api/os-integration.tsindex 693c610cd..086a259ff 100644--- a/apps/desktop/src/api/os-integration.ts+++ b/apps/desktop/src/api/os-integration.ts@@ -54,15 +54,6 @@ export const osIntegrationRouter = t.router({config.zoomFactor = factor;}),- menuBar: t.procedure.query(() => config.menuBar),- setMenuBar: t.procedure- .input(z.object({ enabled: z.boolean() }))- .mutation(({ input: { enabled } }) => {- config.menuBar = enabled;- if (!enabled) globalThis.window?.setMenuBarVisibility(false);- globalThis.window?.setAutoHideMenuBar(enabled);- }),-privacyMode: t.procedure.query(() => config.privacyMode),setPrivacyMode: t.procedure.input(z.object({ enabled: z.boolean() }))diff --git a/apps/desktop/src/main.ts b/apps/desktop/src/main.tsindex 16ccc42fe..dc152eda9 100644--- a/apps/desktop/src/main.ts+++ b/apps/desktop/src/main.ts@@ -77,7 +77,7 @@ async function createWindow() {darkTheme: getTheme() === "dark",backgroundColor: getBackgroundColor(),opacity: 0,- autoHideMenuBar: config.menuBar,+ autoHideMenuBar: false,icon: AssetManager.appIcon({size: 512,format: process.platform === "win32" ? "ico" : "png"diff --git a/apps/desktop/src/utils/config.ts b/apps/desktop/src/utils/config.tsindex ba736956c..59a261183 100644--- a/apps/desktop/src/utils/config.ts+++ b/apps/desktop/src/utils/config.ts@@ -41,8 +41,7 @@ export const config = {isSpellCheckerEnabled: true,zoomFactor: 1,theme: nativeTheme.themeSource,- automaticUpdates: true,- menuBar: true+ automaticUpdates: true};type ConfigKey = keyof typeof config;diff --git a/apps/web/src/dialogs/settings/behaviour-settings.ts b/apps/web/src/dialogs/settings/behaviour-settings.tsindex becca2958..7a041ccf6 100644--- a/apps/web/src/dialogs/settings/behaviour-settings.ts+++ b/apps/web/src/dialogs/settings/behaviour-settings.ts@@ -22,7 +22,6 @@ import { SettingsGroup } from "./types";import { useStore as useSettingStore } from "../../stores/setting-store";import dayjs from "dayjs";import { isUserPremium } from "../../hooks/use-is-user-premium";-import { isMac } from "../../utils/platform";export const BehaviourSettings: SettingsGroup[] = [{@@ -157,20 +156,6 @@ export const BehaviourSettings: SettingsGroup[] = [toggle: () => useSettingStore.getState().toggleAutoUpdates()}]- },- {- key: "menu-bar",- title: "Disable menu bar",- description:- "Disable menu bar so it remains hidden even when Alt key is pressed.",- isHidden: () => isMac(),- components: [- {- type: "toggle",- isToggled: () => !useSettingStore.getState().menuBar,- toggle: () => useSettingStore.getState().toggleMenuBar()- }- ]}]}diff --git a/apps/web/src/stores/setting-store.js b/apps/web/src/stores/setting-store.jsindex b4c25ca3b..2c83bc54b 100644--- a/apps/web/src/stores/setting-store.js+++ b/apps/web/src/stores/setting-store.js@@ -58,7 +58,6 @@ class SettingStore extends BaseStore {desktopIntegrationSettings = undefined;autoUpdates = true;isFlatpak = false;- menuBar = true;refresh = async () => {this.set({@@ -71,8 +70,7 @@ class SettingStore extends BaseStore {await desktop?.integration.desktopIntegration.query(),privacyMode: await desktop?.integration.privacyMode.query(),zoomFactor: await desktop?.integration.zoomFactor.query(),- autoUpdates: await desktop?.updater.autoUpdates.query(),- menuBar: await desktop?.integration.menuBar.query()+ autoUpdates: await desktop?.updater.autoUpdates.query()});};@@ -184,14 +182,6 @@ class SettingStore extends BaseStore {this.set({ autoUpdates: !autoUpdates });await desktop?.updater.toggleAutoUpdates.mutate({ enabled: !autoUpdates });};-- toggleMenuBar = async () => {- const menuBar = this.get().menuBar;- this.set({ menuBar: !menuBar });- await desktop?.integration.setMenuBar.mutate({- enabled: !menuBar- });- };}const [useStore, store] = createStore(SettingStore);