From 5df8b05579783b414dfc0d89c34a4d388f295418 Mon Sep 17 00:00:00 2001 From: Toinane Date: Mon, 11 Mar 2019 12:35:39 +0100 Subject: [PATCH] release 1.2.0 --- package.json | 2 +- src/List.js | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 792dc6d..f01e4ad 100644 --- a/package.json +++ b/package.json @@ -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 ", diff --git a/src/List.js b/src/List.js index facdca8..3fb42de 100644 --- a/src/List.js +++ b/src/List.js @@ -1,4 +1,4 @@ -const { clipboard, Menu } = require('electron') +const { clipboard, dialog, Menu } = require('electron') const Tray = require('./ContainerTray') const Container = require('./Container') @@ -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])