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

Deploy as a Menu Bar App #78

Closed
athenawisdoms opened this issue Jul 30, 2019 · 1 comment
Closed

Deploy as a Menu Bar App #78

athenawisdoms opened this issue Jul 30, 2019 · 1 comment
Labels

Comments

@athenawisdoms
Copy link

athenawisdoms commented Jul 30, 2019

Hello there!

How can we deploy a vanilla electron-react-redux-boilerplate app as a menu bar app, especially using the menubar package?

For example, based on this example, we can easily create a menubar app by having just main.js to contain

const { menubar } = require('menubar');

const mb = menubar();

mb.on('ready', () => {
  console.log('Menubar app is ready.');
});

Where should such initialization code for menubar be placed in the electron-react-redux-boilerplate code? If this is not the right approach, what is the correct way to integrate menubar?

My attempt:

image

I modified init.js to include some code using the menubar package, as shown below. However, the original boilerplate app still appears as per normal. Furthermore, there is now an icon in the tray, but clicking on it shows an empty white menubar screen.

require('./build/main');

const { menubar } = require('menubar');

const mb = menubar();

mb.on('ready', () => {
  console.log('Menubar app is ready.');
});

Thank you very much!

@pronebird
Copy link
Collaborator

pronebird commented Aug 31, 2019

Hi,

Sounds like app/main/index.js is the right place to do the menubar configuration. Normally you shouldn't touch the init.js as it's a bootstrap script for Electron.

For more info you should perhaps ask on Stockoverflow or at the menubar's repository.

Cheers,
Andrej

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants