diff options
author | Phil Hughes <me@iamphill.com> | 2018-03-21 11:06:39 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-03-22 10:33:20 +0000 |
commit | ba63bda9550d3d66545e71de1f78a3089c7dc014 (patch) | |
tree | e45edc9102fd2ef9957c3def1642aa040e0d0253 /app/assets/javascripts/ide/stores/getters.js | |
parent | 51c64f3fc7180732621d60f939bfe6157165040f (diff) | |
download | gitlab-ce-ba63bda9550d3d66545e71de1f78a3089c7dc014.tar.gz |
correctly stages and unstages files
after a commit the files are correctly reset
correctly enables the ability to have different staged & unstaged changes in the same file
Diffstat (limited to 'app/assets/javascripts/ide/stores/getters.js')
-rw-r--r-- | app/assets/javascripts/ide/stores/getters.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/assets/javascripts/ide/stores/getters.js b/app/assets/javascripts/ide/stores/getters.js index 85f9b75636a..c816936306d 100644 --- a/app/assets/javascripts/ide/stores/getters.js +++ b/app/assets/javascripts/ide/stores/getters.js @@ -24,9 +24,8 @@ export const projectsWithTrees = state => }); // eslint-disable-next-line no-confusing-arrow -export const currentIcon = state => +export const collapseButtonIcon = state => state.rightPanelCollapsed ? 'angle-double-left' : 'angle-double-right'; -export const hasChanges = state => !!state.changedFiles.length; - -export const unstagedFiles = state => state.changedFiles.filter(f => !f.staged); +export const hasChanges = state => + !!state.changedFiles.length || !!state.stagedFiles.length; |