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

feat: tray icon to allow NN to run in background #520

Merged
merged 4 commits into from
Mar 27, 2024
Merged

Conversation

jgresham
Copy link
Member

@jgresham jgresham commented Mar 20, 2024

Screenshot 2024-03-20 at 3 30 49 PM
  • Show each node and its status in the dropdown
  • Add open app option
  • better icon from @ddannehh
  • Show error icon if a user started node crashed (was not stopped by user) (handle system restart cases) @ddannehh

Icon specs:
Screenshot 2024-03-20 at 3 40 01 PM

Purpose

This allows NN to run in the background by giving users a "hard quit" option under the tray icon (similar to how 1Password works). The purpose is to keep a tray icon updated, monitor node's statuses and alert the user when a node is down, and to continuously measure node usage for charts in-app.
It also will allow a user to know if a node has crashed (error icon in tray) instead of having to open NiceNode window

Copy link

netlify bot commented Mar 20, 2024

Deploy Preview for nndesign ready!

Name Link
🔨 Latest commit ff835a2
🔍 Latest deploy log https://app.netlify.com/sites/nndesign/deploys/660463ffeb9d290008c7c57f
😎 Deploy Preview https://deploy-preview-520--nndesign.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ddannehh
Copy link

ddannehh commented Mar 22, 2024

Icon

Icon below should be according to the MacOS requirements.

MenuBar Default @2x 200%

In terms of reflecting a status I'm not sure what is possible within the Electron environment.
MenuBar Alert Alts @2x 200%

Guidelines say it has to be monochrome, but there are plenty of apps that add color or even dynamic numbers to the tray icon, see example below.

Screenshot 2024-03-22 at 12 24 26

I've added a monochrome version with bullet to the png files for now.
DOWNLOAD HERE: NNTrayIcons.zip
(Contains both default and @2x versions)

Menu

Basic proposal

MenuBar Alert @2x DM 200%

This would be a "basic" implementation close to the default MacOS menu's but I guess we'd benefit from a more custom design where we we could add a bit of color or display additional data like whether the node is running on mainnet/testnet etc.
Again, not sure how far we can take this within Electron.

UX

Some things that came to mind:

  • Clicking on a node list-item from the tray menu should open the app with that node selected in the sidebar.
  • Using the "Quit" menu item should probably prompt the user with an "are you sure?" type of alert informing them of the implications (nodes will stop syncing etc) either by opening the app with the alert displayed in the app or if not possible through an OS system alert? I'm assuming this would shut down all NN related processes until the app gets relaunched.

@jgresham jgresham changed the title [wip] feat: tray icon to allow NN to run in background feat: tray icon to allow NN to run in background Mar 27, 2024
@jgresham jgresham merged commit db1c629 into main Mar 27, 2024
14 of 16 checks passed
@jgresham jgresham mentioned this pull request Mar 27, 2024
4 tasks
@jgresham jgresham deleted the feat/tray-icon branch March 27, 2024 20:38
@jgresham
Copy link
Member Author

@ddannehh I merged a working version for now, but it is missing out on the full design & alert icon thinking. I've tried to copy or summarize the yet to do features in #526.

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

Successfully merging this pull request may close these issues.

2 participants