Skip to content

Commit

Permalink
release 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Toinane committed Mar 11, 2019
1 parent 413a92d commit 5df8b05
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "container-ps",
"version": "1.1.0",
"version": "1.2.0",
"main": "src/main.js",
"repository": "https://github.com/Toinane/docker-ps.git",
"author": "Toinane <[email protected]>",
Expand Down
12 changes: 11 additions & 1 deletion src/List.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { clipboard, Menu } = require('electron')
const { clipboard, dialog, Menu } = require('electron')

const Tray = require('./ContainerTray')
const Container = require('./Container')
Expand Down Expand Up @@ -92,6 +92,16 @@ class List {
label: 'Delete Container',
id: container.id,
click: async event => {
const response = await dialog.showMessageBox({
type: 'warning',
buttons: [ 'No', 'Yes' ],
title: 'Do you really want to delete this container?',
message: 'Do you really want to delete this container?',
detail: 'This container will be deleted permanently and it will no longer be possible to recover it'
})

if(!response) return

this.tray.setLoading()
await Command.run('docker', ['stop', event.id])
await Command.run('docker', ['rm', event.id])
Expand Down

0 comments on commit 5df8b05

Please sign in to comment.