diff --git a/package.json b/package.json index 6344e7d..598afa5 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,14 @@ "email": "git@julusian.co.uk", "url": "https://github.com/julusian" }, + "repository": { + "type": "git", + "url": "git+https://github.com/julusian/companion-remote.git" + }, + "bugs": { + "url": "https://github.com/julusian/companion-remote/issues" + }, + "homepage": "https://github.com/julusian/companion-remote#readme", "version": "1.0.0", "main": "dist/electron.js", "license": "MIT", @@ -36,6 +44,7 @@ "dependencies": { "@julusian/jpeg-turbo": "^1.0.1", "binopsy": "^0.0.0", + "electron-about-window": "^1.13.4", "electron-prompt": "^1.6.0", "electron-store": "^6.0.1", "elgato-stream-deck": "^4.0.1", diff --git a/src/electron.ts b/src/electron.ts index b798757..e2bb0ab 100644 --- a/src/electron.ts +++ b/src/electron.ts @@ -4,6 +4,7 @@ import * as path from 'path' import { init } from './app' import * as electronStore from 'electron-store' import * as prompt from 'electron-prompt' +import openAboutWindow from 'electron-about-window' const store = new electronStore() @@ -33,24 +34,18 @@ app.whenReady().then(function () { // } const menu = new Menu() - // menu.append( - // new electron.MenuItem({ - // label: 'Show/Hide window', - // click: toggleWindow, - // }) - // ) - // menu.append( - // new electron.MenuItem({ - // label: 'Launch GUI', - // click: launchUI, - // }) - // ) menu.append( new MenuItem({ label: 'Change Host', click: changeHost, }) ) + menu.append( + new MenuItem({ + label: 'About', + click: trayAbout, + }) + ) menu.append( new MenuItem({ label: 'Quit', @@ -96,4 +91,16 @@ function trayQuit() { }) } -client +function trayAbout() { + console.log('about click') + openAboutWindow({ + icon_path: path.join(__dirname, '../assets', 'icon.png'), + product_name: 'Companion Remote', + description: 'Remote Streamdeck connector for Bitfocus Companion 2.1', + adjust_window_size: false, + bug_report_url: 'https://github.com/julusian/companion-remote/issues', + copyright: '2021 Julian Waller', + homepage: 'https://github.com/julusian/companion-remote', + license: 'MIT', + }) +} diff --git a/yarn.lock b/yarn.lock index 68fe03e..b4a4457 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1217,6 +1217,11 @@ ejs@^3.1.5: dependencies: jake "^10.6.1" +electron-about-window@^1.13.4: + version "1.13.4" + resolved "https://registry.yarnpkg.com/electron-about-window/-/electron-about-window-1.13.4.tgz#9f7d5a9da3404eb8a821169e3917e3e950d17bd9" + integrity sha512-EJe/Ws6rmT5q3NhaR5qLZ4C4aC1Eah0b1vlAdcwPh9jZnT55idfTu2GFgM2F4Bc1DEZun4GbM4D2wYXLTHnfWA== + electron-builder@^22.9.1: version "22.9.1" resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-22.9.1.tgz#a2962db6f2757bc01d02489f38fafe0809f68f60"