Skip to content

Commit

Permalink
Restore colors (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante authored Mar 31, 2021
1 parent b4dd206 commit 1661135
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/github-issue-link-status.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ const __DEV__ = false;
const endpoint = location.hostname === 'github.com' ? 'https://api.github.com/graphql' : `${location.origin}/api/graphql`;
const issueUrlRegex = /^[/]([^/]+[/][^/]+)[/](issues|pull)[/](\d+)([/]|$)/;
const stateColorMap = {
open: 'text-green',
closed: 'text-red',
merged: 'text-purple'
open: ['text-green', 'color-text-success'],
closed: ['text-red', 'color-text-danger'],
merged: ['text-purple', 'color-purple-5']
};

const stateDependentIcons = [
Expand Down Expand Up @@ -122,9 +122,9 @@ async function apply() {
const type = item.__typename.toLowerCase();
const state = item.state.toLowerCase();

link.classList.add(stateColorMap[state]);
link.classList.add(...stateColorMap[state]);
if (item.isDraft) {
link.querySelector('svg').classList.add('text-gray');
link.querySelector('svg').classList.add('text-gray', 'color-text-secondary');
}

if (stateDependentIcons.includes(state + type)) {
Expand Down

0 comments on commit 1661135

Please sign in to comment.