How to use the menubar.Menubar function in menubar

To help you get started, we’ve selected a few menubar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ktmouk / hackaru-desktop / src / main / menubar.js View on Github external
import { generateUrl } from './windows';
import store from '../renderer/store';
import { pageView } from '../renderer/ua';

function getTrayIcon() {
  switch (process.platform) {
    case 'darwin':
      return '/IconTemplate.png';
    case 'win32':
      return '/icon-tray.ico';
    default:
      return '/icon-tray-light.png';
  }
}

const menubar = new Menubar(app, {
  index: generateUrl(),
  icon: path.join(__static, getTrayIcon()),
  tooltip: 'Open App',
  preloadWindow: true,
  browserWindow: {
    width: 285,
    height: 480,
    webPreferences: {
      nodeIntegration: true
    }
  }
});

function getTrayTitle() {
  const startedAt = (store.getters['activities/working'] || {}).startedAt;
  return startedAt

menubar

high level way to create menubar desktop applications with electron

BSD-2-Clause
Latest version published 2 months ago

Package Health Score

85 / 100
Full package analysis