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

Create a basic tray #6

Open
poush opened this issue Mar 28, 2020 · 2 comments
Open

Create a basic tray #6

poush opened this issue Mar 28, 2020 · 2 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@poush
Copy link
Member

poush commented Mar 28, 2020

In the recent update, I have commented the old createMenuTray function in main.ts

the task for this issue to reimplement the basic version of the tray icon. First, make sure you have done npm install in your latest pull. Then,

  1. Create a tray-icon.ts config file just like browser-window.ts which will export the object from contextMenu like:
  const contextMenu = Menu.buildFromTemplate([
    { label: 'Item1', type: 'radio' },
    { label: 'Item2', type: 'radio' },
    { label: 'Item3', type: 'radio', checked: true },
    { label: 'Item4', type: 'radio' }
  ])
  1. Right now, we only need one option in the menu Quit which will quit the app.

  2. after you write this config file import it on main.ts and use inside createMenuTray and uncomment the call statement of this function.

  3. Make sure you use the current tray icon image, residing at src/assets/images/tray.png

That's all test your changes and feel free to ask any questions

Find the docs for tray here: https://www.electronjs.org/docs/api/tray

@poush poush added the good first issue Good for newcomers label Mar 28, 2020
@poush poush changed the title Create a basic tray icon Create a basic tray Mar 28, 2020
@divija-palleti
Copy link
Contributor

Hi! I am interested in this issue.

@poush
Copy link
Member Author

poush commented Apr 9, 2020

Sure, please go ahead.

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

No branches or pull requests

2 participants