diff --git a/apps/desktop/src/main/menu/menu.view.ts b/apps/desktop/src/main/menu/menu.view.ts index e884337cf77..c1553bdf088 100644 --- a/apps/desktop/src/main/menu/menu.view.ts +++ b/apps/desktop/src/main/menu/menu.view.ts @@ -3,6 +3,8 @@ import { MenuItemConstructorOptions } from "electron"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; +import { isDev } from "../../utils"; + import { IMenubarMenu } from "./menubar"; export class ViewMenu implements IMenubarMenu { @@ -13,7 +15,7 @@ export class ViewMenu implements IMenubarMenu { } get items(): MenuItemConstructorOptions[] { - return [ + const items = [ this.searchVault, this.separator, this.generator, @@ -26,8 +28,13 @@ export class ViewMenu implements IMenubarMenu { this.toggleFullscreen, this.separator, this.reload, - this.toggleDevTools, ]; + + if (isDev()) { + items.push(this.toggleDevTools); + } + + return items; } private readonly _i18nService: I18nService; diff --git a/apps/desktop/src/main/window.main.ts b/apps/desktop/src/main/window.main.ts index c89b2d073d5..64eca116dd8 100644 --- a/apps/desktop/src/main/window.main.ts +++ b/apps/desktop/src/main/window.main.ts @@ -166,6 +166,7 @@ export class WindowMain { backgroundThrottling: false, contextIsolation: true, session: this.session, + devTools: isDev(), }, });