mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 00:42:49 +08:00
Client tree: flags on the far right, work in Chromium on Windows, zzz for away
- Country flag is the rightmost icon, after the group icons. - Flags render through the Twemoji Country Flags font (CC-BY 4.0), since Chromium on Windows has no flag emoji and shows the two letters. unicode-range keeps it to flag characters and loads it only on demand. - Away is the 💤 again, still in place of the talk dot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
1 parent
5e76bd3bdf
commit
810d922b09
4 files changed
+29
-6
No files matched your search
@@ -397,6 +397,8 @@ The UI texts live in flat JSON files in [`web/src/locales/`](web/src/locales/),
|
||||
|
||||
The vast majority of this project's code was written by [Claude Code](https://claude.com/claude-code) (Anthropic's Claude), working iteratively with the repo owner one feature at a time.
|
||||
|
||||
Country flags use the [Twemoji Country Flags](https://github.com/talkjs/country-flag-emoji-polyfill) font, artwork from [Twemoji](https://github.com/twitter/twemoji) under [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/).
|
||||
|
||||
## 🌈 In Memory of Akimo
|
||||
|
||||
<!-- Permanent: never remove this section. -->
|
||||
|
||||
@@ -2322,6 +2322,25 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Flags from the Twemoji Country Flags font (CC-BY 4.0), because Chromium on
|
||||
Windows has no flag emoji and shows the two letters instead. unicode-range
|
||||
keeps the font to flag characters and loads it only when one is shown. */
|
||||
@font-face {
|
||||
font-family: "Twemoji Country Flags";
|
||||
src: url("./assets/fonts/TwemojiCountryFlags.woff2") format("woff2");
|
||||
unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
.ts-flag {
|
||||
font-family: "Twemoji Country Flags", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
|
||||
}
|
||||
|
||||
.ts-talk-lamp-away {
|
||||
font-size: 11px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.ts-client-icons {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
||||
+8
-6
@@ -1350,10 +1350,10 @@ function TalkLamp({
|
||||
);
|
||||
|
||||
if (away) {
|
||||
return icon(
|
||||
t("tree.away"),
|
||||
"away",
|
||||
<path d="M8.6 1.6a5.4 5.4 0 1 0 3.8 9.2A4.4 4.4 0 0 1 8.6 1.6Z" fill="#8fa6c4" stroke="#5f7694" strokeWidth="0.6" />
|
||||
return (
|
||||
<span className="ts-talk-lamp ts-talk-lamp-muted ts-talk-lamp-away" title={t("tree.away")} aria-hidden="true" data-pack-icon="away">
|
||||
💤
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1797,7 +1797,6 @@ function ChannelTree({
|
||||
className="ts-client-avatar"
|
||||
isSelf={c.id === ownClientId}
|
||||
/>
|
||||
{tree.flags && countryFlag(c.country) && <span title={c.country}>{countryFlag(c.country)}</span>}
|
||||
<span className="ts-tree-label">{c.name}</span>
|
||||
{tree.awayMessage && c.away && c.awayMessage && (
|
||||
<span className="ts-client-away-message">({c.awayMessage})</span>
|
||||
@@ -1806,6 +1805,9 @@ function ChannelTree({
|
||||
{clientGroupBadges(c).map((g) => (
|
||||
<GroupIcon key={g.id} group={g} images={groupIconImages} />
|
||||
))}
|
||||
{tree.flags && countryFlag(c.country) && (
|
||||
<span className="ts-flag" title={c.country}>{countryFlag(c.country)}</span>
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
@@ -2014,7 +2016,7 @@ function InfoPanel({
|
||||
<div className="ts-info-row">
|
||||
<span>{t("info.country")}</span>{" "}
|
||||
<span>
|
||||
{countryFlag(client.country) ? `${countryFlag(client.country)} ` : ""}
|
||||
{countryFlag(client.country) && <span className="ts-flag">{countryFlag(client.country)} </span>}
|
||||
{client.country}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user