Skip to content

Commit

Permalink
TE-697 - styled link in YouTrack
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyMul committed Jan 14, 2021
1 parent 0eed96c commit f48ca93
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/css/timer-link.less
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@
}

.devart-timer-link-youtrack {
font-size: 13px;
color: inherit;
margin-right: 30px !important;
}

.devart-timer-link-zendesk {
Expand Down
6 changes: 6 additions & 0 deletions src/in-page-scripts/integrations/youTrack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
$$('.yt-agile-card__summary', issueElement);

if (host) {
linkElement.classList.add('devart-timer-link-youtrack');
host.appendChild(linkElement);
const previousElementSibling = linkElement.previousElementSibling as HTMLElement;
if (previousElementSibling && previousElementSibling.classList.contains('yt-issue-view__meta-information-updated-created')) {
previousElementSibling.style.marginRight = '10px';
}
}
}

Expand Down Expand Up @@ -68,6 +73,7 @@ class YouTrackLite implements WebToolIntegration {
render(issueElement: HTMLElement, linkElement: HTMLElement) {
const host = $$('[class^=toolbar__]', issueElement);
if (host) {
linkElement.classList.add('devart-timer-link-youtrack');
host.insertBefore(linkElement, $$('[class^=visibilityPicker__]', host));
}
}
Expand Down

0 comments on commit f48ca93

Please sign in to comment.