Skip to content

Commit

Permalink
feat: crude about window
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Jan 19, 2021
1 parent 1528af2 commit ba50f69
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 13 deletions.
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
"email": "[email protected]",
"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",
Expand Down Expand Up @@ -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",
Expand Down
33 changes: 20 additions & 13 deletions src/electron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<RemoteConfig>()

Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
})
}
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ba50f69

Please sign in to comment.