diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-02 12:14:58 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-02 12:14:58 +0000 |
commit | 292384904c9d821acca2f92d2de2f0b2ed5216df (patch) | |
tree | 80749020532b7e7c9b5ae8ccd276ac6044e3dbee /app/assets/javascripts/network | |
parent | 7d96316836b98056054b9919aa0cc640b2d3b8af (diff) | |
download | gitlab-ce-292384904c9d821acca2f92d2de2f0b2ed5216df.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/network')
-rw-r--r-- | app/assets/javascripts/network/raphael.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/assets/javascripts/network/raphael.js b/app/assets/javascripts/network/raphael.js index 22e06a35d91..e13471c0e51 100644 --- a/app/assets/javascripts/network/raphael.js +++ b/app/assets/javascripts/network/raphael.js @@ -1,12 +1,14 @@ import Raphael from 'raphael/raphael'; +import { formatDate } from '~/lib/utils/datetime_utility'; Raphael.prototype.commitTooltip = function commitTooltip(x, y, commit) { const boxWidth = 300; const icon = this.image(gon.relative_url_root + commit.author.icon, x, y, 20, 20); const nameText = this.text(x + 25, y + 10, commit.author.name); - const idText = this.text(x, y + 35, commit.id); - const messageText = this.text(x, y + 50, commit.message.replace(/\r?\n/g, ' \n ')); - const textSet = this.set(icon, nameText, idText, messageText).attr({ + const dateText = this.text(x, y + 35, formatDate(commit.date)); + const idText = this.text(x, y + 55, commit.id); + const messageText = this.text(x, y + 70, commit.message.replace(/\r?\n/g, ' \n ')); + const textSet = this.set(icon, nameText, dateText, idText, messageText).attr({ 'text-anchor': 'start', font: '12px Monaco, monospace', }); @@ -14,6 +16,9 @@ Raphael.prototype.commitTooltip = function commitTooltip(x, y, commit) { font: '14px Arial', 'font-weight': 'bold', }); + dateText.attr({ + fill: '#666', + }); idText.attr({ fill: '#AAA', }); |