-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#82: update PR widget with labels and reviews
- Loading branch information
Showing
2 changed files
with
29 additions
and
7 deletions.
There are no files selected for viewing
18 changes: 13 additions & 5 deletions
18
webapp/src/app/ui/pull-request-widget/pull-request-widget.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,21 @@ | ||
<div class="border border-gray-300 rounded-lg p-4 bg-white w-72"> | ||
<!-- Header --> | ||
<div class="border border-gray-300 rounded-lg p-4 w-72"> | ||
<div class="flex justify-between items-center mb-2 text-xs text-gray-500"> | ||
<span class="font-bold">{{ pullRequest().repository.name }} #{{ pullRequest().id }} on {{ pullRequest().createdAt }}</span> | ||
<span class="font-bold">{{ pullRequest().repository.name }} #{{ pullRequest().number }} on {{ pullRequest().createdAt }}</span> | ||
<span class="flex items-center space-x-2"> | ||
<span class="text-green-600 font-bold">+{{ pullRequest().additions }}</span> | ||
<span class="text-red-600 font-bold">-{{ pullRequest().deletions }}</span> | ||
</span> | ||
</div> | ||
|
||
<!-- Title --> | ||
<div class="font-bold text-sm mb-3">{{ pullRequest().title }}</div> | ||
<div class="flex justify-between font-bold text-sm mb-3"> | ||
{{ pullRequest().title }} | ||
@if (pullRequest().reviews) { | ||
<span class="text-xs text-gray-500">({{ pullRequest().reviews.size }} reviews)</span> | ||
} | ||
</div> | ||
<div class="flex gap-1 flex-wrap"> | ||
@for (label of pullRequest().pullRequestLabels; track label.name) { | ||
<span class="px-2 py-1 rounded-full text-xs text-white mr-2" [style.background-color]="label.color">{{ label.name }}</span> | ||
} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters