mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-03 01:42:50 +08:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b836d5830 | ||
|
|
d36b94a496 |
No files matched your search
@@ -82,7 +82,7 @@ not need to be installed on the same machine, modified, or operated by you.
|
|||||||
| 🌗 **Dark / light theme** | Clean, modern UI that adapts to your preference |
|
| 🌗 **Dark / light theme** | Clean, modern UI that adapts to your preference |
|
||||||
| 🔁 **Multi-join (server tabs)** | Several connections in parallel — one tab per server, like GreenTeaSpeak 2. Audio stays on the active tab |
|
| 🔁 **Multi-join (server tabs)** | Several connections in parallel — one tab per server, like GreenTeaSpeak 2. Audio stays on the active tab |
|
||||||
| 🔁 **Seamless reconnect** | Switch or add connections mid-session without tearing down unrelated tabs; dropped connections come back on their own, with the channel tree intact |
|
| 🔁 **Seamless reconnect** | Switch or add connections mid-session without tearing down unrelated tabs; dropped connections come back on their own, with the channel tree intact |
|
||||||
| ⌨️ **Keyboard basics** | Tab through the tree (Enter joins, context-menu key opens the menu), focus-trapped dialogs, labelled toolbar buttons |
|
| ⌨️ **Keyboard & screen readers** | Arrow keys through the channel tree (exposed as an ARIA tree) and through menus, Enter joins, context-menu key opens the menu; focus-trapped dialogs, labelled toolbar buttons |
|
||||||
| 🍵 **GreenTeaSpeak support** | Connects to real GreenTeaSpeak servers (not just TS3/TS6/TeaSpeak), plus an optional GTS-styled UI chrome (dark panels, gold menu bar, connection-tab strip) alongside the default look |
|
| 🍵 **GreenTeaSpeak support** | Connects to real GreenTeaSpeak servers (not just TS3/TS6/TeaSpeak), plus an optional GTS-styled UI chrome (dark panels, gold menu bar, connection-tab strip) alongside the default look |
|
||||||
| 🖥️ **Screen streaming to/from TS6** | <sub>**ALPHA · UNSTABLE**</sub> Share your screen to native TeamSpeak 6 clients and watch theirs. Built on TS6's undocumented Stream/Call protocol — expect it to break; see [Roadmap](ROADMAP.md) |
|
| 🖥️ **Screen streaming to/from TS6** | <sub>**ALPHA · UNSTABLE**</sub> Share your screen to native TeamSpeak 6 clients and watch theirs. Built on TS6's undocumented Stream/Call protocol — expect it to break; see [Roadmap](ROADMAP.md) |
|
||||||
|
|
||||||
|
|||||||
+9
-6
@@ -49,14 +49,17 @@ This roadmap is intentionally outcome-focused. It does not promise fixed dates.
|
|||||||
|
|
||||||
Basics are in place: the UI language sets the document's `lang`/`dir`,
|
Basics are in place: the UI language sets the document's `lang`/`dir`,
|
||||||
dialogs take focus on open, keep Tab inside, close on Escape, and hand focus
|
dialogs take focus on open, keep Tab inside, close on Escape, and hand focus
|
||||||
back; toolbar icon buttons are labelled; channel and client rows are
|
back; toolbar icon and menu bar buttons are real, labelled buttons. The
|
||||||
focusable (Enter joins a channel or opens a private chat, Space selects,
|
channel tree is an ARIA tree with one Tab stop: arrow keys walk it (selection
|
||||||
the context-menu key or Shift+F10 opens the menu with focus in it). Still to do:
|
follows focus), Left/Right collapse, expand and jump to parent or child,
|
||||||
|
Enter joins a channel or opens a private chat, and the context-menu key or
|
||||||
|
Shift+F10 opens the menu. Menus take focus on open, move with the arrow keys,
|
||||||
|
and Escape hands focus back to the button that opened them. An axe-core scan
|
||||||
|
of the connected UI is clean in every built-in design except for landmark
|
||||||
|
best practices and GreenTeaSpeak's native selection colours. Still to do:
|
||||||
|
|
||||||
- Replace the remaining clickable `<div>`s with real buttons
|
|
||||||
- Arrow-key navigation through the tree and menus
|
|
||||||
- Do a full screen-reader pass (NVDA/VoiceOver) through a real connect
|
- Do a full screen-reader pass (NVDA/VoiceOver) through a real connect
|
||||||
session to find what else is missing
|
session to find what else is missing (e.g. announcing who is talking)
|
||||||
|
|
||||||
### Deployment experience
|
### Deployment experience
|
||||||
|
|
||||||
|
|||||||
@@ -584,6 +584,10 @@ fn log_book_event(con: &data::Connection, event: &BookEvent) {
|
|||||||
| PropertyId::ServerCodecEncryptionMode
|
| PropertyId::ServerCodecEncryptionMode
|
||||||
| PropertyId::ServerTempChannelDefaultDeleteDelay
|
| PropertyId::ServerTempChannelDefaultDeleteDelay
|
||||||
| PropertyId::ServerPrioritySpeakerDimmModificator,
|
| PropertyId::ServerPrioritySpeakerDimmModificator,
|
||||||
|
// Only notifyserveredited carries an invoker; the 20s
|
||||||
|
// servergetvariables poll answers with notifyserverupdated, which
|
||||||
|
// rewrites every field (changed or not) without one.
|
||||||
|
invoker: Some(_),
|
||||||
..
|
..
|
||||||
} => {
|
} => {
|
||||||
emit_server_log(ServerLogEntry::ServerEdited);
|
emit_server_log(ServerLogEntry::ServerEdited);
|
||||||
|
|||||||
+33
-8
@@ -12,7 +12,7 @@
|
|||||||
--border: #b7bcc3;
|
--border: #b7bcc3;
|
||||||
--border-soft: #d3d7db;
|
--border-soft: #d3d7db;
|
||||||
--text: #1a1a1a;
|
--text: #1a1a1a;
|
||||||
--text-muted: #888;
|
--text-muted: #6b6b6b;
|
||||||
--accent: #2b4a6b;
|
--accent: #2b4a6b;
|
||||||
--input-bg: #ffffff;
|
--input-bg: #ffffff;
|
||||||
--input-text: #1a1a1a;
|
--input-text: #1a1a1a;
|
||||||
@@ -2016,11 +2016,32 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ts-app .ts-row:focus-visible {
|
.ts-app .ts-row:focus-visible,
|
||||||
|
.ts-plain-button:focus-visible {
|
||||||
outline: 2px solid var(--accent);
|
outline: 2px solid var(--accent);
|
||||||
outline-offset: -2px;
|
outline-offset: -2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* A real <button> that looks like the <span>/<li> text it replaced. :where()
|
||||||
|
keeps this at zero specificity, so every theme rule still wins. */
|
||||||
|
:where(.ts-plain-button) {
|
||||||
|
font: inherit;
|
||||||
|
color: inherit;
|
||||||
|
background: none;
|
||||||
|
border: 0;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
cursor: inherit;
|
||||||
|
text-align: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
:where(li > .ts-plain-button) {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
.ts-tree-search {
|
.ts-tree-search {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -2372,6 +2393,8 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
/* without this the panel grows with its lines instead of scrolling them */
|
||||||
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ts-chat-tabs {
|
.ts-chat-tabs {
|
||||||
@@ -3847,6 +3870,8 @@
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* No theme defines --panel-bg, so the update toast and the feedback bubble
|
||||||
|
are always dark: their text colors are fixed, not the theme's. */
|
||||||
.ts-update-toast {
|
.ts-update-toast {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
@@ -3857,7 +3882,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.6rem;
|
gap: 0.6rem;
|
||||||
background: var(--panel-bg, #23262e);
|
background: var(--panel-bg, #23262e);
|
||||||
color: var(--text, #eee);
|
color: #eee;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 0.5rem;
|
border-radius: 0.5rem;
|
||||||
padding: 0.6rem 0.7rem 0.6rem 0.9rem;
|
padding: 0.6rem 0.7rem 0.6rem 0.9rem;
|
||||||
@@ -3877,7 +3902,7 @@
|
|||||||
|
|
||||||
.ts-update-toast-dismiss {
|
.ts-update-toast-dismiss {
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
color: var(--text-muted, #999) !important;
|
color: #aaa !important;
|
||||||
border: none !important;
|
border: none !important;
|
||||||
padding: 0 0.2rem !important;
|
padding: 0 0.2rem !important;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@@ -3935,7 +3960,7 @@
|
|||||||
padding: 0 0.85rem;
|
padding: 0 0.85rem;
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.18);
|
border: 1px solid rgba(255, 255, 255, 0.18);
|
||||||
background: #ff5e5b;
|
background: #d6403d; /* Ko-fi red, darkened to 4.5:1 for the white label */
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@@ -3947,7 +3972,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ts-donate-fab:hover {
|
.ts-donate-fab:hover {
|
||||||
background: #ff4b47;
|
background: #c4362f;
|
||||||
transform: scale(1.06);
|
transform: scale(1.06);
|
||||||
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
|
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
@@ -3961,7 +3986,7 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
max-width: 13rem;
|
max-width: 13rem;
|
||||||
background: var(--panel-bg, #23262e);
|
background: var(--panel-bg, #23262e);
|
||||||
color: var(--text, #eee);
|
color: #eee;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 0.6rem;
|
border-radius: 0.6rem;
|
||||||
padding: 0.5rem 0.7rem;
|
padding: 0.5rem 0.7rem;
|
||||||
@@ -3993,7 +4018,7 @@
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
background: var(--panel-bg, #23262e);
|
background: var(--panel-bg, #23262e);
|
||||||
color: var(--text-muted, #999);
|
color: #aaa;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
+160
-49
@@ -50,6 +50,57 @@ function useBackdropDismiss(onDismiss: () => void) {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Callback ref for a dropdown menu: focus its first item when it opens.
|
||||||
|
* Module-level so React calls it once per mount, not on every render. */
|
||||||
|
function focusFirstItem(el: HTMLElement | null) {
|
||||||
|
el?.querySelector<HTMLElement>(FOCUSABLE)?.focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** onKeyDown for dropdown and context menus: Up/Down/Home/End move between
|
||||||
|
* items, and Escape puts focus back on the button that opened the menu
|
||||||
|
* before the window-level Escape listener closes it. */
|
||||||
|
function handleMenuKeyDown(e: React.KeyboardEvent<HTMLElement>) {
|
||||||
|
if (e.key === "Escape") {
|
||||||
|
e.currentTarget.parentElement?.querySelector<HTMLElement>(":scope > button[aria-expanded]")?.focus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Arrows belong to sliders, text fields and selects (the volume slider).
|
||||||
|
if ((e.target as HTMLElement).matches("input:not([type=checkbox]), select, textarea")) return;
|
||||||
|
const items = [...e.currentTarget.querySelectorAll<HTMLElement>(FOCUSABLE)];
|
||||||
|
const i = items.indexOf(document.activeElement as HTMLElement);
|
||||||
|
const next =
|
||||||
|
e.key === "ArrowDown" ? items[(i + 1) % items.length]
|
||||||
|
: e.key === "ArrowUp" ? items[(i - 1 + items.length) % items.length]
|
||||||
|
: e.key === "Home" ? items[0]
|
||||||
|
: e.key === "End" ? items[items.length - 1]
|
||||||
|
: undefined;
|
||||||
|
if (!next) return;
|
||||||
|
e.preventDefault();
|
||||||
|
next.focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** onKeyDown for the tree panel (server row + channel tree): Up/Down/Home/End
|
||||||
|
* walk the visible rows, Left goes to the parent row and Right into an open
|
||||||
|
* channel. A channel row handles Left/Right itself first when it can
|
||||||
|
* collapse or expand, and marks the event as handled. */
|
||||||
|
function handleTreeKeyDown(e: React.KeyboardEvent<HTMLElement>) {
|
||||||
|
const row = e.target as HTMLElement;
|
||||||
|
if (e.defaultPrevented || !row.classList.contains("ts-row")) return;
|
||||||
|
const rows = [...e.currentTarget.querySelectorAll<HTMLElement>(".ts-row[tabindex]")];
|
||||||
|
const i = rows.indexOf(row);
|
||||||
|
const next =
|
||||||
|
e.key === "ArrowDown" ? rows[i + 1]
|
||||||
|
: e.key === "ArrowUp" ? rows[i - 1]
|
||||||
|
: e.key === "Home" ? rows[0]
|
||||||
|
: e.key === "End" ? rows[rows.length - 1]
|
||||||
|
: e.key === "ArrowLeft" ? (row.closest("ul")?.closest("li")?.querySelector<HTMLElement>(":scope > .ts-row") ?? rows[0])
|
||||||
|
: e.key === "ArrowRight" ? row.closest("li")?.querySelector<HTMLElement>(":scope > ul .ts-row")
|
||||||
|
: undefined;
|
||||||
|
if (next === undefined && !["ArrowDown", "ArrowUp", "ArrowRight"].includes(e.key)) return;
|
||||||
|
e.preventDefault();
|
||||||
|
next?.focus();
|
||||||
|
}
|
||||||
import {
|
import {
|
||||||
AudioPlayer,
|
AudioPlayer,
|
||||||
MicCapture,
|
MicCapture,
|
||||||
@@ -953,6 +1004,7 @@ function ChannelTree({
|
|||||||
selected,
|
selected,
|
||||||
sessionKey,
|
sessionKey,
|
||||||
expandAll,
|
expandAll,
|
||||||
|
level = 1,
|
||||||
onSelectItem,
|
onSelectItem,
|
||||||
onSwitchChannel,
|
onSwitchChannel,
|
||||||
onOpenPrivateChat,
|
onOpenPrivateChat,
|
||||||
@@ -973,6 +1025,8 @@ function ChannelTree({
|
|||||||
sessionKey: string;
|
sessionKey: string;
|
||||||
/** While searching: show every match, ignoring channels the user collapsed. */
|
/** While searching: show every match, ignoring channels the user collapsed. */
|
||||||
expandAll?: boolean;
|
expandAll?: boolean;
|
||||||
|
/** aria-level of this list's channels; their clients sit one deeper. */
|
||||||
|
level?: number;
|
||||||
onSelectItem: (item: SelectedItem) => void;
|
onSelectItem: (item: SelectedItem) => void;
|
||||||
onSwitchChannel: (channelId: number) => void;
|
onSwitchChannel: (channelId: number) => void;
|
||||||
onOpenPrivateChat: (clientId: number, clientName: string) => void;
|
onOpenPrivateChat: (clientId: number, clientName: string) => void;
|
||||||
@@ -1006,25 +1060,38 @@ function ChannelTree({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ul className={`ts-tree-list${parent === 0 ? " ts-tree-list-root" : ""}`}>
|
<ul
|
||||||
{children.map((channel) => {
|
className={`ts-tree-list${parent === 0 ? " ts-tree-list-root" : ""}`}
|
||||||
|
role={parent === 0 ? "tree" : "group"}
|
||||||
|
aria-label={parent === 0 ? t("tree.label") : undefined}
|
||||||
|
>
|
||||||
|
{children.map((channel, index) => {
|
||||||
const isRoot = parent === 0;
|
const isRoot = parent === 0;
|
||||||
const spacer = spacerDisplayName(channel.name, isRoot);
|
const spacer = spacerDisplayName(channel.name, isRoot);
|
||||||
const channelClients = clients.filter((c) => c.channel === channel.id);
|
const channelClients = clients.filter((c) => c.channel === channel.id);
|
||||||
const hasSubChannels = channels.some((c) => c.parent === channel.id);
|
const hasSubChannels = channels.some((c) => c.parent === channel.id);
|
||||||
const hasChildren = channelClients.length > 0 || hasSubChannels;
|
const hasChildren = channelClients.length > 0 || hasSubChannels;
|
||||||
const isCollapsed = !expandAll && collapsed.has(channel.id);
|
const isCollapsed = !expandAll && collapsed.has(channel.id);
|
||||||
|
const isSelected = selected?.type === "channel" && selected.id === channel.id;
|
||||||
|
// One Tab stop for the whole tree (arrow keys move inside it, see
|
||||||
|
// handleTreeKeyDown): the selected row, or the first channel while
|
||||||
|
// nothing in the tree is selected.
|
||||||
|
const isTabStop = isSelected || (parent === 0 && index === 0 && selected?.type !== "channel" && selected?.type !== "client");
|
||||||
const spacerClass = spacer.isSpacer
|
const spacerClass = spacer.isSpacer
|
||||||
? ` ts-spacer ts-spacer-align-${spacer.alignment}${spacer.isLine ? " ts-spacer-line" : ""}${
|
? ` ts-spacer ts-spacer-align-${spacer.alignment}${spacer.isLine ? " ts-spacer-line" : ""}${
|
||||||
spacer.isBoxArt ? " ts-spacer-boxart" : ""
|
spacer.isBoxArt ? " ts-spacer-boxart" : ""
|
||||||
}`
|
}`
|
||||||
: "";
|
: "";
|
||||||
return (
|
return (
|
||||||
<li key={channel.id}>
|
<li key={channel.id} role="none">
|
||||||
<div
|
<div
|
||||||
className={`ts-row ts-channel-row${spacerClass}${
|
className={`ts-row ts-channel-row${spacerClass}${
|
||||||
selected?.type === "channel" && selected.id === channel.id ? " ts-row-selected" : ""
|
isSelected ? " ts-row-selected" : ""
|
||||||
}${dragOverChannelId === channel.id ? " ts-drop-target" : ""}`}
|
}${dragOverChannelId === channel.id ? " ts-drop-target" : ""}`}
|
||||||
|
role="treeitem"
|
||||||
|
aria-level={level}
|
||||||
|
aria-selected={isSelected}
|
||||||
|
aria-expanded={hasChildren ? !isCollapsed : undefined}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onSelectItem({ type: "channel", id: channel.id });
|
onSelectItem({ type: "channel", id: channel.id });
|
||||||
// Manual double-click: native dblclick is often lost when the first
|
// Manual double-click: native dblclick is often lost when the first
|
||||||
@@ -1045,7 +1112,10 @@ function ChannelTree({
|
|||||||
onSwitchChannel(channel.id);
|
onSwitchChannel(channel.id);
|
||||||
}}
|
}}
|
||||||
onContextMenu={(e) => onChannelContextMenu(e, channel.id, channel.name)}
|
onContextMenu={(e) => onChannelContextMenu(e, channel.id, channel.name)}
|
||||||
tabIndex={0}
|
tabIndex={isTabStop ? 0 : -1}
|
||||||
|
onFocus={(e) => {
|
||||||
|
if (e.target === e.currentTarget && !isSelected) onSelectItem({ type: "channel", id: channel.id });
|
||||||
|
}}
|
||||||
onKeyDown={(e) => {
|
onKeyDown={(e) => {
|
||||||
if (e.target !== e.currentTarget) return;
|
if (e.target !== e.currentTarget) return;
|
||||||
if (e.key === "Enter") onSwitchChannel(channel.id);
|
if (e.key === "Enter") onSwitchChannel(channel.id);
|
||||||
@@ -1081,7 +1151,7 @@ function ChannelTree({
|
|||||||
className={`ts-tree-expander${hasChildren ? "" : " ts-tree-expander-empty"}${
|
className={`ts-tree-expander${hasChildren ? "" : " ts-tree-expander-empty"}${
|
||||||
isCollapsed ? " ts-tree-expander-collapsed" : ""
|
isCollapsed ? " ts-tree-expander-collapsed" : ""
|
||||||
}`}
|
}`}
|
||||||
aria-label={isCollapsed ? t("tree.expand") : t("tree.collapse")}
|
aria-hidden="true"
|
||||||
tabIndex={-1}
|
tabIndex={-1}
|
||||||
onMouseDown={(e) => {
|
onMouseDown={(e) => {
|
||||||
// Keep focus on the row so a nearby double-click still joins.
|
// Keep focus on the row so a nearby double-click still joins.
|
||||||
@@ -1112,9 +1182,11 @@ function ChannelTree({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{!isCollapsed && (
|
{!isCollapsed && (
|
||||||
<ul className="ts-tree-list">
|
<ul className="ts-tree-list" role="group">
|
||||||
{channelClients.map((c) => (
|
{channelClients.map((c) => {
|
||||||
<li key={c.id}>
|
const clientSelected = selected?.type === "client" && selected.id === c.id;
|
||||||
|
return (
|
||||||
|
<li key={c.id} role="none">
|
||||||
<div
|
<div
|
||||||
className={`ts-row ts-client-row${c.id === ownClientId ? " ts-self" : ""}${
|
className={`ts-row ts-client-row${c.id === ownClientId ? " ts-self" : ""}${
|
||||||
talkers.has(c.id) &&
|
talkers.has(c.id) &&
|
||||||
@@ -1123,7 +1195,10 @@ function ChannelTree({
|
|||||||
c.inputHardwareEnabled
|
c.inputHardwareEnabled
|
||||||
? " ts-talking"
|
? " ts-talking"
|
||||||
: ""
|
: ""
|
||||||
}${selected?.type === "client" && selected.id === c.id ? " ts-row-selected" : ""}`}
|
}${clientSelected ? " ts-row-selected" : ""}`}
|
||||||
|
role="treeitem"
|
||||||
|
aria-level={level + 1}
|
||||||
|
aria-selected={clientSelected}
|
||||||
draggable
|
draggable
|
||||||
onDragStart={(e) => {
|
onDragStart={(e) => {
|
||||||
const payload: ClientDragPayload = {
|
const payload: ClientDragPayload = {
|
||||||
@@ -1141,7 +1216,10 @@ function ChannelTree({
|
|||||||
c.id === ownClientId ? undefined : () => onOpenPrivateChat(c.id, c.name)
|
c.id === ownClientId ? undefined : () => onOpenPrivateChat(c.id, c.name)
|
||||||
}
|
}
|
||||||
onContextMenu={(e) => onClientContextMenu(e, c.id, c.name, c.id === ownClientId)}
|
onContextMenu={(e) => onClientContextMenu(e, c.id, c.name, c.id === ownClientId)}
|
||||||
tabIndex={0}
|
tabIndex={clientSelected ? 0 : -1}
|
||||||
|
onFocus={(e) => {
|
||||||
|
if (e.target === e.currentTarget && !clientSelected) onSelectItem({ type: "client", id: c.id });
|
||||||
|
}}
|
||||||
onKeyDown={(e) => {
|
onKeyDown={(e) => {
|
||||||
if (e.key === "Enter" && c.id !== ownClientId) onOpenPrivateChat(c.id, c.name);
|
if (e.key === "Enter" && c.id !== ownClientId) onOpenPrivateChat(c.id, c.name);
|
||||||
else if (e.key === " ") onSelectItem({ type: "client", id: c.id });
|
else if (e.key === " ") onSelectItem({ type: "client", id: c.id });
|
||||||
@@ -1211,7 +1289,8 @@ function ChannelTree({
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
))}
|
);
|
||||||
|
})}
|
||||||
</ul>
|
</ul>
|
||||||
)}
|
)}
|
||||||
{!isCollapsed && (
|
{!isCollapsed && (
|
||||||
@@ -1226,6 +1305,7 @@ function ChannelTree({
|
|||||||
selected={selected}
|
selected={selected}
|
||||||
sessionKey={sessionKey}
|
sessionKey={sessionKey}
|
||||||
expandAll={expandAll}
|
expandAll={expandAll}
|
||||||
|
level={level + 1}
|
||||||
onSelectItem={onSelectItem}
|
onSelectItem={onSelectItem}
|
||||||
onSwitchChannel={onSwitchChannel}
|
onSwitchChannel={onSwitchChannel}
|
||||||
onOpenPrivateChat={onOpenPrivateChat}
|
onOpenPrivateChat={onOpenPrivateChat}
|
||||||
@@ -2612,7 +2692,9 @@ function FavoritesDialog({
|
|||||||
className={`ts-favorites-list-item${f.id === selectedId ? " ts-favorites-list-item-selected" : ""}`}
|
className={`ts-favorites-list-item${f.id === selectedId ? " ts-favorites-list-item-selected" : ""}`}
|
||||||
onClick={() => setSelectedId(f.id)}
|
onClick={() => setSelectedId(f.id)}
|
||||||
>
|
>
|
||||||
{f.bookmarkName || t("favorites.unnamed")}
|
<button type="button" className="ts-plain-button" aria-current={f.id === selectedId}>
|
||||||
|
{f.bookmarkName || t("favorites.unnamed")}
|
||||||
|
</button>
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
@@ -4928,9 +5010,11 @@ function ContactsDialog({
|
|||||||
className={`ts-contacts-list-item ts-contacts-category-${c.category}${c.uid === selectedUid ? " ts-contacts-list-item-selected" : ""}`}
|
className={`ts-contacts-list-item ts-contacts-category-${c.category}${c.uid === selectedUid ? " ts-contacts-list-item-selected" : ""}`}
|
||||||
onClick={() => setSelectedUid(c.uid)}
|
onClick={() => setSelectedUid(c.uid)}
|
||||||
>
|
>
|
||||||
{onlineClients.some((cl) => cl.uid === c.uid) && <span className="ts-contacts-online-dot" />}
|
<button type="button" className="ts-plain-button" aria-current={c.uid === selectedUid}>
|
||||||
{displayName(c)}
|
{onlineClients.some((cl) => cl.uid === c.uid) && <span className="ts-contacts-online-dot" />}
|
||||||
{c.ignored && " 🚫"}
|
{displayName(c)}
|
||||||
|
{c.ignored && " 🚫"}
|
||||||
|
</button>
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
{draft.length === 0 && <li className="ts-contacts-list-empty">{t("contacts.empty")}</li>}
|
{draft.length === 0 && <li className="ts-contacts-list-empty">{t("contacts.empty")}</li>}
|
||||||
@@ -9745,6 +9829,7 @@ function AppInner() {
|
|||||||
className="ts-icon-button ts-nova-menu-toggle"
|
className="ts-icon-button ts-nova-menu-toggle"
|
||||||
onClick={() => setNovaMenuOpen((v) => !v)}
|
onClick={() => setNovaMenuOpen((v) => !v)}
|
||||||
aria-label={t("menu.connections")}
|
aria-label={t("menu.connections")}
|
||||||
|
aria-expanded={novaMenuOpen}
|
||||||
>
|
>
|
||||||
☰
|
☰
|
||||||
</button>
|
</button>
|
||||||
@@ -9755,14 +9840,16 @@ function AppInner() {
|
|||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<div className="ts-menubar-dropdown" ref={connectionsMenuRef}>
|
<div className="ts-menubar-dropdown" ref={connectionsMenuRef}>
|
||||||
<span
|
<button
|
||||||
className="ts-menubar-item ts-menubar-item-active"
|
type="button"
|
||||||
|
className="ts-menubar-item ts-menubar-item-active ts-plain-button"
|
||||||
|
aria-expanded={connectionsMenuOpen}
|
||||||
onClick={() => setConnectionsMenuOpen((v) => !v)}
|
onClick={() => setConnectionsMenuOpen((v) => !v)}
|
||||||
>
|
>
|
||||||
{t("menu.connections")}
|
{t("menu.connections")}
|
||||||
</span>
|
</button>
|
||||||
{connectionsMenuOpen && (
|
{connectionsMenuOpen && (
|
||||||
<div className="ts-menu">
|
<div className="ts-menu" ref={focusFirstItem} onKeyDown={handleMenuKeyDown}>
|
||||||
<button
|
<button
|
||||||
className="ts-menu-item"
|
className="ts-menu-item"
|
||||||
disabled={connecting}
|
disabled={connecting}
|
||||||
@@ -9802,14 +9889,16 @@ function AppInner() {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="ts-menubar-dropdown" ref={favoritesMenuRef}>
|
<div className="ts-menubar-dropdown" ref={favoritesMenuRef}>
|
||||||
<span
|
<button
|
||||||
className="ts-menubar-item ts-menubar-item-active"
|
type="button"
|
||||||
|
className="ts-menubar-item ts-menubar-item-active ts-plain-button"
|
||||||
|
aria-expanded={favoritesMenuOpen}
|
||||||
onClick={() => setFavoritesMenuOpen((v) => !v)}
|
onClick={() => setFavoritesMenuOpen((v) => !v)}
|
||||||
>
|
>
|
||||||
{t("menu.favorites")}
|
{t("menu.favorites")}
|
||||||
</span>
|
</button>
|
||||||
{favoritesMenuOpen && (
|
{favoritesMenuOpen && (
|
||||||
<div className="ts-menu">
|
<div className="ts-menu" ref={focusFirstItem} onKeyDown={handleMenuKeyDown}>
|
||||||
<button className="ts-menu-item" onClick={openAddFavorite}>
|
<button className="ts-menu-item" onClick={openAddFavorite}>
|
||||||
<span className="ts-menu-item-icon">⭐</span>
|
<span className="ts-menu-item-icon">⭐</span>
|
||||||
<span className="ts-menu-item-label">{t("menu.favorites.add")}</span>
|
<span className="ts-menu-item-label">{t("menu.favorites.add")}</span>
|
||||||
@@ -9838,14 +9927,16 @@ function AppInner() {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="ts-menubar-dropdown" ref={selfMenuRef}>
|
<div className="ts-menubar-dropdown" ref={selfMenuRef}>
|
||||||
<span
|
<button
|
||||||
className="ts-menubar-item ts-menubar-item-active"
|
type="button"
|
||||||
|
className="ts-menubar-item ts-menubar-item-active ts-plain-button"
|
||||||
|
aria-expanded={selfMenuOpen}
|
||||||
onClick={() => setSelfMenuOpen((v) => !v)}
|
onClick={() => setSelfMenuOpen((v) => !v)}
|
||||||
>
|
>
|
||||||
{t("menu.self")}
|
{t("menu.self")}
|
||||||
</span>
|
</button>
|
||||||
{selfMenuOpen && (
|
{selfMenuOpen && (
|
||||||
<div className="ts-menu">
|
<div className="ts-menu" ref={focusFirstItem} onKeyDown={handleMenuKeyDown}>
|
||||||
<button className="ts-menu-item" disabled title={t("clientContext.notSupported")}>
|
<button className="ts-menu-item" disabled title={t("clientContext.notSupported")}>
|
||||||
<span className="ts-menu-item-icon">🎙️</span>
|
<span className="ts-menu-item-icon">🎙️</span>
|
||||||
<span className="ts-menu-item-label">{t("menu.self.recordingProfile")}</span>
|
<span className="ts-menu-item-label">{t("menu.self.recordingProfile")}</span>
|
||||||
@@ -9942,14 +10033,16 @@ function AppInner() {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="ts-menubar-dropdown" ref={rightsMenuRef}>
|
<div className="ts-menubar-dropdown" ref={rightsMenuRef}>
|
||||||
<span
|
<button
|
||||||
className="ts-menubar-item ts-menubar-item-active"
|
type="button"
|
||||||
|
className="ts-menubar-item ts-menubar-item-active ts-plain-button"
|
||||||
|
aria-expanded={rightsMenuOpen}
|
||||||
onClick={() => setRightsMenuOpen((v) => !v)}
|
onClick={() => setRightsMenuOpen((v) => !v)}
|
||||||
>
|
>
|
||||||
{t("menu.rights")}
|
{t("menu.rights")}
|
||||||
</span>
|
</button>
|
||||||
{rightsMenuOpen && (
|
{rightsMenuOpen && (
|
||||||
<div className="ts-menu">
|
<div className="ts-menu" ref={focusFirstItem} onKeyDown={handleMenuKeyDown}>
|
||||||
<button
|
<button
|
||||||
className="ts-menu-item"
|
className="ts-menu-item"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -10010,14 +10103,16 @@ function AppInner() {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="ts-menubar-dropdown" ref={extrasMenuRef}>
|
<div className="ts-menubar-dropdown" ref={extrasMenuRef}>
|
||||||
<span
|
<button
|
||||||
className="ts-menubar-item ts-menubar-item-active"
|
type="button"
|
||||||
|
className="ts-menubar-item ts-menubar-item-active ts-plain-button"
|
||||||
|
aria-expanded={extrasMenuOpen}
|
||||||
onClick={() => setExtrasMenuOpen((v) => !v)}
|
onClick={() => setExtrasMenuOpen((v) => !v)}
|
||||||
>
|
>
|
||||||
{t("menu.extras")}
|
{t("menu.extras")}
|
||||||
</span>
|
</button>
|
||||||
{extrasMenuOpen && (
|
{extrasMenuOpen && (
|
||||||
<div className="ts-menu">
|
<div className="ts-menu" ref={focusFirstItem} onKeyDown={handleMenuKeyDown}>
|
||||||
<button
|
<button
|
||||||
className="ts-menu-item"
|
className="ts-menu-item"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -10185,22 +10280,25 @@ function AppInner() {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{IS_OWN_HOSTED_INSTANCE && (
|
{IS_OWN_HOSTED_INSTANCE && (
|
||||||
<span
|
<button
|
||||||
className="ts-menubar-item"
|
type="button"
|
||||||
|
className="ts-menubar-item ts-plain-button"
|
||||||
onClick={() => setFeedbackOpen(true)}
|
onClick={() => setFeedbackOpen(true)}
|
||||||
>
|
>
|
||||||
💬 {t("menu.extras.feedback")}
|
💬 {t("menu.extras.feedback")}
|
||||||
</span>
|
</button>
|
||||||
)}
|
)}
|
||||||
<div className="ts-menubar-dropdown" ref={helpMenuRef}>
|
<div className="ts-menubar-dropdown" ref={helpMenuRef}>
|
||||||
<span
|
<button
|
||||||
className="ts-menubar-item ts-menubar-item-active"
|
type="button"
|
||||||
|
className="ts-menubar-item ts-menubar-item-active ts-plain-button"
|
||||||
|
aria-expanded={helpMenuOpen}
|
||||||
onClick={() => setHelpMenuOpen((v) => !v)}
|
onClick={() => setHelpMenuOpen((v) => !v)}
|
||||||
>
|
>
|
||||||
{t("menu.help")}
|
{t("menu.help")}
|
||||||
</span>
|
</button>
|
||||||
{helpMenuOpen && (
|
{helpMenuOpen && (
|
||||||
<div className="ts-menu">
|
<div className="ts-menu" ref={focusFirstItem} onKeyDown={handleMenuKeyDown}>
|
||||||
<a
|
<a
|
||||||
className="ts-menu-item"
|
className="ts-menu-item"
|
||||||
href="https://webspeak3.de"
|
href="https://webspeak3.de"
|
||||||
@@ -10319,7 +10417,7 @@ function AppInner() {
|
|||||||
▾
|
▾
|
||||||
</button>
|
</button>
|
||||||
{awayMenuOpen && (
|
{awayMenuOpen && (
|
||||||
<div className="ts-menu ts-menu-away">
|
<div className="ts-menu ts-menu-away" ref={focusFirstItem} onKeyDown={handleMenuKeyDown}>
|
||||||
<button
|
<button
|
||||||
className="ts-menu-item"
|
className="ts-menu-item"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -10371,7 +10469,7 @@ function AppInner() {
|
|||||||
🤫
|
🤫
|
||||||
</button>
|
</button>
|
||||||
{whisperMenuOpen && (
|
{whisperMenuOpen && (
|
||||||
<div className="ts-menu ts-menu-away">
|
<div className="ts-menu ts-menu-away" ref={focusFirstItem} onKeyDown={handleMenuKeyDown}>
|
||||||
<div className="ts-context-menu-title">{t("whisper.channels")}</div>
|
<div className="ts-context-menu-title">{t("whisper.channels")}</div>
|
||||||
{channels.map((ch) => (
|
{channels.map((ch) => (
|
||||||
<label key={ch.id} className="ts-menu-item">
|
<label key={ch.id} className="ts-menu-item">
|
||||||
@@ -10499,7 +10597,7 @@ function AppInner() {
|
|||||||
{theme === "dark" ? "☀️" : "🌙"}
|
{theme === "dark" ? "☀️" : "🌙"}
|
||||||
</button>
|
</button>
|
||||||
<img src={`${import.meta.env.BASE_URL}logo.png`} alt="" className="ts-app-logo" />
|
<img src={`${import.meta.env.BASE_URL}logo.png`} alt="" className="ts-app-logo" />
|
||||||
<span className="ts-app-title">WebSpeak3</span>
|
<span className="ts-app-title" role="heading" aria-level={1}>WebSpeak3</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -11108,6 +11206,7 @@ function AppInner() {
|
|||||||
<div
|
<div
|
||||||
ref={clientContextMenuRef}
|
ref={clientContextMenuRef}
|
||||||
className="ts-context-menu"
|
className="ts-context-menu"
|
||||||
|
onKeyDown={handleMenuKeyDown}
|
||||||
style={{ top: clientContextMenu.y, left: clientContextMenu.x }}
|
style={{ top: clientContextMenu.y, left: clientContextMenu.x }}
|
||||||
>
|
>
|
||||||
<div className="ts-context-menu-title">{clientContextMenu.clientName}</div>
|
<div className="ts-context-menu-title">{clientContextMenu.clientName}</div>
|
||||||
@@ -11304,6 +11403,7 @@ function AppInner() {
|
|||||||
<div
|
<div
|
||||||
ref={serverContextMenuRef}
|
ref={serverContextMenuRef}
|
||||||
className="ts-context-menu"
|
className="ts-context-menu"
|
||||||
|
onKeyDown={handleMenuKeyDown}
|
||||||
style={{ top: serverContextMenu.y, left: serverContextMenu.x }}
|
style={{ top: serverContextMenu.y, left: serverContextMenu.x }}
|
||||||
>
|
>
|
||||||
<div className="ts-context-menu-title">{serverName || host}</div>
|
<div className="ts-context-menu-title">{serverName || host}</div>
|
||||||
@@ -11406,6 +11506,7 @@ function AppInner() {
|
|||||||
<div
|
<div
|
||||||
ref={channelContextMenuRef}
|
ref={channelContextMenuRef}
|
||||||
className="ts-context-menu"
|
className="ts-context-menu"
|
||||||
|
onKeyDown={handleMenuKeyDown}
|
||||||
style={{ top: channelContextMenu.y, left: channelContextMenu.x }}
|
style={{ top: channelContextMenu.y, left: channelContextMenu.x }}
|
||||||
>
|
>
|
||||||
<div className="ts-context-menu-title">{channelContextMenu.channelName}</div>
|
<div className="ts-context-menu-title">{channelContextMenu.channelName}</div>
|
||||||
@@ -11439,15 +11540,19 @@ function AppInner() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="ts-body">
|
<main className="ts-body">
|
||||||
<div className="ts-upper" style={{ height: upperHeight }}>
|
<div className="ts-upper" style={{ height: upperHeight }}>
|
||||||
<div className="ts-tree-panel" style={{ width: treeWidth }}>
|
<div className="ts-tree-panel" style={{ width: treeWidth }} onKeyDown={handleTreeKeyDown}>
|
||||||
{connected ? (
|
{connected ? (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
className={`ts-row ts-server-row${selected?.type === "server" ? " ts-row-selected" : ""}`}
|
className={`ts-row ts-server-row${selected?.type === "server" ? " ts-row-selected" : ""}`}
|
||||||
onClick={() => handleSelectItem({ type: "server" })}
|
onClick={() => handleSelectItem({ type: "server" })}
|
||||||
onContextMenu={handleServerContextMenu}
|
onContextMenu={handleServerContextMenu}
|
||||||
|
tabIndex={0}
|
||||||
|
onFocus={(e) => {
|
||||||
|
if (e.target === e.currentTarget && selected?.type !== "server") handleSelectItem({ type: "server" });
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<ServerIcon />
|
<ServerIcon />
|
||||||
<span>{serverName || host}</span>
|
<span>{serverName || host}</span>
|
||||||
@@ -11590,9 +11695,15 @@ function AppInner() {
|
|||||||
thread.unread ? " ts-chat-tab-unread" : ""
|
thread.unread ? " ts-chat-tab-unread" : ""
|
||||||
}`}
|
}`}
|
||||||
onClick={() => setActiveTab(thread.partnerId)}
|
onClick={() => setActiveTab(thread.partnerId)}
|
||||||
|
aria-keyshortcuts="Delete"
|
||||||
|
onKeyDown={(e) => {
|
||||||
|
// The × can't be its own button inside this one; Delete closes from the keyboard.
|
||||||
|
if (e.key === "Delete") handleClosePrivateChat(thread.partnerId);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{thread.partnerName}
|
{thread.partnerName}
|
||||||
<span
|
<span
|
||||||
|
aria-hidden="true"
|
||||||
className="ts-chat-tab-close"
|
className="ts-chat-tab-close"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
@@ -11632,7 +11743,7 @@ function AppInner() {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</main>
|
||||||
|
|
||||||
<div className="ts-log">
|
<div className="ts-log">
|
||||||
{log.slice(-50).map((entry, i) => {
|
{log.slice(-50).map((entry, i) => {
|
||||||
|
|||||||
@@ -391,6 +391,7 @@
|
|||||||
"info.no": "Nein",
|
"info.no": "Nein",
|
||||||
"tree.noMatches": "Keine Treffer",
|
"tree.noMatches": "Keine Treffer",
|
||||||
"tree.search": "Kanäle und Nutzer suchen",
|
"tree.search": "Kanäle und Nutzer suchen",
|
||||||
|
"tree.label": "Kanäle",
|
||||||
"tree.notConnected": "Nicht verbunden",
|
"tree.notConnected": "Nicht verbunden",
|
||||||
"tree.clickToSelect": "Klicken zum Auswählen, Doppelklick zum Beitreten",
|
"tree.clickToSelect": "Klicken zum Auswählen, Doppelklick zum Beitreten",
|
||||||
"tree.clickToJoin": "Doppelklick zum Beitreten",
|
"tree.clickToJoin": "Doppelklick zum Beitreten",
|
||||||
@@ -659,10 +660,7 @@
|
|||||||
"nachrichten.message": "Nachricht",
|
"nachrichten.message": "Nachricht",
|
||||||
"nachrichten.add": "Hinzufügen",
|
"nachrichten.add": "Hinzufügen",
|
||||||
"nachrichten.delete": "Löschen",
|
"nachrichten.delete": "Löschen",
|
||||||
"tree.expand": "Aufklappen",
|
|
||||||
"tree.collapse": "Zuklappen",
|
|
||||||
"tabs.disconnect": "Verbindung trennen",
|
"tabs.disconnect": "Verbindung trennen",
|
||||||
"tabs.closeTab": "Tab schließen: {label}",
|
|
||||||
"identity.importInvalid": "„{file}“ ist keine gültige Identitätsdatei.",
|
"identity.importInvalid": "„{file}“ ist keine gültige Identitätsdatei.",
|
||||||
"log.fileTransferFailed": "Dateiübertragung fehlgeschlagen:",
|
"log.fileTransferFailed": "Dateiübertragung fehlgeschlagen:",
|
||||||
"log.serverReconnecting": "Verbindung zum Server verloren, verbinde neu…",
|
"log.serverReconnecting": "Verbindung zum Server verloren, verbinde neu…",
|
||||||
|
|||||||
@@ -391,6 +391,7 @@
|
|||||||
"info.no": "No",
|
"info.no": "No",
|
||||||
"tree.noMatches": "No matches",
|
"tree.noMatches": "No matches",
|
||||||
"tree.search": "Search channels and users",
|
"tree.search": "Search channels and users",
|
||||||
|
"tree.label": "Channels",
|
||||||
"tree.notConnected": "Not connected",
|
"tree.notConnected": "Not connected",
|
||||||
"tree.clickToSelect": "Click to select, double-click to join",
|
"tree.clickToSelect": "Click to select, double-click to join",
|
||||||
"tree.clickToJoin": "Double-click to join",
|
"tree.clickToJoin": "Double-click to join",
|
||||||
@@ -659,10 +660,7 @@
|
|||||||
"nachrichten.message": "Message",
|
"nachrichten.message": "Message",
|
||||||
"nachrichten.add": "Add",
|
"nachrichten.add": "Add",
|
||||||
"nachrichten.delete": "Delete",
|
"nachrichten.delete": "Delete",
|
||||||
"tree.expand": "Expand",
|
|
||||||
"tree.collapse": "Collapse",
|
|
||||||
"tabs.disconnect": "Disconnect",
|
"tabs.disconnect": "Disconnect",
|
||||||
"tabs.closeTab": "Close tab: {label}",
|
|
||||||
"identity.importInvalid": "\"{file}\" is not a valid identity file.",
|
"identity.importInvalid": "\"{file}\" is not a valid identity file.",
|
||||||
"log.fileTransferFailed": "File transfer failed:",
|
"log.fileTransferFailed": "File transfer failed:",
|
||||||
"log.serverReconnecting": "Connection to the server lost, reconnecting…",
|
"log.serverReconnecting": "Connection to the server lost, reconnecting…",
|
||||||
|
|||||||
@@ -390,6 +390,7 @@
|
|||||||
"info.no": "خیر",
|
"info.no": "خیر",
|
||||||
"tree.noMatches": "نتیجهای یافت نشد",
|
"tree.noMatches": "نتیجهای یافت نشد",
|
||||||
"tree.search": "جستجوی کانالها و کاربران",
|
"tree.search": "جستجوی کانالها و کاربران",
|
||||||
|
"tree.label": "کانالها",
|
||||||
"tree.notConnected": "متصل نیست",
|
"tree.notConnected": "متصل نیست",
|
||||||
"tree.clickToSelect": "برای انتخاب کلیک کن، برای ورود دوبار کلیک کن",
|
"tree.clickToSelect": "برای انتخاب کلیک کن، برای ورود دوبار کلیک کن",
|
||||||
"tree.clickToJoin": "برای ورود دوبار کلیک کن",
|
"tree.clickToJoin": "برای ورود دوبار کلیک کن",
|
||||||
@@ -658,10 +659,7 @@
|
|||||||
"nachrichten.message": "پیام",
|
"nachrichten.message": "پیام",
|
||||||
"nachrichten.add": "افزودن",
|
"nachrichten.add": "افزودن",
|
||||||
"nachrichten.delete": "حذف",
|
"nachrichten.delete": "حذف",
|
||||||
"tree.expand": "باز کردن",
|
|
||||||
"tree.collapse": "بستن",
|
|
||||||
"tabs.disconnect": "قطع اتصال",
|
"tabs.disconnect": "قطع اتصال",
|
||||||
"tabs.closeTab": "بستن زبانه: {label}",
|
|
||||||
"identity.importInvalid": "«{file}» یک فایل هویت معتبر نیست.",
|
"identity.importInvalid": "«{file}» یک فایل هویت معتبر نیست.",
|
||||||
"log.fileTransferFailed": "انتقال فایل ناموفق بود:",
|
"log.fileTransferFailed": "انتقال فایل ناموفق بود:",
|
||||||
"log.serverReconnecting": "اتصال به سرور قطع شد، در حال اتصال دوباره…",
|
"log.serverReconnecting": "اتصال به سرور قطع شد، در حال اتصال دوباره…",
|
||||||
|
|||||||
@@ -292,6 +292,7 @@
|
|||||||
"info.no": "否",
|
"info.no": "否",
|
||||||
"tree.noMatches": "无匹配结果",
|
"tree.noMatches": "无匹配结果",
|
||||||
"tree.search": "搜索频道和用户",
|
"tree.search": "搜索频道和用户",
|
||||||
|
"tree.label": "频道",
|
||||||
"tree.notConnected": "未连接",
|
"tree.notConnected": "未连接",
|
||||||
"tree.clickToSelect": "单击选择,双击加入",
|
"tree.clickToSelect": "单击选择,双击加入",
|
||||||
"tree.clickToJoin": "双击加入",
|
"tree.clickToJoin": "双击加入",
|
||||||
@@ -658,10 +659,7 @@
|
|||||||
"stream.state.failed": "连接失败",
|
"stream.state.failed": "连接失败",
|
||||||
"stream.state.closed": "已结束",
|
"stream.state.closed": "已结束",
|
||||||
"clientContext.watchStream": "观看直播",
|
"clientContext.watchStream": "观看直播",
|
||||||
"tree.expand": "展开",
|
|
||||||
"tree.collapse": "折叠",
|
|
||||||
"tabs.disconnect": "断开连接",
|
"tabs.disconnect": "断开连接",
|
||||||
"tabs.closeTab": "关闭标签页:{label}",
|
|
||||||
"identity.importInvalid": "“{file}”不是有效的身份文件。",
|
"identity.importInvalid": "“{file}”不是有效的身份文件。",
|
||||||
"log.fileTransferFailed": "文件传输失败:",
|
"log.fileTransferFailed": "文件传输失败:",
|
||||||
"log.serverReconnecting": "与服务器的连接已断开,正在重新连接…",
|
"log.serverReconnecting": "与服务器的连接已断开,正在重新连接…",
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
--gts-border: #1c1f24;
|
--gts-border: #1c1f24;
|
||||||
--border-light: #3a4450;
|
--border-light: #3a4450;
|
||||||
--gts-text: #d7dee6;
|
--gts-text: #d7dee6;
|
||||||
--gts-text-muted: #7a8490;
|
--gts-text-muted: #8a94a0; /* native #7a8490, lifted to 4.5:1 on the panel */
|
||||||
--menu-text: #c8b882;
|
--menu-text: #c8b882;
|
||||||
--menu-hover: #c8b882;
|
--menu-hover: #c8b882;
|
||||||
--menu-hover-text: #1a1a1a;
|
--menu-hover-text: #1a1a1a;
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
--error: #e62222;
|
--error: #e62222;
|
||||||
--selection: #4a5560;
|
--selection: #4a5560;
|
||||||
--selection-tree: #5a7ea0;
|
--selection-tree: #5a7ea0;
|
||||||
--server-log-text: #7a8490;
|
--server-log-text: #8a94a0;
|
||||||
--chat-separator: #1c1f24;
|
--chat-separator: #1c1f24;
|
||||||
--chat-separator-selected: #4a5560;
|
--chat-separator-selected: #4a5560;
|
||||||
--tree-fg: #d1d1d1;
|
--tree-fg: #d1d1d1;
|
||||||
@@ -375,7 +375,10 @@
|
|||||||
color: var(--gts-text);
|
color: var(--gts-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Multi-join tabs for Standard / Nova (same strip, slightly softer chrome) */
|
/* Multi-join tabs for Standard / Nova (same strip, slightly softer chrome).
|
||||||
|
Only GTS defines --bg-app/--bg-toolbar/--bg-panel, so this strip is always
|
||||||
|
dark here: its text colors are fixed, not the theme's --text (which is dark
|
||||||
|
in the light theme and made the active tab unreadable). */
|
||||||
.ts-app:not(.ts-design-greenteaspeak) .gts-connection-tabs {
|
.ts-app:not(.ts-design-greenteaspeak) .gts-connection-tabs {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 1px;
|
gap: 1px;
|
||||||
@@ -396,7 +399,7 @@
|
|||||||
background: var(--bg-toolbar, #2a2a2a);
|
background: var(--bg-toolbar, #2a2a2a);
|
||||||
border: 1px solid var(--border, #444);
|
border: 1px solid var(--border, #444);
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
color: var(--text-muted, #aaa);
|
color: #aaa;
|
||||||
padding: 0 4px 0 10px;
|
padding: 0 4px 0 10px;
|
||||||
max-width: 280px;
|
max-width: 280px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -408,7 +411,7 @@
|
|||||||
|
|
||||||
.ts-app:not(.ts-design-greenteaspeak) .gts-connection-tab-active {
|
.ts-app:not(.ts-design-greenteaspeak) .gts-connection-tab-active {
|
||||||
background: var(--bg-panel, #333);
|
background: var(--bg-panel, #333);
|
||||||
color: var(--text, #eee);
|
color: #eee;
|
||||||
border-color: #b0b8c0;
|
border-color: #b0b8c0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -422,6 +425,7 @@
|
|||||||
|
|
||||||
.ts-app:not(.ts-design-greenteaspeak) .gts-connection-tab-close {
|
.ts-app:not(.ts-design-greenteaspeak) .gts-connection-tab-close {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
text-align: center;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|||||||
@@ -57,22 +57,31 @@ export function GreenteaSpeakChrome({
|
|||||||
tab.connecting ? " gts-connection-tab-connecting" : ""
|
tab.connecting ? " gts-connection-tab-connecting" : ""
|
||||||
}`}
|
}`}
|
||||||
onClick={() => onSelectTab?.(tab.id)}
|
onClick={() => onSelectTab?.(tab.id)}
|
||||||
|
tabIndex={0}
|
||||||
|
aria-keyshortcuts={onCloseTab ? "Delete" : undefined}
|
||||||
|
onKeyDown={(e) => {
|
||||||
|
if (e.target !== e.currentTarget) return;
|
||||||
|
// The × below is mouse-only (a button can't sit inside a tab); Delete closes.
|
||||||
|
if (e.key === "Delete" && onCloseTab) onCloseTab(tab.id);
|
||||||
|
else if (e.key === "Enter" || e.key === " ") onSelectTab?.(tab.id);
|
||||||
|
else return;
|
||||||
|
e.preventDefault();
|
||||||
|
}}
|
||||||
title={tab.label}
|
title={tab.label}
|
||||||
>
|
>
|
||||||
<span className="gts-connection-tab-label">{tab.label}</span>
|
<span className="gts-connection-tab-label">{tab.label}</span>
|
||||||
{onCloseTab ? (
|
{onCloseTab ? (
|
||||||
<button
|
<span
|
||||||
type="button"
|
|
||||||
className="gts-connection-tab-close"
|
className="gts-connection-tab-close"
|
||||||
|
aria-hidden="true"
|
||||||
title={t("tabs.disconnect")}
|
title={t("tabs.disconnect")}
|
||||||
aria-label={t("tabs.closeTab", { label: tab.label })}
|
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
onCloseTab(tab.id);
|
onCloseTab(tab.id);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
×
|
×
|
||||||
</button>
|
</span>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user