diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-29 18:08:47 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-29 18:08:47 +0000 |
commit | 6b9d3a4e8351e662c4586b24bb152de78ae9e3bf (patch) | |
tree | 883e9db60c047c54418fc1d2b1c5517f97e0f185 /app/assets/javascripts/vue_shared | |
parent | 23288f62da73fb0e30d8e7ce306665e8fda1b932 (diff) | |
download | gitlab-ce-6b9d3a4e8351e662c4586b24bb152de78ae9e3bf.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/changed_file_icon.vue | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/app/assets/javascripts/vue_shared/components/changed_file_icon.vue b/app/assets/javascripts/vue_shared/components/changed_file_icon.vue index 75c3c544c77..9ec99ac93d7 100644 --- a/app/assets/javascripts/vue_shared/components/changed_file_icon.vue +++ b/app/assets/javascripts/vue_shared/components/changed_file_icon.vue @@ -41,7 +41,7 @@ export default { changedIcon() { // False positive i18n lint: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26 // eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings - const suffix = !this.file.changed && this.file.staged && this.showStagedIcon ? '-solid' : ''; + const suffix = this.file.staged && this.showStagedIcon ? '-solid' : ''; return `${getCommitIconMap(this.file).icon}${suffix}`; }, @@ -49,25 +49,19 @@ export default { return `${this.changedIcon} float-left d-block`; }, tooltipTitle() { - if (!this.showTooltip) return undefined; + if (!this.showTooltip || !this.file.changed) return undefined; const type = this.file.tempFile ? 'addition' : 'modification'; - if (this.file.changed && !this.file.staged) { - return sprintf(__('Unstaged %{type}'), { - type, - }); - } else if (!this.file.changed && this.file.staged) { + if (this.file.staged) { return sprintf(__('Staged %{type}'), { type, }); - } else if (this.file.changed && this.file.staged) { - return sprintf(__('Unstaged and staged %{type}'), { - type, - }); } - return undefined; + return sprintf(__('Unstaged %{type}'), { + type, + }); }, showIcon() { return ( |