From 2a59f1bbe1025517484c2721f9843df4192534b3 Mon Sep 17 00:00:00 2001 From: Will Stone Date: Sat, 26 Aug 2017 15:47:10 +0100 Subject: [PATCH] about window --- package-lock.json | 7 ++++++- package.json | 5 +++-- src/main.js | 9 +++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c16f6020..a628f1bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "browserosaurus", - "version": "1.0.0", + "version": "1.0.1", "lockfileVersion": 1, "dependencies": { "@paulcbetts/mime-db": { @@ -37,6 +37,11 @@ "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=", "dev": true }, + "about-window": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/about-window/-/about-window-1.7.1.tgz", + "integrity": "sha512-cBMdablr5tADuDsBd/Q/BfMiZbEjXxQWKUNwKioU8erYCFYTk/bq1tvgPq+S6bn68WGlw+iQm90bqPT+YzpjbA==" + }, "acorn": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz", diff --git a/package.json b/package.json index 38b4c447..b0672253 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "browserosaurus", "productName": "Browserosaurus", - "version": "1.0.1", - "description": "Choose which browser to use when you open a link", + "version": "1.0.2", + "description": "The browser prompter for macOS", "homepage": "", "main": "src/main.js", "scripts": { @@ -33,6 +33,7 @@ "prettier": "^1.4.4" }, "dependencies": { + "about-window": "^1.7.1", "electron-compile": "^6.4.1", "jsonpath": "^0.2.11", "mousetrap": "^1.6.1", diff --git a/src/main.js b/src/main.js index 3ef5a173..77750529 100644 --- a/src/main.js +++ b/src/main.js @@ -2,6 +2,7 @@ import { app, BrowserWindow, Tray, Menu } from 'electron' import jp from 'jsonpath' import { spawn } from 'child_process' import parser from 'xml2json' +import openAboutWindow from 'about-window' import browsers from './browsers' @@ -71,6 +72,14 @@ function createPickerWindow(numberOfBrowsers, callback) { tray = new Tray(`${__dirname}/images/icon/tray_iconTemplate.png`) tray.setPressedImage(`${__dirname}/images/icon/tray_iconHighlight.png`) const contextMenu = Menu.buildFromTemplate([ + { + label: 'About', + click: function() { + openAboutWindow({ + icon_path: `${__dirname}/images/icon/icon.png` + }) + } + }, { label: 'Quit', click: function() {