diff options
author | Phil Hughes <me@iamphill.com> | 2018-08-01 17:16:21 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-08-01 17:16:21 +0100 |
commit | 3f4aaea26c65391098e9e424c4550493a1c525cb (patch) | |
tree | 104086d742b61c069aa3f0e9bd65fbecdd6375cc /app/assets/javascripts/ide/stores/actions.js | |
parent | 100c68eecd7ba6f950d1f23d339a2f1ec55675d8 (diff) | |
download | gitlab-ce-3f4aaea26c65391098e9e424c4550493a1c525cb.tar.gz |
correctly show renaming and deleting entries
for folders, it shows all the files in commit mode
for files, nothing changes, the behaviour is the same
Diffstat (limited to 'app/assets/javascripts/ide/stores/actions.js')
-rw-r--r-- | app/assets/javascripts/ide/stores/actions.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/assets/javascripts/ide/stores/actions.js b/app/assets/javascripts/ide/stores/actions.js index 6f70f297214..523f6ef03f4 100644 --- a/app/assets/javascripts/ide/stores/actions.js +++ b/app/assets/javascripts/ide/stores/actions.js @@ -186,8 +186,14 @@ export const openNewEntryModal = ({ commit }, { type, path = '' }) => { }; export const deleteEntry = ({ commit, dispatch, state }, path) => { + const entry = state.entries[path]; dispatch('burstUnusedSeal'); - dispatch('closeFile', state.entries[path]); + dispatch('closeFile', entry); + + if (entry.type === 'tree') { + entry.tree.forEach(f => dispatch('deleteEntry', f.path)); + } + commit(types.DELETE_ENTRY, path); }; |