mirror of https://github.com/Nevysha/Cozy-Nest.git
fix accent generate btn
parent
68660059cc
commit
774df88420
File diff suppressed because one or more lines are too long
|
|
@ -508,7 +508,7 @@ input[type=range]::-webkit-slider-thumb {
|
|||
border-radius: 0;
|
||||
overflow-y: auto;
|
||||
height: var(--main-container-height);
|
||||
padding: 0 10px;
|
||||
padding: 0 10px !important;
|
||||
}
|
||||
#tabs > .nevysha.tabitem::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
|
|
@ -1985,4 +1985,9 @@ button#interrogate {
|
|||
|
||||
#script_list {
|
||||
padding: 5px !important;
|
||||
}
|
||||
|
||||
.nevysha.generate-button.accent {
|
||||
background: var(--ae-primary-color) !important;
|
||||
color: var(--nevysha-color-from-luminance) !important;
|
||||
}
|
||||
|
|
@ -82,13 +82,9 @@ export const applyAccentForGenerate = (checked, hexColorForAccent) => {
|
|||
COZY_NEST_CONFIG.accent_generate_button = checked;
|
||||
document.querySelectorAll('button[id$="_generate"]').forEach((btn) => {
|
||||
if (checked) {
|
||||
let txtColorAppending = "";
|
||||
if (getLuminance(hexColorForAccent) > 0.5) {
|
||||
txtColorAppending = "color: black !important";
|
||||
}
|
||||
btn.setAttribute("style", `background: var(--ae-primary-color) !important; ${txtColorAppending}`);
|
||||
btn.classList.add("accent")
|
||||
} else {
|
||||
btn.setAttribute("style", '');
|
||||
btn.classList.remove("accent")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue