diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /app/assets/javascripts/network | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
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', }); |