File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " container-ps" ,
3
- "version" : " 1.1 .0" ,
3
+ "version" : " 1.2 .0" ,
4
4
"main" : " src/main.js" ,
5
5
"repository" : " https://github.com/Toinane/docker-ps.git" ,
6
6
"author" :
" Toinane <[email protected] >" ,
Original file line number Diff line number Diff line change 1
- const { clipboard, Menu } = require ( 'electron' )
1
+ const { clipboard, dialog , Menu } = require ( 'electron' )
2
2
3
3
const Tray = require ( './ContainerTray' )
4
4
const Container = require ( './Container' )
@@ -92,6 +92,16 @@ class List {
92
92
label : 'Delete Container' ,
93
93
id : container . id ,
94
94
click : async event => {
95
+ const response = await dialog . showMessageBox ( {
96
+ type : 'warning' ,
97
+ buttons : [ 'No' , 'Yes' ] ,
98
+ title : 'Do you really want to delete this container?' ,
99
+ message : 'Do you really want to delete this container?' ,
100
+ detail : 'This container will be deleted permanently and it will no longer be possible to recover it'
101
+ } )
102
+
103
+ if ( ! response ) return
104
+
95
105
this . tray . setLoading ( )
96
106
await Command . run ( 'docker' , [ 'stop' , event . id ] )
97
107
await Command . run ( 'docker' , [ 'rm' , event . id ] )
You can’t perform that action at this time.
0 commit comments