diff options
author | Phil Hughes <me@iamphill.com> | 2018-07-26 14:56:56 +0000 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2018-07-26 14:56:56 +0000 |
commit | cded268ca1d49fe93b8e0940586e9792347c88c3 (patch) | |
tree | 9d84a5e8ae38e53514b6ab1f4e99d38ddf2fe138 /app/assets/javascripts/ide/utils.js | |
parent | 8873840839811948b2f29175177b91bcf806a3f8 (diff) | |
download | gitlab-ce-cded268ca1d49fe93b8e0940586e9792347c88c3.tar.gz |
Enable deleting files in the Web IDE
Diffstat (limited to 'app/assets/javascripts/ide/utils.js')
-rw-r--r-- | app/assets/javascripts/ide/utils.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/assets/javascripts/ide/utils.js b/app/assets/javascripts/ide/utils.js new file mode 100644 index 00000000000..92b15cf232d --- /dev/null +++ b/app/assets/javascripts/ide/utils.js @@ -0,0 +1,12 @@ +import { commitItemIconMap } from './constants'; + +// eslint-disable-next-line import/prefer-default-export +export const getCommitIconMap = file => { + if (file.deleted) { + return commitItemIconMap.deleted; + } else if (file.tempFile) { + return commitItemIconMap.addition; + } + + return commitItemIconMap.modified; +}; |