diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 7a61c24..64f2f0b 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -115,5 +115,8 @@ }, "i18nViolations": { "message": "All Violations" + }, + "i18nCurrentViolations": { + "message": "View Violations" } } diff --git a/src/css/popup.css b/src/css/popup.css index e538d78..8f3b1ef 100644 --- a/src/css/popup.css +++ b/src/css/popup.css @@ -53,11 +53,11 @@ state-element { box-sizing: border-box; border-radius: 4px; cursor: pointer; - height: 36px; + min-height: 36px; font-family: SF Pro Text; font-style: normal; font-weight: 500; - font-size: 15px; + font-size: 13px; line-height: 20px; text-align: center; letter-spacing: -0.23px; @@ -68,7 +68,7 @@ state-element { color: #ffffff; } -.secondary_button { +.secondary_button, .tertiary_button { background: #ffffff; color: #1c2b33; } diff --git a/src/html/popup.html b/src/html/popup.html index 47eb00f..b190118 100644 --- a/src/html/popup.html +++ b/src/html/popup.html @@ -39,7 +39,9 @@ secondary-button-id="i18nAnomalyLearnMoreButton" secondary-button-action="learn_more" primary-button-id="i18nDownloadPrompt" - primary-button-action="download"> + primary-button-action="download" + tertiary-button-id="i18nCurrentViolations" + tertiary-button-action="violations_list"> ` + : ''; const secondaryButton = secondaryButtonId ? `` : ''; - const primaryButton = primaryButtonId + const tertiaryButton = tertiaryButtonId ? `` : ''; const actionBar = primaryButton || secondaryButton ? `
${secondaryButton} + ${tertiaryButton} ${primaryButton}
` : ''; @@ -255,6 +266,10 @@ class StateElement extends HTMLElement { const button = document.getElementById(secondaryButtonId); handleButtonAction(button!, secondaryButtonAction, innerId); } + if (tertiaryButtonAction != null && tertiaryButtonId != null) { + const button = document.getElementById(tertiaryButtonId); + handleButtonAction(button!, tertiaryButtonAction, innerId); + } } } @@ -276,6 +291,8 @@ const handleButtonAction = ( }); } else if (action === 'download') { sendMessageToActiveTab('downloadSource'); + } else if (action === 'violations_list') { + updateDisplay('violation_list'); } }); };