-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebUI: Show country/region name next to its flag when 'Resolve peer countries' is enabled #21278
WebUI: Show country/region name next to its flag when 'Resolve peer countries' is enabled #21278
Conversation
…ountries' is enabled
"title": country | ||
})); | ||
} | ||
span.style.backgroundImage = `url('images/flags/${!country_code ? "xx" : country_code}.svg')`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using "xx" seems suspicious. I suppose you should either set backgroundImage= "none";
or remove the property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably could have been named better but xx.svg is actual icon that can be used to represent unknown country: https://github.com/qbittorrent/qBittorrent/blob/master/src/icons/flags/xx.svg
I thought it's better to use it than just display nothing at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I wasn't familiar with xx
. https://flagicons.lipis.dev/ shows it as 'Unknown'. We're good here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose we can add a comment about xx
represents 'Unknown'.
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
I hope it gets accepted #3408 (comment) |
@thalieht @skomerko |
I'm OK unless you're going to add a separate column for it. |
I probably didn't say it right. I meant i hope this PR gets accepted because the maintainer rejected the idea in the past. |
Having an extra/separate column got rejected, showing "name" like this PR in GUI would be most welcome/acceptable as it's done in same/pre-existing column. |
The current list of peers in the GUI only shows the country flag, the country name is only shown in the tooltip, wouldn't it be better to make this behavior the same? |
Yes. That is what I meant. GUI and webui are now considered separate entities so it is not required to be done in the same PR IMO. |
👍 |
I agree. It would be nice to keep the same behavior for GUI and WebUI, maybe even separate the peer country flag and country name. That would also close the feature request for this. (could be done in a different PR) |
@skomerko |
Example: