From ad6ae0be930113a0c35af819458c31e2b9484488 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Mon, 6 May 2024 14:29:41 +0800 Subject: [PATCH 01/11] accomodate for light mode changes --- styles/colors/defaults.results.css | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/styles/colors/defaults.results.css b/styles/colors/defaults.results.css index 75352a7..259c6ce 100644 --- a/styles/colors/defaults.results.css +++ b/styles/colors/defaults.results.css @@ -1,13 +1,21 @@ :root { --color-results_bad_dark: #AF3119; --color-results_bad_light: #EC6342; - --color-results_bad_gradient: linear-gradient(43deg, var(--color-results_bad_dark) 0%, var(--color-results_bad_light) 100%); + --color-results_bad_gradient: linear-gradient(43deg, var(--color-results_bad_dark) 100%, var(--color-results_bad_light) 0%); - --color-results_ok_dark: #E8A87C; - --color-results_ok_light: #F6C7A1; - --color-results_ok_gradient: linear-gradient(43deg, var(--color-results_ok_dark) 0%, var(--color-results_ok_light) 100%); + --color-results_ok_dark: rgba(221, 106, 59); + --color-results_ok_light: rgba(255, 134, 57); + --color-results_ok_gradient: linear-gradient(43deg, var(--color-results_ok_dark) 100%, var(--color-results_ok_light) 0%); --color-results_good_dark: #487858; --color-results_good_light: #5BBF4B; - --color-results_good_gradient: linear-gradient(43deg, var(--color-results_good_dark) 0%, var(--color-results_good_light) 100%); + --color-results_good_gradient: linear-gradient(43deg, var(--color-results_good_dark) 100%, var(--color-results_good_light) 0%); +} + +@media (prefers-color-scheme: dark) { + :root { + --color-results_bad_gradient: linear-gradient(43deg, var(--color-results_bad_dark) 0%, var(--color-results_bad_light) 100%); + --color-results_ok_gradient: linear-gradient(43deg, var(--color-results_ok_dark) 0%, var(--color-results_ok_light) 100%); + --color-results_good_gradient: linear-gradient(43deg, var(--color-results_good_dark) 0%, var(--color-results_good_light) 100%); + } } \ No newline at end of file From ee8cc4d0a275c1bfa212aeb4d4d384aa47fa87d2 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Mon, 6 May 2024 14:37:35 +0800 Subject: [PATCH 02/11] set light mode colors --- styles/colors/defaults.css | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/styles/colors/defaults.css b/styles/colors/defaults.css index 9f2a884..4e93e85 100644 --- a/styles/colors/defaults.css +++ b/styles/colors/defaults.css @@ -1,5 +1,5 @@ :root { - --surface-color: rgba(252, 162, 133) !important; + --surface-color: rgba(255, 134, 57, .1) !important; --font-color-main: rgba(0, 0, 0) !important; --font-color-medium: rgba(25, 25, 25) !important; @@ -12,14 +12,39 @@ --primary-color-numeric: 255, 134, 57 !important; --primary-color-raised-hover-solid: rgba(252, 162, 133) !important; --primary-color-raised-focus-solid: rgba(221, 106, 59) !important; + --primary-color-gradient: linear-gradient( + 43deg, + var(--primary-color-dark) 0%, + var(--primary-color) 62%, + var(--primary-color-raised-hover-solid) 100% + ) !important; + --background-color-disabled: rgba(125, 125, 125) !important; + --background-color-level-4dp: rgba(229, 229, 229) !important; --background-color-level-16dp-solid: rgba(255, 238, 235) !important; + --background-color-card: rgba(242, 242, 242) !important; + --background-color-slight-emphasis: rgba(252, 162, 133) !important; + --secondary-color: rgba(221, 106, 59, 1) !important; --secondary-color-hover-solid: rgba(252, 162, 133) !important; --secondary-color-focus-solid: rgba(221, 106, 59) !important; --secondary-container-color: rgba(252, 162, 133) !important; + --secondary-color-lighter: rgba(221, 106, 59) !important; + --secondary-color: rgba(190, 80, 1) !important; + --secondary-color-dark: rgba(159, 55, 0) !important; + --secondary-color-hover-solid: rgba(252, 162, 133) !important; + --secondary-color-focus-solid: rgba(159, 55, 0) !important; + --font-on-secondary-container-color: rgba(255, 255, 255) !important; + + --hover-color: rgba(255, 255, 255, 0.3) !important; + --focus-color: rgba(255, 255, 255, 0.3) !important; + --focus-color-solid: rgb(76.5, 76.5, 76.5) !important; + --active-color: rgba(255, 255, 255, 0.3) !important; + + --separator-color: rgba(178,178,178) !important; + --error-color: #cf6679 !important; } @media (prefers-color-scheme: dark) { From b7bbbeb48674d16538c89c1ea97dc028236d3d7a Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Tue, 7 May 2024 09:28:35 +0800 Subject: [PATCH 03/11] collect text and icon elements --- scripts/GUI/builder/windowman.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/scripts/GUI/builder/windowman.js b/scripts/GUI/builder/windowman.js index 5027f5c..8d40138 100644 --- a/scripts/GUI/builder/windowman.js +++ b/scripts/GUI/builder/windowman.js @@ -86,9 +86,9 @@ export default class windowman { } function icons() { - let target_elements = document.querySelectorAll(`[data-icon]`); - - target_elements.forEach((element) => { + let TARGET_ELEMENTS = document.querySelectorAll(`[data-icon]`); + + (TARGET_ELEMENTS).forEach((element) => { // Get the content before removing it. let element_data = {}; @@ -122,6 +122,8 @@ export default class windowman { iconify(); clean(); }); + + return TARGET_ELEMENTS; } function text() { @@ -151,9 +153,8 @@ export default class windowman { } }); - delete text_elements[`content`]; Object.keys(text_elements).forEach((key) => { - if (text_elements[key]) { + if (text_elements[key] && !key.includes(`content`)) { text_elements[key].forEach((text_element) => { let text_inserted = texts.localized( text_element.getAttribute(key.concat(`-for`)), @@ -175,11 +176,16 @@ export default class windowman { }); } }); - } + return text_elements; + }; + + let ELEMENTS = {}; elements(); - text(); - icons(); + ELEMENTS[`text`] = text(); + ELEMENTS[`icons`] = icons(); + + return (ELEMENTS); } // Adds events to the window. From 569030df1a6755c4a8269e793010ed127fd9c04d Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Tue, 7 May 2024 09:39:46 +0800 Subject: [PATCH 04/11] add placeholder for details in the error page --- pages/popup/error.htm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/popup/error.htm b/pages/popup/error.htm index fc8feef..9720d90 100644 --- a/pages/popup/error.htm +++ b/pages/popup/error.htm @@ -5,8 +5,10 @@
-