diff options
Diffstat (limited to 'app/assets/javascripts/ide/stores/mutations/file.js')
-rw-r--r-- | app/assets/javascripts/ide/stores/mutations/file.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/assets/javascripts/ide/stores/mutations/file.js b/app/assets/javascripts/ide/stores/mutations/file.js index 2500f13db7c..915126f10eb 100644 --- a/app/assets/javascripts/ide/stores/mutations/file.js +++ b/app/assets/javascripts/ide/stores/mutations/file.js @@ -80,4 +80,18 @@ export default { changed, }); }, + [types.ADD_PENDING_TAB](state, file) { + Object.assign(state, { + pendingTabs: state.pendingTabs.concat({ + ...file, + active: true, + pending: true, + }), + }); + }, + [types.REMOVE_PENDING_TAB](state, file) { + Object.assign(state, { + pendingTabs: state.pendingTabs.filter(f => f.path !== file.path), + }); + }, }; |