Commit a6bc663f authored by Ivanq's avatar Ivanq

Show status as colored circle

parent 2b0defd8
......@@ -36,10 +36,21 @@
}
.issue-icon {
height: auto;
display: inline-block;
width: 16px;
height: 16px;
margin-right: 8px;
vertical-align: top;
vertical-align: middle;
border-radius: 50%;
}
.issue-status-open {
background-color: #2B3;
}
.issue-status-closed {
background-color: #B23;
}
.issue-status-reopened {
background-color: #B2E;
}
......
......@@ -32,9 +32,8 @@ repo.addMerger()
title.textContent = issue.title;
tr.appendChild(title);
let icon = document.createElement("img");
icon.src = "../../img/issue-" + (issue.open ? (issue.reopened ? "reopened" : "open") : "closed") + ".svg";
icon.className = "issue-icon";
let icon = document.createElement("div");
icon.className = "issue-icon issue-status-" + (issue.open ? (issue.reopened ? "reopened" : "open") : "closed");
title.insertBefore(icon, title.firstChild);
let tags = document.createElement("div");
......
......@@ -36,10 +36,18 @@
}
.pull-request-icon {
height: auto;
display: inline-block;
width: 16px;
height: 16px;
margin-right: 8px;
vertical-align: top;
vertical-align: middle;
border-radius: 50%;
}
.pull-request-status-opened {
background-color: #2B3;
}
.pull-request-status-merged {
background-color: #B2E;
}
......
......@@ -32,9 +32,8 @@ repo.addMerger()
title.textContent = pullRequest.title;
tr.appendChild(title);
let icon = document.createElement("img");
icon.src = "../../img/pr-" + (pullRequest.merged ? "merged" : "opened") + ".svg";
icon.className = "pull-request-icon";
let icon = document.createElement("div");
icon.className = "pull-request-icon pull-request-status-" + (pullRequest.merged ? "merged" : "opened");
title.insertBefore(icon, title.firstChild);
let tags = document.createElement("div");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment