From 806c9ba8a03172c064fe176473fbbb4e73db52f6 Mon Sep 17 00:00:00 2001 From: Zichao Lin Date: Tue, 7 Jul 2026 13:34:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(ui):=20show=20country=20code=20alongside=20?= =?UTF-8?q?flag=20emoji=20in=20from=E2=86=92to=20display?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/templates/index.html | 8 ++++---- app/templates/showcase.html | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/templates/index.html b/app/templates/index.html index 7a5a8fd..c9ff6f0 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -37,8 +37,8 @@
- {% if pc.country_from and pc.country %}{{ pc.country_from|flag }}→{{ pc.country|flag }} - {% elif pc.country %}{{ pc.country|flag }} + {% if pc.country_from and pc.country %}{{ pc.country_from|flag }} {{ pc.country_from }} → {{ pc.country|flag }} {{ pc.country }} + {% elif pc.country %}{{ pc.country|flag }} {{ pc.country }} {% endif %}
@@ -78,8 +78,8 @@ function _appendCard(c) { div.setAttribute('data-front', c.image_front); div.onclick = function() { openLightbox(div); }; var countryHtml = ''; - if (c.country_from && c.country) countryHtml = '' + _flag(c.country_from) + '→' + _flag(c.country) + ''; - else if (c.country) countryHtml = '' + _flag(c.country) + ''; + if (c.country_from && c.country) countryHtml = '' + _flag(c.country_from) + ' ' + c.country_from + ' → ' + _flag(c.country) + ' ' + c.country + ''; + else if (c.country) countryHtml = '' + _flag(c.country) + ' ' + c.country + ''; div.innerHTML = '' + '
' + countryHtml + '
'; grid.appendChild(div); diff --git a/app/templates/showcase.html b/app/templates/showcase.html index cff6b77..f7f88b9 100644 --- a/app/templates/showcase.html +++ b/app/templates/showcase.html @@ -49,7 +49,7 @@
- {% if pc.country_from and pc.country %}{{ pc.country_from|flag }}→{{ pc.country|flag }} + {% if pc.country_from and pc.country %}{{ pc.country_from|flag }} {{ pc.country_from }} → {{ pc.country|flag }} {{ pc.country }} {% elif pc.country %}{{ pc.country|flag }} {% endif %} {% if pc.send_time %}{{ pc.send_time.strftime('%Y-%m-%d') }}{% endif %} @@ -74,7 +74,7 @@
- {% if pc.country_from and pc.country %}{{ pc.country_from|flag }}→{{ pc.country|flag }} + {% if pc.country_from and pc.country %}{{ pc.country_from|flag }} {{ pc.country_from }} → {{ pc.country|flag }} {{ pc.country }} {% elif pc.country %}{{ pc.country|flag }} {% endif %} {% if pc.send_time %}{{ pc.send_time.strftime('%Y-%m-%d') }}{% endif %} @@ -98,7 +98,7 @@
- {% if pc.country_from and pc.country %}{{ pc.country_from|flag }}→{{ pc.country|flag }} + {% if pc.country_from and pc.country %}{{ pc.country_from|flag }} {{ pc.country_from }} → {{ pc.country|flag }} {{ pc.country }} {% elif pc.country %}{{ pc.country|flag }} {% endif %} {% if pc.receive_time %}{{ pc.receive_time.strftime('%Y-%m-%d') }}{% endif %} @@ -123,7 +123,7 @@
- {% if pc.country_from and pc.country %}{{ pc.country_from|flag }}→{{ pc.country|flag }} + {% if pc.country_from and pc.country %}{{ pc.country_from|flag }} {{ pc.country_from }} → {{ pc.country|flag }} {{ pc.country }} {% elif pc.country %}{{ pc.country|flag }} {% endif %} {% if pc.receive_time %}{{ pc.receive_time.strftime('%Y-%m-%d') }}{% endif %} @@ -169,7 +169,7 @@ function _appendCard(c, gridId) { div.setAttribute('data-front', c.image_front); div.onclick = function() { openLightbox(div); }; var countryHtml = ''; - if (c.country_from && c.country) countryHtml = '' + _flag(c.country_from) + '→' + _flag(c.country) + ''; + if (c.country_from && c.country) countryHtml = '' + _flag(c.country_from) + ' ' + c.country_from + ' → ' + _flag(c.country) + ' ' + c.country + ''; else if (c.country) countryHtml = '' + _flag(c.country) + ''; div.innerHTML = '' + '
' + countryHtml + '
';