fix: show seller country on third line

This commit is contained in:
ZuoZuo 2026-05-02 12:35:44 +08:00
parent 7f28fdbe46
commit 911cdac101

View File

@ -158,6 +158,9 @@
.agency-main {
min-width: 0;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
}
.agency-name {
@ -184,6 +187,35 @@
text-overflow: ellipsis;
}
.agency-country {
margin-top: 4px;
display: flex;
align-items: center;
gap: 5px;
color: rgba(255, 238, 195, 0.78);
font-size: 10px;
line-height: 1.15;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.agency-country-flag {
width: 13px;
height: 13px;
flex: 0 0 13px;
border-radius: 50%;
border: 1px solid rgba(255, 238, 195, 0.62);
object-fit: cover;
background: rgba(46, 18, 0, 0.6);
}
.agency-country-name {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
.agency-flags {
display: flex;
align-items: center;
@ -591,14 +623,26 @@
const meta = document.createElement("div");
meta.className = "agency-meta";
const place = [item.countryName, item.regionCode].filter(Boolean).join(" / ");
const count = compactNumber(item.transactionCount);
const metaParts = [];
if (place) metaParts.push(place);
if (item.regionCode && item.regionCode !== item.countryName) metaParts.push(item.regionCode);
metaParts.push("ID " + (item.account || item.userId));
if (count) metaParts.push(count + " orders");
meta.textContent = metaParts.join(" · ");
main.appendChild(meta);
if (item.countryName || item.countryFlag) {
const country = document.createElement("div");
country.className = "agency-country";
if (item.countryFlag) {
country.appendChild(createImage("agency-country-flag", item.countryFlag, ""));
}
const countryName = document.createElement("span");
countryName.className = "agency-country-name";
countryName.textContent = item.countryName || "";
country.appendChild(countryName);
main.appendChild(country);
}
row.appendChild(main);
const flags = document.createElement("div");
@ -675,6 +719,7 @@
whatsapp: firstNonBlank(source.whatsapp, source.whatsApp, source.contactInfo, source.contact, source.phone),
nationalFlag: normalizeFlagList(source.nationalFlag || source.nationalFlags),
ownNationalFlag: firstNonBlank(source.ownNationalFlag),
countryFlag: firstNonBlank(source.ownNationalFlag, source.countryFlag, normalizeFlagList(source.nationalFlag || source.nationalFlags)[0]),
transactionCount: source.transactionCount
};
}