fix dialogs.delete: Show file name in delete dialog
This commit is contained in:
parent
ffb7c68510
commit
2ed94718d6
@ -23379,8 +23379,12 @@ var entryMenu = {
|
|||||||
}, {
|
}, {
|
||||||
name: 'Delete',
|
name: 'Delete',
|
||||||
action: function action() {
|
action: function action() {
|
||||||
|
var files = _store2['default'].getState().get('files');
|
||||||
|
var active = _store2['default'].getState().get('activeFile');
|
||||||
|
var name = files[active].name;
|
||||||
|
var MSG = 'Are you sure you want to remove ' + name + '?';
|
||||||
_store2['default'].dispatch((0, _actionsMenu.hideAll)());
|
_store2['default'].dispatch((0, _actionsMenu.hideAll)());
|
||||||
_store2['default'].dispatch((0, _actionsDialog.show)('deleteDialog'));
|
_store2['default'].dispatch((0, _actionsDialog.show)('deleteDialog', { description: MSG }));
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
|
@ -14,8 +14,12 @@ const entryMenu = {
|
|||||||
{
|
{
|
||||||
name: 'Delete',
|
name: 'Delete',
|
||||||
action() {
|
action() {
|
||||||
|
let files = store.getState().get('files');
|
||||||
|
let active = store.getState().get('activeFile');
|
||||||
|
const name = files[active].name;
|
||||||
|
const MSG = `Are you sure you want to remove ${name}?`;
|
||||||
store.dispatch(hideAll());
|
store.dispatch(hideAll());
|
||||||
store.dispatch(show('deleteDialog'))
|
store.dispatch(show('deleteDialog', {description: MSG}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user