Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: hide unused menu bar on Linux and Windows builds #79

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
titleBarStyle: "hidden",
resizable: !config.isProduction,
show: false,
autoHideMenuBar: true,
webPreferences: {
allowRunningInsecureContent: false,
// Need these enabled when e2e is running
Expand All @@ -70,6 +71,8 @@
} as electron.WebPreferences,
});

if (config.isProduction) mainWindow.setMenu(null);

if (config.startParams.isE2e) {
session
.fromPartition("default")
Expand All @@ -79,7 +82,7 @@
if (allowedPermissions.includes(permission)) {
callback(true);
} else {
console.error(

Check warning on line 85 in src/main/index.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement
`The application tried to request permission for '${permission}'. This permission was not whitelisted and has been blocked.`
);

Expand All @@ -89,10 +92,10 @@
}

if (!config.isProduction) {
console.log("loading renderer in development");

Check warning on line 95 in src/main/index.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement
void mainWindow.loadURL(`http://localhost:8081/index.html`);
} else {
console.log("loading renderer");

Check warning on line 98 in src/main/index.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement
void mainWindow.loadFile(path.join(__dirname, "../renderer/index.html"));
}

Expand Down Expand Up @@ -147,7 +150,7 @@
const startBackend = async (): Promise<void> => {
const mocked = config.startParams.isMocked || config.startParams.isE2e;
if (mocked) {
console.log("Creating backend in mocked mode");

Check warning on line 153 in src/main/index.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement
}

const busLink = createBusLinkBackend({
Expand Down
Loading