From db7e490bbbc5c4465ba6376991fe6e7e006fc3d0 Mon Sep 17 00:00:00 2001 From: Federico Date: Tue, 30 Mar 2021 22:56:51 -0400 Subject: [PATCH] Update classes --- source/github-issue-link-status.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/github-issue-link-status.js b/source/github-issue-link-status.js index 7db1eb7..2560cd3 100644 --- a/source/github-issue-link-status.js +++ b/source/github-issue-link-status.js @@ -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 = [ @@ -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)) {