Restore country flag in chat header

This commit is contained in:
rajchales-monito
2026-07-24 13:21:27 +02:00
parent 45169e8113
commit ae088821e3
3 changed files with 10 additions and 2 deletions
+3 -2
View File
@@ -431,7 +431,7 @@ function renderActive() {
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 17.5V20h2.5L17.8 8.7l-2.5-2.5L4 17.5Zm15.7-11.1a1 1 0 0 0 0-1.4L18.3 3.6a1 1 0 0 0-1.4 0l-1 1 2.5 2.5 1.3-.7Z"></path></svg>
</button>
${presenceDot(conversation.visitorPresence)}
<span title="Zeme">${visitorCountry(conversation)}</span>
<span class="country-pill" title="Zeme">${visitorCountry(conversation)}</span>
<span title="Doba na webu">${formatDuration(conversation.sessionSeconds)}</span>
<span title="Navstivene stranky">${Number(conversation.pageCount || 0)} str.</span>
<span title="Pocet chatu">${Number(conversation.visitorConversationCount || 1)}x chat</span>
@@ -507,7 +507,8 @@ function statusButtons(item) {
function visitorCountry(item) {
const countryCode = item.countryCode || countryFromLanguage(item.language) || countryFromTimezone(item.timezone);
return countryCode ? `${flag(countryCode)} ${escapeHtml(countryCode)}` : "zeme ?";
const countryFlag = item.countryFlag || flag(countryCode);
return countryCode ? `${countryFlag} ${escapeHtml(countryCode)}` : "zeme ?";
}
function visitorDetails(conversation) {