mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-03 18:02:49 +08:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a4da3409bc | ||
|
|
da985ef7d1 | ||
|
|
806de52382 |
No files matched your search
@@ -31,6 +31,23 @@
|
||||
|
||||
---
|
||||
|
||||
## 📑 Contents
|
||||
|
||||
- [Preview](#-preview)
|
||||
- [Quick Start](#-quick-start)
|
||||
- [Features](#-features)
|
||||
- [Tech Stack](#-tech-stack)
|
||||
- [Browser Support](#-browser-support)
|
||||
- [Installation](#-installation)
|
||||
- [Docker (recommended)](#-docker-recommended)
|
||||
- [Account sync](#account-sync)
|
||||
- [Environment variables](#environment-variables)
|
||||
- [Auto-Connect Links](#-auto-connect-links)
|
||||
- [Translating](#translating)
|
||||
- [Credits](#credits)
|
||||
- [In Memory of Akimo](#-in-memory-of-akimo)
|
||||
- [Legal / Disclaimer](#legal--disclaimer)
|
||||
|
||||
## 📸 Preview
|
||||
|
||||
<table>
|
||||
@@ -365,6 +382,15 @@ A share link (above) always takes priority over the baked-in default when both a
|
||||
|
||||
Either way: on your own hosted instance, the mandatory first-visit Terms of Use is shown and accepted before anything auto-connects; and if the connection fails, the connect dialog opens prefilled so the visitor can fix it and retry by hand.
|
||||
|
||||
<a id="translating"></a>
|
||||
## 🌍 Translating
|
||||
|
||||
The UI texts live in flat JSON files in [`web/src/locales/`](web/src/locales/), one per language, with `en.json` as the reference. Untranslated keys fall back to English.
|
||||
|
||||
- **Fix or complete a language:** edit its file and open a pull request.
|
||||
- **Add a new language:** copy `en.json` to `<code>.json` (for example `it.json`), translate the values and open a pull request. Leave the keys and placeholders like `{count}` as they are. I'll wire the language into the selector.
|
||||
- **No GitHub account?** Send the file via the in-app feedback form or to feedback@webspeak3.de.
|
||||
|
||||
## Credits
|
||||
|
||||
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.
|
||||
|
||||
+406
@@ -4999,3 +4999,409 @@ input.ts-identities-uid {
|
||||
.ts-app .gts-connection-tab-close:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
Mobile shell (.ts-mobile is set from JS below 700px or via the demo toggle).
|
||||
Own layout instead of the squeezed desktop one: slim header with the menu
|
||||
behind ☰, one full-height panel at a time (channels / chat / info), big
|
||||
voice controls and tabs at the bottom. Touch targets are >= 44px.
|
||||
--------------------------------------------------------------------------- */
|
||||
|
||||
.ts-app.ts-mobile {
|
||||
height: 100dvh;
|
||||
font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
||||
--m-radius: 14px;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile > .ts-toolbar,
|
||||
.ts-app.ts-mobile > .ts-log,
|
||||
.ts-app.ts-mobile .ts-resize-handle-vertical,
|
||||
.ts-app.ts-mobile .ts-resize-handle-horizontal {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
|
||||
.ts-app.ts-mobile > .ts-menubar {
|
||||
position: relative;
|
||||
min-height: 56px;
|
||||
padding: 0 8px 0 4px;
|
||||
gap: 6px;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: flex-start;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile > .ts-menubar .ts-nova-menu-dropdown {
|
||||
position: static;
|
||||
order: 0;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-nova-menu-toggle {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
font-size: 22px;
|
||||
border-radius: 12px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-mobile-title {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-mobile-title-name {
|
||||
font-size: 17px;
|
||||
font-weight: 650;
|
||||
color: var(--text);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-mobile-title-status {
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-mobile-title-status::before {
|
||||
content: "";
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
background: var(--text-muted);
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-mobile-title-status-on::before {
|
||||
background: #3ba55d;
|
||||
}
|
||||
|
||||
/* The ☰ panel becomes a full-width sheet with inline (accordion) submenus. */
|
||||
.ts-app.ts-mobile .ts-menubar-items.ts-nova-menu-panel.ts-nova-menu-panel-open {
|
||||
left: 8px;
|
||||
right: 8px;
|
||||
top: calc(100% + 4px);
|
||||
margin: 0;
|
||||
padding: 8px;
|
||||
max-height: calc(100dvh - 140px);
|
||||
overflow-y: auto;
|
||||
border-radius: var(--m-radius);
|
||||
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-menubar-items.ts-nova-menu-panel-open .ts-menubar-item,
|
||||
.ts-app.ts-mobile .ts-menubar-items.ts-nova-menu-panel-open .ts-menubar-item-active {
|
||||
min-height: 48px;
|
||||
padding: 0 14px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: var(--text);
|
||||
text-align: left;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-menubar-items.ts-nova-menu-panel-open .ts-menu {
|
||||
position: static;
|
||||
margin: 0 0 6px 10px;
|
||||
width: auto;
|
||||
min-width: 0;
|
||||
max-height: none;
|
||||
border: none;
|
||||
border-left: 2px solid var(--border-soft);
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-menu-item {
|
||||
min-height: 44px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
/* Body: one panel at a time */
|
||||
|
||||
.ts-app.ts-mobile .ts-body {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-upper {
|
||||
height: auto !important;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-tree-panel,
|
||||
.ts-app.ts-mobile .ts-side-panel {
|
||||
width: 100% !important;
|
||||
max-height: none;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-chat-panel {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile-tab-tree .ts-side-panel,
|
||||
.ts-app.ts-mobile-tab-tree .ts-chat-panel,
|
||||
.ts-app.ts-mobile-tab-info .ts-tree-panel,
|
||||
.ts-app.ts-mobile-tab-info .ts-chat-panel,
|
||||
.ts-app.ts-mobile-tab-chat .ts-upper {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Tree: big, rounded rows */
|
||||
|
||||
.ts-app.ts-mobile .ts-tree-panel {
|
||||
padding: 6px 8px 12px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-tree-panel .ts-row {
|
||||
min-height: 44px;
|
||||
line-height: 1.3;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
padding-right: 10px;
|
||||
gap: 8px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-tree-panel .ts-server-row {
|
||||
font-weight: 650;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-tree-search {
|
||||
min-height: 42px;
|
||||
margin: 6px 0;
|
||||
padding: 0 14px;
|
||||
font-size: 16px;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-side-panel {
|
||||
padding: 8px 12px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
/* Chat */
|
||||
|
||||
.ts-app.ts-mobile .ts-chat-messages {
|
||||
font-size: 15px;
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-chat-tabs {
|
||||
overflow-x: auto;
|
||||
gap: 6px;
|
||||
padding: 6px 8px;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-chat-tab {
|
||||
min-height: 36px;
|
||||
padding: 0 14px;
|
||||
border-radius: 999px;
|
||||
font-size: 14px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-chat-input-row {
|
||||
padding: 8px;
|
||||
gap: 8px;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-chat-input-row textarea {
|
||||
min-height: 44px;
|
||||
font-size: 16px; /* < 16px makes iOS zoom into the field */
|
||||
padding: 10px 14px;
|
||||
border-radius: 22px;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-chat-input-row button {
|
||||
min-height: 44px;
|
||||
padding: 0 18px;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
border: none;
|
||||
border-radius: 22px;
|
||||
background: var(--accent);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Bottom: voice bar + tabs */
|
||||
|
||||
.ts-mobile-bottom {
|
||||
flex-shrink: 0;
|
||||
background: var(--bg-toolbar-1);
|
||||
border-top: 1px solid var(--border-soft);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
.ts-mobile-voicebar {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
padding: 8px 10px 4px;
|
||||
}
|
||||
|
||||
.ts-mobile-voice-btn {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 56px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
border: none;
|
||||
border-radius: var(--m-radius, 14px);
|
||||
background: var(--input-bg);
|
||||
color: var(--text);
|
||||
cursor: pointer;
|
||||
touch-action: manipulation;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.ts-mobile-voice-label {
|
||||
font-size: 11px;
|
||||
color: var(--text-muted);
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ts-mobile-voice-on {
|
||||
background: #3ba55d;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.ts-mobile-voice-off {
|
||||
background: #b3403a;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.ts-mobile-voice-on .ts-mobile-voice-label,
|
||||
.ts-mobile-voice-off .ts-mobile-voice-label,
|
||||
.ts-mobile-voice-hangup .ts-mobile-voice-label {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.ts-mobile-voice-hangup {
|
||||
flex: 0 0 72px;
|
||||
background: #d6403d;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.ts-mobile-ptt {
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
.ts-mobile-connect-btn {
|
||||
flex: 1;
|
||||
min-height: 52px;
|
||||
border: none;
|
||||
border-radius: var(--m-radius, 14px);
|
||||
background: var(--accent);
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
font-weight: 650;
|
||||
}
|
||||
|
||||
.ts-mobile-tabs {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.ts-mobile-tab {
|
||||
flex: 1;
|
||||
min-height: 52px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 2px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--text-muted);
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
position: relative;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
|
||||
.ts-mobile-icon {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.ts-mobile-tab-active {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.ts-mobile-tab-active::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
width: 56px;
|
||||
height: 30px;
|
||||
border-radius: 15px;
|
||||
background: color-mix(in srgb, var(--accent) 18%, transparent);
|
||||
}
|
||||
|
||||
.ts-mobile-tab-unread::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: calc(50% + 10px);
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: #d6403d;
|
||||
}
|
||||
|
||||
/* Floating buttons sit above the bottom bars instead of on top of them. */
|
||||
.ts-app.ts-mobile .ts-donate-fab {
|
||||
bottom: calc(150px + env(safe-area-inset-bottom));
|
||||
right: 12px;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-feedback-fab-wrap {
|
||||
bottom: calc(150px + env(safe-area-inset-bottom));
|
||||
right: 12px;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-feedback-fab-wrap-stacked {
|
||||
bottom: calc(200px + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.ts-mobile-tab > * {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* In the chat tab the floating buttons would cover the send button. */
|
||||
.ts-app.ts-mobile-tab-chat .ts-donate-fab,
|
||||
.ts-app.ts-mobile-tab-chat .ts-feedback-fab-wrap {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ts-app.ts-mobile .ts-chat-tabs {
|
||||
order: -1;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
}
|
||||
+122
-5
@@ -3150,6 +3150,27 @@ function NewsTicker() {
|
||||
);
|
||||
}
|
||||
|
||||
/** Line icons for the mobile shell (24px grid, stroke = currentColor). */
|
||||
const MOBILE_ICONS = {
|
||||
mic: "M12 3a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3zM5 11a7 7 0 0 0 14 0M12 18v3",
|
||||
micOff: "M3 3l18 18M9 9v3a3 3 0 0 0 5.1 2.1M15 9.3V6a3 3 0 0 0-5.7-1.3M5 11a7 7 0 0 0 11.9 4.9M19 11a7 7 0 0 1-.6 2.8M12 18v3",
|
||||
sound: "M11 5L6 9H3v6h3l5 4zM15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13",
|
||||
soundOff: "M11 5L6 9H3v6h3l5 4zM22 9l-6 6M16 9l6 6",
|
||||
leave: "M3.6 13.4c4.6-4.5 12.2-4.5 16.8 0l-2.3 2.3-3-1.3v-2.1a11 11 0 0 0-6.2 0v2.1l-3 1.3z",
|
||||
talk: "M12 3a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3zM5 11a7 7 0 0 0 14 0M12 18v3M2 8v4M22 8v4",
|
||||
tree: "M4 5h16M8 10h12M8 15h12M4 5v15M4 10h4M4 15h4M8 20h12M4 20h4",
|
||||
chat: "M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z",
|
||||
info: "M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 11v6M12 7.5v.5",
|
||||
} as const;
|
||||
|
||||
function MobileIcon({ name }: { name: keyof typeof MOBILE_ICONS }) {
|
||||
return (
|
||||
<svg className="ts-mobile-icon" viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round">
|
||||
<path d={MOBILE_ICONS[name]} />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
function DonateFab() {
|
||||
const t = useT();
|
||||
if (!DONATE_URL) return null;
|
||||
@@ -6474,7 +6495,7 @@ function AnwendungPanel({
|
||||
</select>
|
||||
</label>
|
||||
<p className="ts-options-hint">
|
||||
<a href="https://hosted.weblate.org/projects/webspeak3/" target="_blank" rel="noreferrer">
|
||||
<a href="https://github.com/WebSpeak3/webspeak3#translating" target="_blank" rel="noreferrer">
|
||||
{t("app.language.helpTranslate")}
|
||||
</a>
|
||||
</p>
|
||||
@@ -8906,6 +8927,17 @@ function AppInner() {
|
||||
const [banSeconds, setBanSeconds] = useState("0");
|
||||
const banBackdrop = useBackdropDismiss(() => setBanTarget(null));
|
||||
const [demoForceMobile, setDemoForceMobile] = useState(false);
|
||||
// Phones get their own shell (header + big tree + bottom voice bar/tabs)
|
||||
// instead of the squeezed desktop layout.
|
||||
const [narrowScreen, setNarrowScreen] = useState(() => window.matchMedia("(max-width: 700px)").matches);
|
||||
useEffect(() => {
|
||||
const mq = window.matchMedia("(max-width: 700px)");
|
||||
const onChange = () => setNarrowScreen(mq.matches);
|
||||
mq.addEventListener("change", onChange);
|
||||
return () => mq.removeEventListener("change", onChange);
|
||||
}, []);
|
||||
const mobile = narrowScreen || demoForceMobile;
|
||||
const [mobileTab, setMobileTab] = useState<"tree" | "chat" | "info">("tree");
|
||||
const [clientContextMenu, setClientContextMenu] = useState<{
|
||||
x: number;
|
||||
y: number;
|
||||
@@ -12568,7 +12600,7 @@ function AppInner() {
|
||||
: treeClients.length;
|
||||
const novaSplash = designTheme === "nova" && !connected;
|
||||
// Nova and IDE collapse the menubar behind a hamburger button.
|
||||
const compactMenu = designTheme === "nova" || designTheme === "ide";
|
||||
const compactMenu = designTheme === "nova" || designTheme === "ide" || mobile;
|
||||
const micLabel = !micOn ? t("toolbar.micEnable") : inputMuted ? t("toolbar.micUnmute") : t("toolbar.micMute");
|
||||
const streamLabel = DEMO_MODE
|
||||
? t("publish.demoUnavailable")
|
||||
@@ -12579,7 +12611,7 @@ function AppInner() {
|
||||
<div
|
||||
className={`ts-app ts-theme-${theme}${designThemeClassName(designTheme)}${
|
||||
activeCustomTheme ? " ts-design-custom" : ""
|
||||
}${demoForceMobile ? " ts-force-mobile" : ""}${novaSplash ? " ts-nova-splash" : ""}${
|
||||
}${demoForceMobile ? " ts-force-mobile" : ""}${mobile ? ` ts-mobile ts-mobile-tab-${mobileTab}` : ""}${novaSplash ? " ts-nova-splash" : ""}${
|
||||
designTheme === "ide" && !idePixelFont ? " ts-ide-plain-font" : ""
|
||||
}`}
|
||||
data-custom-theme={activeCustomTheme?.id}
|
||||
@@ -13115,7 +13147,7 @@ function AppInner() {
|
||||
</a>
|
||||
<a
|
||||
className="ts-menu-item"
|
||||
href="https://hosted.weblate.org/projects/webspeak3/"
|
||||
href="https://github.com/WebSpeak3/webspeak3#translating"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
onClick={() => setHelpMenuOpen(false)}
|
||||
@@ -13141,6 +13173,14 @@ function AppInner() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{mobile && designTheme !== "nova" && (
|
||||
<div className="ts-mobile-title">
|
||||
<span className="ts-mobile-title-name">{connected ? serverName || host : "WebSpeak3"}</span>
|
||||
<span className={`ts-mobile-title-status${connected ? " ts-mobile-title-status-on" : ""}`}>
|
||||
{connected ? ownClient?.name ?? t("design.status.connected") : t("tree.notConnected")}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
{designTheme === "nova" && (
|
||||
<div className="ts-nova-topbar-server">
|
||||
<span className="ts-nova-topbar-logo">W</span>
|
||||
@@ -13405,7 +13445,7 @@ function AppInner() {
|
||||
|
||||
</div>
|
||||
|
||||
{sessionTabs.length > 0 ? (
|
||||
{sessionTabs.length > (mobile ? 1 : 0) ? (
|
||||
<ConnectionTabs
|
||||
tabs={sessionTabs}
|
||||
activeTabId={activeSessionId}
|
||||
@@ -14657,6 +14697,83 @@ function AppInner() {
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{mobile && (
|
||||
<div className="ts-mobile-bottom">
|
||||
{connected ? (
|
||||
<div className="ts-mobile-voicebar">
|
||||
{pushToTalk && micOn && (
|
||||
<button
|
||||
className={`ts-mobile-voice-btn ts-mobile-ptt${pttPressed ? " ts-mobile-voice-on" : ""}`}
|
||||
onPointerDown={(e) => {
|
||||
e.currentTarget.setPointerCapture(e.pointerId);
|
||||
setPttPressed(true);
|
||||
}}
|
||||
onPointerUp={() => setPttPressed(false)}
|
||||
onPointerCancel={() => setPttPressed(false)}
|
||||
onContextMenu={(e) => e.preventDefault()}
|
||||
aria-label={t("toolbar.pushToTalk")}
|
||||
aria-pressed={pttPressed}
|
||||
>
|
||||
<MobileIcon name="talk" />
|
||||
<span className="ts-mobile-voice-label">{t("mobile.talk")}</span>
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
className={`ts-mobile-voice-btn${micOn && !inputMuted ? " ts-mobile-voice-on" : ""}${
|
||||
micOn && inputMuted ? " ts-mobile-voice-off" : ""
|
||||
}`}
|
||||
onClick={handleToggleMic}
|
||||
aria-label={micLabel}
|
||||
>
|
||||
<MobileIcon name={micOn && !inputMuted ? "mic" : "micOff"} />
|
||||
<span className="ts-mobile-voice-label">{t("mobile.mic")}</span>
|
||||
</button>
|
||||
<button
|
||||
className={`ts-mobile-voice-btn${outputMuted ? " ts-mobile-voice-off" : ""}`}
|
||||
onClick={handleToggleOutputMuted}
|
||||
aria-label={outputMuted ? t("toolbar.unmuteSound") : t("toolbar.muteSound")}
|
||||
>
|
||||
<MobileIcon name={outputMuted ? "soundOff" : "sound"} />
|
||||
<span className="ts-mobile-voice-label">{t("mobile.sound")}</span>
|
||||
</button>
|
||||
<button className="ts-mobile-voice-btn ts-mobile-voice-hangup" onClick={handleDisconnect} aria-label={t("menu.connections.disconnectCurrent")}>
|
||||
<MobileIcon name="leave" />
|
||||
<span className="ts-mobile-voice-label">{t("mobile.leave")}</span>
|
||||
</button>
|
||||
</div>
|
||||
) : (
|
||||
<div className="ts-mobile-voicebar">
|
||||
<button className="ts-mobile-connect-btn" onClick={() => setConnectDialogOpen(true)} disabled={connecting}>
|
||||
{t("menu.connections.connect")}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
<nav className="ts-mobile-tabs">
|
||||
{(
|
||||
[
|
||||
["tree", t("mobile.tab.channels")],
|
||||
["chat", t("mobile.tab.chat")],
|
||||
["info", t("mobile.tab.info")],
|
||||
] as const
|
||||
).map(([id, label]) => (
|
||||
<button
|
||||
key={id}
|
||||
className={`ts-mobile-tab${mobileTab === id ? " ts-mobile-tab-active" : ""}${
|
||||
id === "chat" && (chatUnread.server || chatUnread.channel || Object.values(pmThreads).some((p) => p.unread))
|
||||
? " ts-mobile-tab-unread"
|
||||
: ""
|
||||
}`}
|
||||
onClick={() => setMobileTab(id)}
|
||||
aria-current={mobileTab === id ? "page" : undefined}
|
||||
>
|
||||
<MobileIcon name={id} />
|
||||
{label}
|
||||
</button>
|
||||
))}
|
||||
</nav>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="ts-log">
|
||||
{log.slice(-50).map((entry, i) => {
|
||||
let text = entry.text;
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ const LANGUAGE_KEY = "webspeak3:language";
|
||||
// user-facing string in the app should have an entry in every file - falls
|
||||
// back to the English string (or the raw key) if a translation is missing,
|
||||
// so a partial dictionary never blanks out the UI. Plain JSON (not inline
|
||||
// TS objects) so translation tools like Weblate can read/write these files
|
||||
// TS objects) so translation tools can read/write these files
|
||||
// directly.
|
||||
const translations: Record<Lang, Record<string, string>> = {
|
||||
de,
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"menu.help.about": "O WebSpeak3",
|
||||
"menu.help.github": "GitHub",
|
||||
"menu.help.changelog": "Seznam změn",
|
||||
"menu.help.translate": "Pomozte s překladem (Weblate)",
|
||||
"menu.help.translate": "Pomozte s překladem (GitHub)",
|
||||
"menu.extras.identities": "Identity",
|
||||
"menu.extras.contacts": "Kontakty",
|
||||
"menu.extras.collectedUrls": "Shromážděné URL",
|
||||
@@ -408,7 +408,7 @@
|
||||
"app.language.fa": "فارسی (بتا)",
|
||||
"app.language.cs-CZ": "Čeština",
|
||||
"app.language.ru": "Русский (бета)",
|
||||
"app.language.helpTranslate": "Missing your language or spotted wrong translation? Help out on Weblate →",
|
||||
"app.language.helpTranslate": "Chybí váš jazyk nebo jste našli chybu v překladu? Takto můžete pomoct →",
|
||||
"app.serverBanner": "Zobrazovat bannery serveru",
|
||||
"app.serverBanner.hint": "Banner se načítá přímo z adresy nastavené administrátorem serveru a tento hostitel vidí vaši IP adresu.",
|
||||
"app.chatImages": "Načítat obrázky v chatu",
|
||||
@@ -999,5 +999,12 @@
|
||||
"sync.error.pow_required": "Bezpečnostní kontrola selhala, zkus to znovu.",
|
||||
"sync.error.conflict": "Jiné zařízení mezitím něco změnilo.",
|
||||
"sync.error.payload_too_large": "Příliš mnoho dat pro synchronizaci (max. 1 MB).",
|
||||
"sync.error.generic": "Synchronizace selhala."
|
||||
"sync.error.generic": "Synchronizace selhala.",
|
||||
"mobile.tab.channels": "Kanály",
|
||||
"mobile.tab.chat": "Chat",
|
||||
"mobile.tab.info": "Info",
|
||||
"mobile.mic": "Mikrofon",
|
||||
"mobile.sound": "Zvuk",
|
||||
"mobile.leave": "Odpojit",
|
||||
"mobile.talk": "Mluvit"
|
||||
}
|
||||
+10
-3
@@ -19,7 +19,7 @@
|
||||
"menu.help.about": "Über WebSpeak3",
|
||||
"menu.help.github": "GitHub",
|
||||
"menu.help.changelog": "Changelog",
|
||||
"menu.help.translate": "Mitübersetzen (Weblate)",
|
||||
"menu.help.translate": "Mitübersetzen (GitHub)",
|
||||
"menu.extras.identities": "Identitäten",
|
||||
"menu.extras.contacts": "Kontakte",
|
||||
"menu.extras.collectedUrls": "Gesammelte URLs",
|
||||
@@ -408,7 +408,7 @@
|
||||
"app.language.fa": "فارسی (بتا)",
|
||||
"app.language.cs-CZ": "Čeština",
|
||||
"app.language.ru": "Русский (бета)",
|
||||
"app.language.helpTranslate": "Fehlt deine Sprache oder eine Übersetzung ist ungenau? Hilf mit auf Weblate →",
|
||||
"app.language.helpTranslate": "Fehlt deine Sprache oder eine Übersetzung ist ungenau? So hilfst du mit →",
|
||||
"app.serverBanner": "Server-Banner anzeigen",
|
||||
"app.serverBanner.hint": "Das Banner lädt direkt von der Adresse, die der Serverbetreiber eingetragen hat. Dieser Host sieht dabei deine IP-Adresse.",
|
||||
"app.chatImages": "Bilder im Chat laden",
|
||||
@@ -999,5 +999,12 @@
|
||||
"sync.error.pow_required": "Sicherheitsprüfung fehlgeschlagen, bitte nochmal versuchen.",
|
||||
"sync.error.conflict": "Ein anderes Gerät hat inzwischen etwas geändert.",
|
||||
"sync.error.payload_too_large": "Zu viele Daten für die Synchronisierung (max. 1 MB).",
|
||||
"sync.error.generic": "Synchronisierung fehlgeschlagen."
|
||||
"sync.error.generic": "Synchronisierung fehlgeschlagen.",
|
||||
"mobile.tab.channels": "Kanäle",
|
||||
"mobile.tab.chat": "Chat",
|
||||
"mobile.tab.info": "Info",
|
||||
"mobile.mic": "Mikro",
|
||||
"mobile.sound": "Ton",
|
||||
"mobile.leave": "Trennen",
|
||||
"mobile.talk": "Sprechen"
|
||||
}
|
||||
+10
-3
@@ -19,7 +19,7 @@
|
||||
"menu.help.about": "About WebSpeak3",
|
||||
"menu.help.github": "GitHub",
|
||||
"menu.help.changelog": "Changelog",
|
||||
"menu.help.translate": "Help translate (Weblate)",
|
||||
"menu.help.translate": "Help translate (GitHub)",
|
||||
"menu.extras.identities": "Identities",
|
||||
"menu.extras.contacts": "Contacts",
|
||||
"menu.extras.collectedUrls": "Collected URLs",
|
||||
@@ -408,7 +408,7 @@
|
||||
"app.language.fa": "فارسی (بتا)",
|
||||
"app.language.cs-CZ": "Čeština",
|
||||
"app.language.ru": "Русский (бета)",
|
||||
"app.language.helpTranslate": "Missing your language or spotted a wrong translation? Help out on Weblate →",
|
||||
"app.language.helpTranslate": "Missing your language or spotted a wrong translation? Here's how to help →",
|
||||
"app.serverBanner": "Show server banners",
|
||||
"app.serverBanner.hint": "The banner loads straight from the address the server admin set, and that host sees your IP address.",
|
||||
"app.chatImages": "Load images in chat",
|
||||
@@ -999,5 +999,12 @@
|
||||
"sync.error.pow_required": "Security check failed, please try again.",
|
||||
"sync.error.conflict": "Another device changed something in the meantime.",
|
||||
"sync.error.payload_too_large": "Too much data to sync (max. 1 MB).",
|
||||
"sync.error.generic": "Sync failed."
|
||||
"sync.error.generic": "Sync failed.",
|
||||
"mobile.tab.channels": "Channels",
|
||||
"mobile.tab.chat": "Chat",
|
||||
"mobile.tab.info": "Info",
|
||||
"mobile.mic": "Mic",
|
||||
"mobile.sound": "Sound",
|
||||
"mobile.leave": "Leave",
|
||||
"mobile.talk": "Talk"
|
||||
}
|
||||
+10
-3
@@ -19,7 +19,7 @@
|
||||
"menu.help.about": "درباره WebSpeak3",
|
||||
"menu.help.github": "گیتهاب",
|
||||
"menu.help.changelog": "تاریخچه تغییرات",
|
||||
"menu.help.translate": "کمک به ترجمه (Weblate)",
|
||||
"menu.help.translate": "کمک به ترجمه (GitHub)",
|
||||
"menu.extras.identities": "هویتها",
|
||||
"menu.extras.contacts": "مخاطبین",
|
||||
"menu.extras.collectedUrls": "لینکهای جمعآوریشده",
|
||||
@@ -408,7 +408,7 @@
|
||||
"app.language.fa": "فارسی (بتا)",
|
||||
"app.language.cs-CZ": "Čeština",
|
||||
"app.language.ru": "Русский (бета)",
|
||||
"app.language.helpTranslate": "زبان شما موجود نیست یا ترجمهای اشتباه دیدید؟ در Weblate کمک کنید →",
|
||||
"app.language.helpTranslate": "زبان شما موجود نیست یا ترجمهای اشتباه دیدید؟ روش کمک کردن →",
|
||||
"app.serverBanner": "نمایش بنر سرور",
|
||||
"app.serverBanner.hint": "بنر مستقیماً از نشانیای بارگیری میشود که مدیر سرور تعیین کرده است و آن میزبان نشانی IP شما را میبیند.",
|
||||
"app.chatImages": "بارگیری تصاویر در گفتگو",
|
||||
@@ -998,5 +998,12 @@
|
||||
"sync.error.pow_required": "بررسی امنیتی ناموفق بود، دوباره امتحان کن.",
|
||||
"sync.error.conflict": "دستگاه دیگری در این فاصله چیزی را تغییر داده است.",
|
||||
"sync.error.payload_too_large": "داده برای همگامسازی بیش از حد است (حداکثر ۱ مگابایت).",
|
||||
"sync.error.generic": "همگامسازی ناموفق بود."
|
||||
"sync.error.generic": "همگامسازی ناموفق بود.",
|
||||
"mobile.tab.channels": "کانالها",
|
||||
"mobile.tab.chat": "گفتگو",
|
||||
"mobile.tab.info": "اطلاعات",
|
||||
"mobile.mic": "میکروفون",
|
||||
"mobile.sound": "صدا",
|
||||
"mobile.leave": "خروج",
|
||||
"mobile.talk": "صحبت"
|
||||
}
|
||||
+10
-3
@@ -19,7 +19,7 @@
|
||||
"menu.help.about": "О WebSpeak3",
|
||||
"menu.help.github": "GitHub",
|
||||
"menu.help.changelog": "Список изменений",
|
||||
"menu.help.translate": "Помочь с переводом (Weblate)",
|
||||
"menu.help.translate": "Помочь с переводом (GitHub)",
|
||||
"menu.extras.identities": "Идентичности",
|
||||
"menu.extras.contacts": "Контакты",
|
||||
"menu.extras.collectedUrls": "Собранные ссылки",
|
||||
@@ -408,7 +408,7 @@
|
||||
"app.language.fa": "فارسی (بتا)",
|
||||
"app.language.cs-CZ": "Čeština",
|
||||
"app.language.ru": "Русский (бета)",
|
||||
"app.language.helpTranslate": "Нет вашего языка или нашли ошибку в переводе? Помогите на Weblate →",
|
||||
"app.language.helpTranslate": "Нет вашего языка или нашли ошибку в переводе? Как помочь →",
|
||||
"app.serverBanner": "Показывать баннеры серверов",
|
||||
"app.serverBanner.hint": "Баннер загружается напрямую с адреса, указанного администратором сервера, и этот хост видит ваш IP-адрес.",
|
||||
"app.chatImages": "Загружать изображения в чате",
|
||||
@@ -999,5 +999,12 @@
|
||||
"sync.error.pow_required": "Проверка безопасности не пройдена, попробуйте ещё раз.",
|
||||
"sync.error.conflict": "Тем временем что-то изменилось на другом устройстве.",
|
||||
"sync.error.payload_too_large": "Слишком много данных для синхронизации (макс. 1 МБ).",
|
||||
"sync.error.generic": "Ошибка синхронизации."
|
||||
"sync.error.generic": "Ошибка синхронизации.",
|
||||
"mobile.tab.channels": "Каналы",
|
||||
"mobile.tab.chat": "Чат",
|
||||
"mobile.tab.info": "Инфо",
|
||||
"mobile.mic": "Микрофон",
|
||||
"mobile.sound": "Звук",
|
||||
"mobile.leave": "Выйти",
|
||||
"mobile.talk": "Говорить"
|
||||
}
|
||||
@@ -302,7 +302,7 @@
|
||||
"app.language.fa": "فارسی (بتا)",
|
||||
"app.language.cs-CZ": "Čeština",
|
||||
"app.language.ru": "Русский (бета)",
|
||||
"app.language.helpTranslate": "没有你的语言,或发现翻译有误?欢迎到 Weblate 参与改进 →",
|
||||
"app.language.helpTranslate": "没有你的语言,或发现翻译有误?了解如何参与 →",
|
||||
"app.serverBanner": "显示服务器横幅",
|
||||
"app.serverBanner.hint": "横幅直接从服务器管理员设置的地址加载,该主机会看到你的 IP 地址。",
|
||||
"app.chatImages": "在聊天中加载图片",
|
||||
@@ -593,7 +593,7 @@
|
||||
"menu.help.about": "关于 WebSpeak3",
|
||||
"menu.help.github": "GitHub",
|
||||
"menu.help.changelog": "更新日志",
|
||||
"menu.help.translate": "参与翻译(Weblate)",
|
||||
"menu.help.translate": "参与翻译(GitHub)",
|
||||
"menu.extras.feedback": "发送反馈",
|
||||
"feedback.fab.nudge": "你觉得 WebSpeak3 怎么样?欢迎反馈!",
|
||||
"donate.label": "捐助",
|
||||
@@ -998,5 +998,12 @@
|
||||
"sync.error.pow_required": "安全检查失败,请重试。",
|
||||
"sync.error.conflict": "另一台设备在此期间做了更改。",
|
||||
"sync.error.payload_too_large": "同步数据过多(最多 1 MB)。",
|
||||
"sync.error.generic": "同步失败。"
|
||||
"sync.error.generic": "同步失败。",
|
||||
"mobile.tab.channels": "频道",
|
||||
"mobile.tab.chat": "聊天",
|
||||
"mobile.tab.info": "信息",
|
||||
"mobile.mic": "麦克风",
|
||||
"mobile.sound": "声音",
|
||||
"mobile.leave": "断开",
|
||||
"mobile.talk": "说话"
|
||||
}
|
||||
Reference in new issue
Block a user