revert: remove mini logos from vendor chips
This commit is contained in:
+1
-18
@@ -270,30 +270,13 @@
|
|||||||
.chip {
|
.chip {
|
||||||
border: 1px solid #ccdbf7;
|
border: 1px solid #ccdbf7;
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
padding: 6px 12px 6px 6px;
|
padding: 8px 12px;
|
||||||
background: #f7faff;
|
background: #f7faff;
|
||||||
color: #22427a;
|
color: #22427a;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
transition: .18s ease;
|
transition: .18s ease;
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 7px;
|
|
||||||
}
|
|
||||||
.chip-logo {
|
|
||||||
width: 22px;
|
|
||||||
height: 22px;
|
|
||||||
object-fit: contain;
|
|
||||||
border-radius: 4px;
|
|
||||||
background: #fff;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
.chip.active .chip-logo {
|
|
||||||
filter: brightness(0) invert(1) opacity(.9);
|
|
||||||
}
|
|
||||||
.chip.dim .chip-logo {
|
|
||||||
opacity: .45;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.chip:hover {
|
.chip:hover {
|
||||||
|
|||||||
+1
-9
@@ -205,15 +205,7 @@
|
|||||||
node.className = "chip";
|
node.className = "chip";
|
||||||
if (state.selectedVendors.has(vendor.id)) node.classList.add("active");
|
if (state.selectedVendors.has(vendor.id)) node.classList.add("active");
|
||||||
else if (!allowedVendors.has(vendor.id)) node.classList.add("dim");
|
else if (!allowedVendors.has(vendor.id)) node.classList.add("dim");
|
||||||
if (vendor.logo) {
|
node.textContent = vendor.name;
|
||||||
const img = document.createElement('img');
|
|
||||||
img.src = `/static/${vendor.logo}`;
|
|
||||||
img.alt = '';
|
|
||||||
img.className = 'chip-logo';
|
|
||||||
img.onerror = () => img.remove();
|
|
||||||
node.appendChild(img);
|
|
||||||
}
|
|
||||||
node.appendChild(document.createTextNode(vendor.name));
|
|
||||||
node.addEventListener("click", () => {
|
node.addEventListener("click", () => {
|
||||||
const wasSelected = state.selectedVendors.has(vendor.id);
|
const wasSelected = state.selectedVendors.has(vendor.id);
|
||||||
state.selectedVendors.clear();
|
state.selectedVendors.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user