Remove the GreenTeaSpeak theme; it is VoySpeak now

GreenTeaSpeak was renamed to VoySpeak with new colours, so the theme no
longer matches anything. The server tab strip that lived in the theme
module moves to ConnectionTabs. A saved GreenTeaSpeak pick or custom-theme
base falls back to Standard. Server-compat wording says VoySpeak.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
MoepchiandClaude Opus 5.5 committed 2026-10-25 20:45:15 +00:00
1 parent 9e61f21316
commit 999262b6df
16 files changed
+171 -1283

No files matched your search

+66 -3
View File
@@ -3610,9 +3610,6 @@ input.ts-identities-uid {
box-shadow: inset 0 0 0 1px #7fb0e8;
}
.ts-design-theme-swatch-greenteaspeak {
background: linear-gradient(135deg, #1f2329 40%, #6fbf5c 40%, #386896 70%, #c8b882 70%);
}
.ts-design-theme-swatch-pulse {
background: linear-gradient(135deg, oklch(0.22 0.02 285) 0%, oklch(0.15 0.03 290) 100%);
box-shadow: inset 0 0 0 1px #9d8cf0;
@@ -4936,3 +4933,69 @@ input.ts-identities-uid {
max-width: 100%;
height: auto;
}
/* Multi-join server tabs. No theme defines --bg-app/--bg-toolbar, so this
strip is always dark: 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 .gts-connection-tabs {
display: flex;
gap: 1px;
padding: 0 4px;
background: var(--bg-app, #1a1a1a);
border-bottom: 1px solid var(--border, #333);
height: 24px;
min-height: 24px;
align-items: stretch;
overflow: hidden;
flex-shrink: 0;
}
.ts-app .gts-connection-tab {
display: inline-flex;
align-items: center;
gap: 4px;
background: var(--bg-toolbar, #2a2a2a);
border: 1px solid var(--border, #444);
border-bottom: none;
color: #aaa;
padding: 0 4px 0 10px;
max-width: 280px;
height: 100%;
box-sizing: border-box;
font-size: 12px;
cursor: pointer;
user-select: none;
}
.ts-app .gts-connection-tab-active {
background: var(--bg-panel, #333);
color: #eee;
border-color: #b0b8c0;
}
.ts-app .gts-connection-tab-label {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 1;
min-width: 0;
}
.ts-app .gts-connection-tab-close {
flex-shrink: 0;
text-align: center;
width: 16px;
height: 16px;
padding: 0;
border: none;
background: transparent;
color: inherit;
font-size: 14px;
line-height: 1;
cursor: pointer;
opacity: 0.7;
}
.ts-app .gts-connection-tab-close:hover {
opacity: 1;
}
+16 -30
View File
@@ -232,10 +232,8 @@ import {
type ChatSettings,
} from "./chatlog";
import {
GREENTEASPEAK_THEME_ID,
GreenteaSpeakChrome,
isGreenteaSpeakTheme,
} from "./themes/greenteaspeak";
ConnectionTabs,
} from "./ConnectionTabs";
import { BARE_URL_REGEX, renderBbcode, wrapUrls } from "./lib/bbcode";
import { parseChannelName, spacerDisplayName } from "./lib/spacer";
import akimoPhoto from "./assets/akimo.jpg";
@@ -498,18 +496,18 @@ const CONTINUOUS_KEY = "webspeak3:continuous-transmission";
const TYPING_ATTENUATION_KEY = "webspeak3:typing-attenuation";
const PTT_BINDING_KEY = "webspeak3:ptt-key";
const DESIGN_THEME_KEY = "webspeak3:design-theme";
// The user's actual pick - "standard" | "nova" | "greenteaspeak" | "custom:<id>".
// The user's actual pick - "standard" | "nova" | "pulse" | "ide" | "custom:<id>".
// DESIGN_THEME_KEY above keeps tracking just the resolved structural base, since a
// couple of early call sites (e.g. the host-field default below) need that cheaply,
// before customThemes is loaded.
const DESIGN_SELECTION_KEY = "webspeak3:design-selection";
const CUSTOM_THEMES_KEY = "webspeak3:custom-themes";
type DesignTheme = "standard" | "nova" | "greenteaspeak" | "pulse" | "ide";
type DesignTheme = "standard" | "nova" | "pulse" | "ide";
/** A user-authored theme package: a name, which built-in layout it behaves like
* (Standard's plain chrome, Nova's collapsed menu/splash, GreenTeaSpeak shell,
* or Pulse's card/sidebar layout), and raw CSS that gets injected while it's
* (Standard's plain chrome, Nova's collapsed menu/splash, Pulse's card/sidebar
* layout or IDE), and raw CSS that gets injected while it's
* active - free-form, so it can restyle or even reflow the existing markup
* (e.g. via flex `order`, `display:none`, overlays). */
type CustomTheme = {
@@ -546,7 +544,7 @@ const STORE_SCREENSHOT_MAX_DATA_URL_LENGTH = 400_000;
function isDesignTheme(value: string): value is DesignTheme {
return (
value === "standard" || value === "nova" || value === "greenteaspeak" || value === "pulse" || value === "ide"
value === "standard" || value === "nova" || value === "pulse" || value === "ide"
);
}
@@ -558,7 +556,9 @@ function loadDesignTheme(): DesignTheme {
function resolveDesignThemeBase(selection: string, customThemes: CustomTheme[]): DesignTheme {
if (selection.startsWith("custom:")) {
return customThemes.find((th) => `custom:${th.id}` === selection)?.baseTheme ?? "standard";
// A removed base (e.g. the old GreenTeaSpeak theme) falls back to Standard.
const base = customThemes.find((th) => `custom:${th.id}` === selection)?.baseTheme;
return base && isDesignTheme(base) ? base : "standard";
}
return isDesignTheme(selection) ? selection : "standard";
}
@@ -567,13 +567,11 @@ function designThemeClassName(theme: DesignTheme): string {
if (theme === "nova") return " ts-design-nova";
if (theme === "pulse") return " ts-design-pulse";
if (theme === "ide") return " ts-design-ide";
if (isGreenteaSpeakTheme(theme)) return " ts-design-greenteaspeak";
return "";
}
function designThemeLabel(theme: DesignTheme, t: (key: string) => string): string {
if (theme === "nova") return t("design.theme.nova");
if (theme === "greenteaspeak") return t("design.theme.greenteaspeak");
if (theme === "pulse") return t("design.theme.pulse");
if (theme === "ide") return t("design.theme.ide");
return t("design.theme.standard");
@@ -603,7 +601,9 @@ function saveCustomThemes(list: CustomTheme[]) {
}
function loadDesignSelection(): string {
return localStorage.getItem(DESIGN_SELECTION_KEY) ?? loadDesignTheme();
const raw = localStorage.getItem(DESIGN_SELECTION_KEY);
// A removed builtin (e.g. "greenteaspeak") falls back to Standard.
return raw && (raw.startsWith("custom:") || isDesignTheme(raw)) ? raw : loadDesignTheme();
}
function loadBoolPref(key: string, fallback: boolean): boolean {
@@ -7467,11 +7467,6 @@ function DesignPanel({
const builtins: { id: DesignTheme; name: string; desc: string }[] = [
{ id: "standard", name: t("design.theme.standard"), desc: t("design.theme.standard.desc") },
{ id: "nova", name: t("design.theme.nova"), desc: t("design.theme.nova.desc") },
{
id: GREENTEASPEAK_THEME_ID,
name: t("design.theme.greenteaspeak"),
desc: t("design.theme.greenteaspeak.desc"),
},
{ id: "pulse", name: t("design.theme.pulse"), desc: t("design.theme.pulse.desc") },
{ id: "ide", name: t("design.theme.ide"), desc: t("design.theme.ide.desc") },
];
@@ -7562,7 +7557,6 @@ function DesignPanel({
>
<option value="standard">{t("design.theme.standard")}</option>
<option value="nova">{t("design.theme.nova")}</option>
<option value="greenteaspeak">{t("design.theme.greenteaspeak")}</option>
<option value="pulse">{t("design.theme.pulse")}</option>
<option value="ide">{t("design.theme.ide")}</option>
</select>
@@ -8920,7 +8914,7 @@ function AppInner() {
? customThemes.find((th) => `custom:${th.id}` === designSelection) ?? null
: null;
// Structural base - everywhere else in the app that branches on "nova" /
// "greenteaspeak" behavior keeps working unchanged, whether that behavior
// "pulse" behavior keeps working unchanged, whether that behavior
// came from picking the builtin directly or from a custom theme on top of it.
const designTheme: DesignTheme = resolveDesignThemeBase(designSelection, customThemes);
useEffect(() => setSoundStyle(designTheme === "ide" ? "ide" : "classic"), [designTheme]);
@@ -13150,14 +13144,6 @@ function AppInner() {
</span>
</div>
)}
{isGreenteaSpeakTheme(designTheme) && (
<div className="gts-toolbar-brand" title="GreenTeaSpeak">
<span className="gts-toolbar-brand-mark">GTS</span>
<span className="gts-toolbar-brand-name">
{connected ? serverName || host || "GreenTeaSpeak" : "GreenTeaSpeak"}
</span>
</div>
)}
<div className="ts-toolbar-icons">
<div className="ts-toolbar-away" ref={awayMenuRef}>
<button
@@ -13396,8 +13382,8 @@ function AppInner() {
</div>
{sessionTabs.length > 0 || isGreenteaSpeakTheme(designTheme) ? (
<GreenteaSpeakChrome
{sessionTabs.length > 0 ? (
<ConnectionTabs
tabs={sessionTabs}
activeTabId={activeSessionId}
onSelectTab={switchToSession}
+72
View File
@@ -0,0 +1,72 @@
import { useT } from "./i18n";
export type ConnectionTabItem = {
id: string;
label: string;
connected?: boolean;
connecting?: boolean;
};
/** Server tab strip for multi-join: one tab per open connection. */
export function ConnectionTabs({
tabs,
activeTabId,
onSelectTab,
onCloseTab,
}: {
tabs: ConnectionTabItem[];
activeTabId?: string | null;
onSelectTab?: (id: string) => void;
onCloseTab?: (id: string) => void;
}) {
const t = useT();
return (
<div
className="gts-connection-tabs"
role="tablist"
aria-label={t("tabs.connections")}
>
{tabs.map((tab) => {
const isActive = tab.id === (activeTabId ?? tabs[0]?.id);
return (
<div
key={tab.id}
role="tab"
aria-selected={isActive}
className={`gts-connection-tab${isActive ? " gts-connection-tab-active" : ""}${
tab.connecting ? " gts-connection-tab-connecting" : ""
}`}
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}
>
<span className="gts-connection-tab-label">{tab.label}</span>
{onCloseTab ? (
<span
className="gts-connection-tab-close"
aria-hidden="true"
title={t("tabs.disconnect")}
onClick={(e) => {
e.stopPropagation();
onCloseTab(tab.id);
}}
>
×
</span>
) : null}
</div>
);
})}
</div>
);
}
+1 -3
View File
@@ -70,7 +70,7 @@
"restartNotice.ack": "Rozumím",
"menu.extras.tos": "Podmínky používání",
"tos.title": "Podmínky používání pro client.webspeak3.de",
"tos.rule1": "This client is for private, non-commercial use of TeamSpeak/TeaSpeak/GreenTeaSpeak servers via browser.",
"tos.rule1": "This client is for private, non-commercial use of TeamSpeak/TeaSpeak/VoySpeak servers via browser.",
"tos.rule2": "Prohibited in particular: any criminal activity, harassment and hate speech, spam and flooding, disrupting service, and circumventing bans.",
"tos.rule3": "Violations may result in access being blocked without warning; serious cases may be reported to relevant authorities.",
"tos.rule4Pre": "For operational security and abuse detection, connections are logged (server address, server name, timestamp) and automatically deleted after 90 days – see",
@@ -298,8 +298,6 @@
"design.theme.standard.desc": "Původní vzhled WebSpeak3.",
"design.theme.nova": "Nova",
"design.theme.nova.desc": "Modernější tmavý vzhled se zaoblenými prvky.",
"design.theme.greenteaspeak": "GreenTeaSpeak",
"design.theme.greenteaspeak.desc": "Klasické rozvržení klienta GreenTeaSpeak s tmavými panely a zlatou lištou nabídky.",
"design.theme.pulse": "Pulse",
"design.theme.pulse.desc": "Rozvržení založené na kartách s navigační lištou a barevným zvýrazněním.",
"design.theme.ide": "Command Center",
+1 -3
View File
@@ -71,7 +71,7 @@
"restartNotice.ack": "Verstanden",
"menu.extras.tos": "Nutzungsbedingungen",
"tos.title": "Nutzungsbedingungen für client.webspeak3.de",
"tos.rule1": "Dieser Client dient der privaten, nicht-kommerziellen Nutzung von TeamSpeak-/TeaSpeak-/GreenTeaSpeak-Servern über den Browser.",
"tos.rule1": "Dieser Client dient der privaten, nicht-kommerziellen Nutzung von TeamSpeak-/TeaSpeak-/VoySpeak-Servern über den Browser.",
"tos.rule2": "Verboten sind insbesondere: Straftaten jeder Art, Belästigung und Hassrede, Spam und Flooding, Störung des Dienstes sowie die Umgehung von Sperren.",
"tos.rule3": "Bei Verstößen kann der Zugang ohne Vorwarnung gesperrt werden; schwerwiegende Fälle werden ggf. an die zuständigen Behörden gemeldet.",
"tos.rule4Pre": "Zur Betriebssicherheit und Missbrauchserkennung werden Verbindungen protokolliert (Serveradresse, Servername, Zeitpunkt) und nach 90 Tagen automatisch gelöscht – siehe ",
@@ -298,8 +298,6 @@
"design.theme.standard.desc": "Das originale WebSpeak3-Design.",
"design.theme.nova": "Nova",
"design.theme.nova.desc": "Moderneres, dunkles Design mit abgerundeten Elementen.",
"design.theme.greenteaspeak": "GreenTeaSpeak",
"design.theme.greenteaspeak.desc": "Klassisches GreenTeaSpeak-Client-Layout mit dunklen Panels und goldener Menüleiste.",
"design.theme.pulse": "Pulse",
"design.theme.pulse.desc": "Karten-Layout mit Breadcrumb-Leiste und farbigem Akzent.",
"design.theme.ide": "Command Center",
+1 -3
View File
@@ -70,7 +70,7 @@
"restartNotice.ack": "Got it",
"menu.extras.tos": "Terms of use",
"tos.title": "Terms of use for client.webspeak3.de",
"tos.rule1": "This client is for private, non-commercial use of TeamSpeak/TeaSpeak/GreenTeaSpeak servers via the browser.",
"tos.rule1": "This client is for private, non-commercial use of TeamSpeak/TeaSpeak/VoySpeak servers via the browser.",
"tos.rule2": "Prohibited in particular: any criminal activity, harassment and hate speech, spam and flooding, disrupting the service, and circumventing bans.",
"tos.rule3": "Violations may result in access being blocked without warning; serious cases may be reported to the relevant authorities.",
"tos.rule4Pre": "For operational security and abuse detection, connections are logged (server address, server name, timestamp) and automatically deleted after 90 days – see the ",
@@ -298,8 +298,6 @@
"design.theme.standard.desc": "The original WebSpeak3 design.",
"design.theme.nova": "Nova",
"design.theme.nova.desc": "A more modern, dark design with rounded elements.",
"design.theme.greenteaspeak": "GreenTeaSpeak",
"design.theme.greenteaspeak.desc": "Classic GreenTeaSpeak client layout with dark panels and a gold menu bar.",
"design.theme.pulse": "Pulse",
"design.theme.pulse.desc": "Card-based layout with a breadcrumb bar and a color accent.",
"design.theme.ide": "Command Center",
+1 -3
View File
@@ -70,7 +70,7 @@
"restartNotice.ack": "متوجه شدم",
"menu.extras.tos": "شرایط استفاده",
"tos.title": "شرایط استفاده از client.webspeak3.de",
"tos.rule1": "این کلاینت برای استفاده خصوصی و غیرتجاری از سرورهای TeamSpeak/TeaSpeak/GreenTeaSpeak از طریق مرورگر است.",
"tos.rule1": "این کلاینت برای استفاده خصوصی و غیرتجاری از سرورهای TeamSpeak/TeaSpeak/VoySpeak از طریق مرورگر است.",
"tos.rule2": "به‌طور خاص ممنوع است: هرگونه فعالیت مجرمانه، آزار و سخنان نفرت‌پراکنانه، اسپم و سیل پیام، ایجاد اختلال در سرویس، و دور زدن مسدودیت‌ها.",
"tos.rule3": "تخلفات ممکن است بدون هشدار منجر به مسدود شدن دسترسی شوند؛ در موارد جدی، گزارش به مراجع ذی‌صلاح نیز ممکن است.",
"tos.rule4Pre": "به‌منظور امنیت عملیاتی و شناسایی سوءاستفاده، اطلاعات اتصال (آدرس سرور، نام سرور، زمان اتصال) ثبت می‌شود و پس از ۹۰ روز به‌صورت خودکار حذف می‌شود - برای جزئیات به ",
@@ -298,8 +298,6 @@
"design.theme.standard.desc": "طراحی اصلی WebSpeak3.",
"design.theme.nova": "Nova",
"design.theme.nova.desc": "طراحی مدرن‌تر و تیره با عناصر گرد.",
"design.theme.greenteaspeak": "GreenTeaSpeak",
"design.theme.greenteaspeak.desc": "چیدمان کلاسیک کلاینت GreenTeaSpeak با پنل‌های تیره و نوار منوی طلایی.",
"design.theme.pulse": "Pulse",
"design.theme.pulse.desc": "چیدمان کارتی با نوار مسیر و رنگ تأکیدی.",
"design.theme.ide": "Command Center",
+1 -3
View File
@@ -237,8 +237,6 @@
"design.theme.standard.desc": "原始 WebSpeak3 设计。",
"design.theme.nova": "Nova",
"design.theme.nova.desc": "更现代的深色设计,带圆角元素。",
"design.theme.greenteaspeak": "GreenTeaSpeak",
"design.theme.greenteaspeak.desc": "经典 GreenTeaSpeak 客户端布局:深色面板与金色菜单栏。",
"design.theme.pulse": "Pulse",
"design.theme.pulse.desc": "卡片式布局,带面包屑栏和彩色强调。",
"design.theme.ide": "Command Center",
@@ -633,7 +631,7 @@
"restartNotice.ack": "知道了",
"menu.extras.tos": "使用条款",
"tos.title": "client.webspeak3.de 使用条款",
"tos.rule1": "本客户端仅供通过浏览器私人、非商业使用 TeamSpeak / TeaSpeak / GreenTeaSpeak 服务器。",
"tos.rule1": "本客户端仅供通过浏览器私人、非商业使用 TeamSpeak / TeaSpeak / VoySpeak 服务器。",
"tos.rule2": "尤其禁止:任何违法行为、骚扰与仇恨言论、垃圾信息与刷屏、干扰服务运行,以及规避封禁。",
"tos.rule3": "违规可能导致访问权限被无预警封禁;严重情况可能会上报相关部门。",
"tos.rule4Pre": "出于运行安全和滥用检测的目的,连接信息(服务器地址、服务器名称、连接时间)会被记录,并在 90 天后自动删除 —— 详见",
-1
View File
@@ -2,7 +2,6 @@ import './storageFallback'
import { StrictMode, useState, type FormEvent, type ReactNode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import './styles/greenteaspeak.css'
import './App.css'
import { LanguageProvider, useT } from './i18n'
import { discardVault, hasVault, unlockVault } from './vault'
File diff suppressed because it is too large. Load diff
@@ -1,98 +0,0 @@
import type { ReactNode } from "react";
import { useT } from "../../i18n";
export type ConnectionTabItem = {
id: string;
label: string;
connected?: boolean;
connecting?: boolean;
};
export type GreenteaSpeakChromeProps = {
/** @deprecated Prefer `tabs` + `activeTabId` for multi-join. */
connected?: boolean;
/** @deprecated Prefer `tabs`. */
serverName?: string;
tabs?: ConnectionTabItem[];
activeTabId?: string | null;
onSelectTab?: (id: string) => void;
onCloseTab?: (id: string) => void;
children?: ReactNode;
};
/**
* GTS branding chrome: connection-tab strip (multi-join) + brand label when empty.
* Renders children unchanged — WebSpeak keeps its own React state/handlers.
*/
export function GreenteaSpeakChrome({
connected,
serverName,
tabs,
activeTabId,
onSelectTab,
onCloseTab,
children,
}: GreenteaSpeakChromeProps) {
const resolvedTabs: ConnectionTabItem[] =
tabs ??
(connected
? [{ id: "legacy", label: (serverName ?? "").trim() || "GreenTeaSpeak", connected: true }]
: []);
const hasTabs = resolvedTabs.length > 0;
const t = useT();
return (
<>
{hasTabs ? (
<div className="gts-connection-tabs" role="tablist" aria-label={t("tabs.connections")}>
{resolvedTabs.map((tab) => {
const isActive = tab.id === (activeTabId ?? resolvedTabs[0]?.id);
return (
<div
key={tab.id}
role="tab"
aria-selected={isActive}
className={`gts-connection-tab${isActive ? " gts-connection-tab-active" : ""}${
tab.connecting ? " gts-connection-tab-connecting" : ""
}`}
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}
>
<span className="gts-connection-tab-label">{tab.label}</span>
{onCloseTab ? (
<span
className="gts-connection-tab-close"
aria-hidden="true"
title={t("tabs.disconnect")}
onClick={(e) => {
e.stopPropagation();
onCloseTab(tab.id);
}}
>
×
</span>
) : null}
</div>
);
})}
</div>
) : (
<div className="gts-connection-tabs gts-brand-strip">
<span className="gts-brand-label">GreenTeaSpeak</span>
</div>
)}
{children}
</>
);
}
@@ -1,56 +0,0 @@
/**
* Maps WebSpeak gateway WebSocket payloads to the shape the GreenTeaSpeak
* shell expects. The browser UI still uses App.tsx state; this module is the
* contract layer so GTS chrome never talks to Electron IPC.
*/
export type GatewayServerType = "auto" | "teamspeak" | "teaspeak";
export type GatewayConnectPayload = {
type: "connect";
host: string;
nickname: string;
serverPassword?: string;
channelPassword?: string;
defaultChannel?: string;
identity?: string;
privilegeKey?: string;
serverType?: GatewayServerType;
};
export type GatewayOutboundAction =
| GatewayConnectPayload
| { type: "disconnect" }
| { type: "switchChannel"; channelId: number }
| { type: "sendChat"; message: string; target?: "channel" | "server" | number }
| { type: string; [key: string]: unknown };
/** Build the connect message sent on the WebSpeak gateway socket. */
export function buildGatewayConnect(input: {
host: string;
nickname: string;
serverPassword?: string;
channelPassword?: string;
defaultChannel?: string;
identity?: string;
privilegeKey?: string;
serverType?: GatewayServerType;
}): GatewayConnectPayload {
return {
type: "connect",
host: input.host.trim(),
nickname: input.nickname.trim(),
serverPassword: input.serverPassword?.trim() || undefined,
channelPassword: input.channelPassword?.trim() || undefined,
defaultChannel: input.defaultChannel?.trim() || undefined,
identity: input.identity || undefined,
privilegeKey: input.privilegeKey?.trim() || undefined,
serverType: input.serverType || "auto",
};
}
export function sendGatewayAction(ws: WebSocket | null, action: GatewayOutboundAction): boolean {
if (!ws || ws.readyState !== WebSocket.OPEN) return false;
ws.send(JSON.stringify(action));
return true;
}
-19
View File
@@ -1,19 +0,0 @@
export const GREENTEASPEAK_THEME_ID = "greenteaspeak" as const;
export function isGreenteaSpeakTheme(theme: string): boolean {
return theme === GREENTEASPEAK_THEME_ID;
}
export {
GreenteaSpeakChrome,
type GreenteaSpeakChromeProps,
type ConnectionTabItem,
} from "./GreenteaSpeakChrome";
export {
buildGatewayConnect,
sendGatewayAction,
type GatewayConnectPayload,
type GatewayOutboundAction,
type GatewayServerType,
} from "./gatewayAdapter";