diff --git a/README.md b/README.md index 3d4ec89..bef16eb 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,34 @@ # Container PS -This little app for **OSX** help you to manager your Docker containers. -It uses shell commands using the **Node.js** *child_process* [exec](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback) module. +> This little app for **OSX** help you to manager your Docker containers. + +You must have Docker launched to make work this app. +It uses shell commands using the **Node.js** *child_process* [spawn](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) module, thanks to @SebastianRuecker. --- You can see the list of all your containers, whether they are active or not. -![Screenshot](/screenshots/dark.png) + + With the light Theme. -![Screenshot](/screenshots/light.png) + + - The full circle indicates that the container is active. - The empty circle indicates that it is inactive. - And the round with a full wave indicates that the container is restarting. -![Screenshot](/screenshots/light-complete.png) When hovering over a container, you will have additional information about it, as well as buttons to turn it on, off, restart or delete it. --- -## Download +# Download + +See in [releases pages](https://github.com/Toinane/container-ps/releases). -Since exec from child_process doesn't work in asar archive, I can't make a release for the moment :/ -If you have a solution for this, feel free to contribute! +# Development -### Launch in shell +Install dependencies and start. ```shell yarn && yarn start ``` \ No newline at end of file diff --git a/assets/icon.icns b/assets/icon.icns index 2e85474..a4ab497 100644 Binary files a/assets/icon.icns and b/assets/icon.icns differ diff --git a/assets/icon.ico b/assets/icon.ico index 0709580..af8b509 100644 Binary files a/assets/icon.ico and b/assets/icon.ico differ diff --git a/assets/icon.png b/assets/icon.png index a192b68..281a514 100644 Binary files a/assets/icon.png and b/assets/icon.png differ diff --git a/screenshots/dark.png b/screenshots/dark.png index c0acb3f..2bb9a99 100644 Binary files a/screenshots/dark.png and b/screenshots/dark.png differ diff --git a/screenshots/light-complete.png b/screenshots/light-complete.png deleted file mode 100644 index cdac234..0000000 Binary files a/screenshots/light-complete.png and /dev/null differ diff --git a/screenshots/light.png b/screenshots/light.png index 1bc7108..a86fb30 100644 Binary files a/screenshots/light.png and b/screenshots/light.png differ diff --git a/src/ContainerTray.js b/src/ContainerTray.js index abae78e..8af8765 100644 --- a/src/ContainerTray.js +++ b/src/ContainerTray.js @@ -3,10 +3,11 @@ const path = require('path') const { Tray, nativeImage } = require('electron') class ContainerTray { - constructor() { + constructor(menu) { this.tray = new Tray(this.getImageLink('idle')) this.tray.setToolTip('Container PS') this.isLoading = false + this.setMenu(menu) } setIcon(type) { diff --git a/src/List.js b/src/List.js index 8d36643..facdca8 100644 --- a/src/List.js +++ b/src/List.js @@ -6,20 +6,23 @@ const Command = require('./Command') class List { constructor() { - this.tray = new Tray() this.separator = { type: 'separator' } - this.iconType = { - up: this.tray.getImageLink('up'), - restarting: this.tray.getImageLink('restarting'), - down: this.tray.getImageLink('down') - } this.defaultLabels = [ - { label: 'Container PS', enabled: false }, + { label: 'Container PS', enabled: false }, this.separator, { label: 'Reload List', accelerator: 'CmdOrCtrl+R', click: () => this.update() }, { label: 'Quit', role: 'quit', accelerator: 'CmdOrCtrl+Q' }, this.separator ] + this.tray = new Tray(Menu.buildFromTemplate([ + ...this.defaultLabels, + { label: 'Container PS is loading...', enabled: false } + ])) + this.iconType = { + up: this.tray.getImageLink('up'), + restarting: this.tray.getImageLink('restarting'), + down: this.tray.getImageLink('down') + } } async update() { diff --git a/src/assets/idleTemplate.png b/src/assets/idleTemplate.png new file mode 100644 index 0000000..e8c4335 Binary files /dev/null and b/src/assets/idleTemplate.png differ diff --git a/src/assets/loading-0Template.png b/src/assets/loading-0Template.png new file mode 100644 index 0000000..e8c4335 Binary files /dev/null and b/src/assets/loading-0Template.png differ diff --git a/src/assets/loading-1Template.png b/src/assets/loading-1Template.png new file mode 100644 index 0000000..b8dbe60 Binary files /dev/null and b/src/assets/loading-1Template.png differ diff --git a/src/assets/loading-2Template.png b/src/assets/loading-2Template.png new file mode 100644 index 0000000..3fc00bb Binary files /dev/null and b/src/assets/loading-2Template.png differ diff --git a/src/assets/loading-3Template.png b/src/assets/loading-3Template.png new file mode 100644 index 0000000..a1bb04c Binary files /dev/null and b/src/assets/loading-3Template.png differ diff --git a/src/assets/loading-4Template.png b/src/assets/loading-4Template.png new file mode 100644 index 0000000..4dc2a32 Binary files /dev/null and b/src/assets/loading-4Template.png differ diff --git a/src/assets/trayTemplate.png b/src/assets/trayTemplate.png deleted file mode 100644 index 9ec0edd..0000000 Binary files a/src/assets/trayTemplate.png and /dev/null differ