mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 00:42:49 +08:00
Give Command Center its own sounds and a pixel terminal font
Command Center now plays short synthesized blips instead of the default chimes, and every layout gets a mute toggle sound. The layout uses the self-hosted VT323 pixel font throughout; a design option switches back to the previous sans/mono mix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
1 parent
01faa6593c
commit
803cefd653
12 files changed
+260
-28
No files matched your search
+34
-1
@@ -132,6 +132,7 @@ import {
|
||||
loadSoundsEnabled,
|
||||
loadSoundsVolume,
|
||||
playSound,
|
||||
setSoundStyle,
|
||||
saveCustomSound,
|
||||
saveEventSoundEnabled,
|
||||
saveSoundsEnabled,
|
||||
@@ -565,6 +566,7 @@ const AWAY_PRESETS_KEY = "webspeak3:away-presets";
|
||||
/** "off" hides the server banner: it loads from whatever host the server
|
||||
* admin picked, which then sees the viewer's IP (review S12). */
|
||||
const SERVER_BANNER_KEY = "webspeak3:server-banner";
|
||||
const IDE_PIXEL_FONT_KEY = "webspeak3:ide-pixel-font";
|
||||
// Off by default: an inline chat image loads from whatever host the sender picked.
|
||||
const CHAT_IMAGES_KEY = "webspeak3:chat-images";
|
||||
const DISCONNECT_MESSAGE_KEY = "webspeak3:disconnect-message";
|
||||
@@ -5589,12 +5591,16 @@ function DesignPanel({
|
||||
customThemes,
|
||||
onSaveCustomTheme,
|
||||
onDeleteCustomTheme,
|
||||
idePixelFont,
|
||||
onIdePixelFontChange,
|
||||
}: {
|
||||
designSelection: string;
|
||||
onSelectionChange: (next: string) => void;
|
||||
customThemes: CustomTheme[];
|
||||
onSaveCustomTheme: (theme: CustomTheme) => void;
|
||||
onDeleteCustomTheme: (id: string) => void;
|
||||
idePixelFont: boolean;
|
||||
onIdePixelFontChange: (on: boolean) => void;
|
||||
}) {
|
||||
const t = useT();
|
||||
const [editing, setEditing] = useState<CustomThemeDraft | null>(null);
|
||||
@@ -5712,6 +5718,12 @@ function DesignPanel({
|
||||
<>
|
||||
<h3>{t("options.section.design")}</h3>
|
||||
<p className="ts-options-subtitle">{t("design.subtitle")}</p>
|
||||
{resolveDesignThemeBase(designSelection, customThemes) === "ide" && (
|
||||
<label className="ts-options-checkbox">
|
||||
<input type="checkbox" checked={idePixelFont} onChange={(e) => onIdePixelFontChange(e.target.checked)} />
|
||||
{t("design.idePixelFont")}
|
||||
</label>
|
||||
)}
|
||||
<div className="ts-design-theme-grid">
|
||||
{builtins.map((th) => (
|
||||
<button
|
||||
@@ -6347,6 +6359,8 @@ function OptionsDialog({
|
||||
customThemes,
|
||||
onSaveCustomTheme,
|
||||
onDeleteCustomTheme,
|
||||
idePixelFont,
|
||||
onIdePixelFontChange,
|
||||
showServerBanner,
|
||||
onShowServerBannerChange,
|
||||
chatImages,
|
||||
@@ -6361,6 +6375,8 @@ function OptionsDialog({
|
||||
customThemes: CustomTheme[];
|
||||
onSaveCustomTheme: (theme: CustomTheme) => void;
|
||||
onDeleteCustomTheme: (id: string) => void;
|
||||
idePixelFont: boolean;
|
||||
onIdePixelFontChange: (on: boolean) => void;
|
||||
showServerBanner: boolean;
|
||||
onShowServerBannerChange: (on: boolean) => void;
|
||||
chatImages: boolean;
|
||||
@@ -6412,6 +6428,8 @@ function OptionsDialog({
|
||||
customThemes={customThemes}
|
||||
onSaveCustomTheme={onSaveCustomTheme}
|
||||
onDeleteCustomTheme={onDeleteCustomTheme}
|
||||
idePixelFont={idePixelFont}
|
||||
onIdePixelFontChange={onIdePixelFontChange}
|
||||
/>
|
||||
) : active.id === "nachrichten" ? (
|
||||
<NachrichtenPanel />
|
||||
@@ -6749,6 +6767,7 @@ function AppInner() {
|
||||
const [serverLicenseId, setServerLicenseId] = useState(0);
|
||||
const [serverBannerUrl, setServerBannerUrl] = useState("");
|
||||
const [showServerBanner, setShowServerBanner] = useState(() => localStorage.getItem(SERVER_BANNER_KEY) !== "off");
|
||||
const [idePixelFont, setIdePixelFont] = useState(() => localStorage.getItem(IDE_PIXEL_FONT_KEY) !== "off");
|
||||
const [chatImages, setChatImages] = useState(() => localStorage.getItem(CHAT_IMAGES_KEY) === "on");
|
||||
const [serverWelcomeMessage, setServerWelcomeMessage] = useState("");
|
||||
const [serverEditOpen, setServerEditOpen] = useState(false);
|
||||
@@ -6849,6 +6868,7 @@ function AppInner() {
|
||||
// "greenteaspeak" 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]);
|
||||
const handleDesignSelectionChange = (next: string) => {
|
||||
setDesignSelection(next);
|
||||
localStorage.setItem(DESIGN_SELECTION_KEY, next);
|
||||
@@ -8872,6 +8892,7 @@ function AppInner() {
|
||||
return;
|
||||
}
|
||||
socketRef.current?.send(JSON.stringify({ type: "setInputMuted", muted: !inputMutedRef.current }));
|
||||
void playSound("mute");
|
||||
};
|
||||
|
||||
// Enable the mic automatically on page load (voice activation still gates
|
||||
@@ -9002,6 +9023,7 @@ function AppInner() {
|
||||
|
||||
const handleToggleOutputMuted = () => {
|
||||
socketRef.current?.send(JSON.stringify({ type: "setOutputMuted", muted: !outputMutedRef.current }));
|
||||
void playSound("mute");
|
||||
};
|
||||
|
||||
// Connects the current mic (if any) into the active recording, so a device
|
||||
@@ -9963,7 +9985,9 @@ 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" : ""}${novaSplash ? " ts-nova-splash" : ""}${
|
||||
designTheme === "ide" && !idePixelFont ? " ts-ide-plain-font" : ""
|
||||
}`}
|
||||
data-custom-theme={activeCustomTheme?.id}
|
||||
data-design-theme={designTheme}
|
||||
>
|
||||
@@ -11077,6 +11101,15 @@ function AppInner() {
|
||||
customThemes={customThemes}
|
||||
onSaveCustomTheme={handleSaveCustomTheme}
|
||||
onDeleteCustomTheme={handleDeleteCustomTheme}
|
||||
idePixelFont={idePixelFont}
|
||||
onIdePixelFontChange={(on) => {
|
||||
setIdePixelFont(on);
|
||||
try {
|
||||
localStorage.setItem(IDE_PIXEL_FONT_KEY, on ? "on" : "off");
|
||||
} catch {
|
||||
/* private mode: setting just doesn't persist */
|
||||
}
|
||||
}}
|
||||
showServerBanner={showServerBanner}
|
||||
onShowServerBannerChange={(on) => {
|
||||
setShowServerBanner(on);
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
Copyright 2011, The VT323 Project Authors (peter.hull@oikoi.com)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
Binary file not shown.
Binary file not shown.
@@ -278,6 +278,7 @@
|
||||
"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",
|
||||
"design.theme.ide.desc": "Technické, ploché rozvržení ve stylu IDE pro pokročilé uživatele.",
|
||||
"design.idePixelFont": "Pixelové terminálové písmo",
|
||||
"design.status.connected": "Připojeno",
|
||||
"design.custom.new": "+ Nový vzhled",
|
||||
"design.custom.import": "Importovat vzhled",
|
||||
@@ -647,6 +648,7 @@
|
||||
"sounds.event.clientLeave": "Klient odejde",
|
||||
"sounds.event.message": "Přijata zpráva",
|
||||
"sounds.event.poke": "Přijato šťouchnutí",
|
||||
"sounds.event.mute": "Přepnutí ztlumení",
|
||||
"sounds.default": "Výchozí",
|
||||
"sounds.custom": "Vlastní soubor: {name}",
|
||||
"sounds.test": "▶ Test",
|
||||
|
||||
@@ -278,6 +278,7 @@
|
||||
"design.theme.pulse.desc": "Karten-Layout mit Breadcrumb-Leiste und farbigem Akzent.",
|
||||
"design.theme.ide": "Command Center",
|
||||
"design.theme.ide.desc": "Technisches, flaches Layout im IDE-Stil für Power-User.",
|
||||
"design.idePixelFont": "Pixel-Terminal-Schrift",
|
||||
"design.status.connected": "Verbunden",
|
||||
"design.custom.new": "+ Neues Design",
|
||||
"design.custom.import": "Design importieren",
|
||||
@@ -647,6 +648,7 @@
|
||||
"sounds.event.clientLeave": "Client geht",
|
||||
"sounds.event.message": "Nachricht empfangen",
|
||||
"sounds.event.poke": "Anstupsen erhalten",
|
||||
"sounds.event.mute": "Stummschaltung umgeschaltet",
|
||||
"sounds.default": "Standard",
|
||||
"sounds.custom": "Eigene Datei: {name}",
|
||||
"sounds.test": "▶ Testen",
|
||||
|
||||
@@ -278,6 +278,7 @@
|
||||
"design.theme.pulse.desc": "Card-based layout with a breadcrumb bar and a color accent.",
|
||||
"design.theme.ide": "Command Center",
|
||||
"design.theme.ide.desc": "A technical, flat IDE-style layout for power users.",
|
||||
"design.idePixelFont": "Pixel terminal font",
|
||||
"design.status.connected": "Connected",
|
||||
"design.custom.new": "+ New design",
|
||||
"design.custom.import": "Import design",
|
||||
@@ -647,6 +648,7 @@
|
||||
"sounds.event.clientLeave": "Client leaves",
|
||||
"sounds.event.message": "Message received",
|
||||
"sounds.event.poke": "Poke received",
|
||||
"sounds.event.mute": "Mute toggled",
|
||||
"sounds.default": "Default",
|
||||
"sounds.custom": "Custom file: {name}",
|
||||
"sounds.test": "▶ Test",
|
||||
|
||||
@@ -278,6 +278,7 @@
|
||||
"design.theme.pulse.desc": "چیدمان کارتی با نوار مسیر و رنگ تأکیدی.",
|
||||
"design.theme.ide": "Command Center",
|
||||
"design.theme.ide.desc": "چیدمانی فنی و تخت به سبک IDE برای کاربران حرفهای.",
|
||||
"design.idePixelFont": "فونت پیکسلی ترمینال",
|
||||
"design.status.connected": "متصل",
|
||||
"design.custom.new": "+ طراحی جدید",
|
||||
"design.custom.import": "وارد کردن طراحی",
|
||||
@@ -646,6 +647,7 @@
|
||||
"sounds.event.clientLeave": "خروج کاربر",
|
||||
"sounds.event.message": "پیام دریافت شد",
|
||||
"sounds.event.poke": "سقلمه دریافت شد",
|
||||
"sounds.event.mute": "تغییر حالت بیصدا",
|
||||
"sounds.default": "پیشفرض",
|
||||
"sounds.custom": "فایل سفارشی: {name}",
|
||||
"sounds.test": "▶ آزمایش",
|
||||
|
||||
@@ -225,6 +225,7 @@
|
||||
"design.theme.pulse.desc": "卡片式布局,带面包屑栏和彩色强调。",
|
||||
"design.theme.ide": "Command Center",
|
||||
"design.theme.ide.desc": "面向高级用户的扁平化 IDE 风格技术布局。",
|
||||
"design.idePixelFont": "像素终端字体",
|
||||
"design.status.connected": "已连接",
|
||||
"options.section.erweiterungen": "扩展",
|
||||
"options.section.hotkeys": "快捷键",
|
||||
@@ -501,6 +502,7 @@
|
||||
"sounds.event.clientLeave": "用户离开",
|
||||
"sounds.event.message": "收到消息",
|
||||
"sounds.event.poke": "收到戳一戳",
|
||||
"sounds.event.mute": "切换静音",
|
||||
"sounds.default": "默认",
|
||||
"sounds.custom": "自定义文件:{name}",
|
||||
"sounds.test": "▶ 测试",
|
||||
|
||||
@@ -23,6 +23,7 @@ const EVENT_KEYWORDS: Record<SoundEventId, string[]> = {
|
||||
clientLeave: ["userleftchannel", "userleftvisibility", "clientleftview", "userleave", "userleft", "leave"],
|
||||
message: ["textmessagereceived", "chatmessage", "newmessage", "message"],
|
||||
poke: ["gotpoked", "poke"],
|
||||
mute: ["micmuted", "microphonemuted", "micactivated", "microphoneactivated"],
|
||||
};
|
||||
|
||||
function normalize(filename: string): string {
|
||||
|
||||
+62
-10
@@ -1,6 +1,14 @@
|
||||
export type SoundEventId = "connect" | "disconnect" | "clientJoin" | "clientLeave" | "message" | "poke";
|
||||
export type SoundEventId = "connect" | "disconnect" | "clientJoin" | "clientLeave" | "message" | "poke" | "mute";
|
||||
|
||||
export const SOUND_EVENTS: SoundEventId[] = ["connect", "disconnect", "clientJoin", "clientLeave", "message", "poke"];
|
||||
export const SOUND_EVENTS: SoundEventId[] = ["connect", "disconnect", "clientJoin", "clientLeave", "message", "poke", "mute"];
|
||||
|
||||
/** "ide" swaps the default chimes for synthetic terminal blips (Command Center layout). */
|
||||
type SoundStyle = "classic" | "ide";
|
||||
let soundStyle: SoundStyle = "classic";
|
||||
|
||||
export function setSoundStyle(style: SoundStyle): void {
|
||||
soundStyle = style;
|
||||
}
|
||||
|
||||
const ENABLED_KEY = "webspeak3:sounds-enabled";
|
||||
const VOLUME_KEY = "webspeak3:sounds-volume";
|
||||
@@ -141,8 +149,8 @@ class NotificationSoundPlayer {
|
||||
const { context, destination } = this.ensure();
|
||||
if (context.state === "suspended") context.resume().catch(() => {});
|
||||
const now = context.currentTime;
|
||||
for (const note of synthNotes(event)) {
|
||||
this.playNote(context, destination, now + note.delay, note.freq, note.duration, volume * note.gain);
|
||||
for (const note of soundStyle === "ide" ? ideNotes(event) : synthNotes(event)) {
|
||||
this.playNote(context, destination, now + note.delay, volume * note.gain, note);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,13 +158,13 @@ class NotificationSoundPlayer {
|
||||
context: AudioContext,
|
||||
destination: AudioNode,
|
||||
startTime: number,
|
||||
freq: number,
|
||||
duration: number,
|
||||
peakGain: number
|
||||
peakGain: number,
|
||||
{ freq, endFreq, duration, type = "sine" }: SynthNote
|
||||
): void {
|
||||
const osc = context.createOscillator();
|
||||
osc.type = "sine";
|
||||
osc.frequency.value = freq;
|
||||
osc.type = type;
|
||||
osc.frequency.setValueAtTime(freq, startTime);
|
||||
if (endFreq) osc.frequency.exponentialRampToValueAtTime(endFreq, startTime + duration);
|
||||
const gain = context.createGain();
|
||||
gain.gain.setValueAtTime(0, startTime);
|
||||
gain.gain.linearRampToValueAtTime(peakGain, startTime + 0.02);
|
||||
@@ -169,7 +177,17 @@ class NotificationSoundPlayer {
|
||||
|
||||
/** Soft, modern two/three-note chimes - a sine-wave, quick-attack/exponential-decay
|
||||
* shape reads as gentle rather than the harsh square/saw beeps of classic UI sounds. */
|
||||
function synthNotes(event: SoundEventId): { delay: number; freq: number; duration: number; gain: number }[] {
|
||||
interface SynthNote {
|
||||
delay: number;
|
||||
freq: number;
|
||||
/** Glide to this frequency over the note's duration. */
|
||||
endFreq?: number;
|
||||
duration: number;
|
||||
gain: number;
|
||||
type?: OscillatorType;
|
||||
}
|
||||
|
||||
function synthNotes(event: SoundEventId): SynthNote[] {
|
||||
switch (event) {
|
||||
case "connect":
|
||||
return [
|
||||
@@ -195,6 +213,40 @@ function synthNotes(event: SoundEventId): { delay: number; freq: number; duratio
|
||||
{ delay: 0, freq: 987.77, duration: 0.1, gain: 0.5 },
|
||||
{ delay: 0.12, freq: 987.77, duration: 0.1, gain: 0.5 },
|
||||
];
|
||||
case "mute":
|
||||
return [{ delay: 0, freq: 660, duration: 0.06, gain: 0.3 }];
|
||||
}
|
||||
}
|
||||
|
||||
/** Command Center: short, dry, synthetic blips - square/triangle clicks and
|
||||
* quick arpeggios instead of soft chimes. Square waves are loud, so lower gains. */
|
||||
function ideNotes(event: SoundEventId): SynthNote[] {
|
||||
switch (event) {
|
||||
case "connect":
|
||||
return [
|
||||
{ delay: 0, freq: 440, duration: 0.1, gain: 0.3 },
|
||||
{ delay: 0.1, freq: 554.37, duration: 0.1, gain: 0.3 },
|
||||
{ delay: 0.2, freq: 659.25, duration: 0.14, gain: 0.3 },
|
||||
];
|
||||
case "disconnect":
|
||||
return [{ delay: 0, freq: 200, endFreq: 50, duration: 0.2, gain: 0.45, type: "triangle" }];
|
||||
case "clientJoin":
|
||||
return [
|
||||
{ delay: 0, freq: 800, duration: 0.07, gain: 0.18 },
|
||||
{ delay: 0.1, freq: 800, duration: 0.07, gain: 0.18 },
|
||||
];
|
||||
case "clientLeave":
|
||||
return [{ delay: 0, freq: 600, endFreq: 400, duration: 0.09, gain: 0.18 }];
|
||||
case "message":
|
||||
return [{ delay: 0, freq: 1200, duration: 0.04, gain: 0.12, type: "square" }];
|
||||
case "poke":
|
||||
return [
|
||||
{ delay: 0, freq: 1000, duration: 0.05, gain: 0.12, type: "square" },
|
||||
{ delay: 0.08, freq: 1000, duration: 0.05, gain: 0.12, type: "square" },
|
||||
{ delay: 0.16, freq: 1000, duration: 0.05, gain: 0.12, type: "square" },
|
||||
];
|
||||
case "mute":
|
||||
return [{ delay: 0, freq: 300, endFreq: 50, duration: 0.04, gain: 0.15, type: "square" }];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+60
-17
@@ -5,13 +5,36 @@
|
||||
without !important. Imported right after App.css in App.tsx - the order
|
||||
matters for the zero-specificity block. */
|
||||
|
||||
/* Pixel terminal font, self-hosted (OFL) so no visitor IP goes to Google Fonts.
|
||||
The file only downloads once an element actually uses it. */
|
||||
@font-face {
|
||||
font-family: "VT323";
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url("../assets/fonts/vt323-latin.woff2") format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "VT323";
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url("../assets/fonts/vt323-latin-ext.woff2") format("woff2");
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
:where(.ts-app.ts-design-ide) {
|
||||
--ide-mono: "Fira Code", "JetBrains Mono", Consolas, ui-monospace, monospace;
|
||||
/* VT323 has no bold cut; faux-bold smears the pixels. */
|
||||
font-synthesis-weight: none;
|
||||
--ide-mono: VT323, "Fira Code", "JetBrains Mono", Consolas, ui-monospace, monospace;
|
||||
--ide-font: var(--ide-mono);
|
||||
--ide-panel: #18181b;
|
||||
--ide-faint: #71717a;
|
||||
--ide-accent-bg: rgba(16, 185, 129, 0.1);
|
||||
|
||||
font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
||||
font-family: var(--ide-font);
|
||||
/* VT323 has a tiny x-height and narrow glyphs: scale it up and space it out. */
|
||||
font-size-adjust: 0.55;
|
||||
letter-spacing: 0.05em;
|
||||
font-size: 13px;
|
||||
|
||||
--bg: #09090b;
|
||||
@@ -56,6 +79,26 @@
|
||||
outline-offset: -1px;
|
||||
}
|
||||
|
||||
/* Terminal font everywhere, beating base rules that pick their own family */
|
||||
.ts-app.ts-design-ide:not(.ts-ide-plain-font) :is(*, *::before, *::after) {
|
||||
font-family: var(--ide-font);
|
||||
}
|
||||
|
||||
/* Pixel font switched off in the design options: sans UI, regular mono for the terminal bits */
|
||||
.ts-app.ts-design-ide.ts-ide-plain-font {
|
||||
--ide-mono: "Fira Code", "JetBrains Mono", Consolas, ui-monospace, monospace;
|
||||
--ide-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
||||
font-size-adjust: none;
|
||||
letter-spacing: normal;
|
||||
font-synthesis-weight: auto;
|
||||
}
|
||||
|
||||
/* Form controls reset size adjust and spacing in the UA sheet instead of inheriting them */
|
||||
.ts-app.ts-design-ide :is(button, input, select, textarea) {
|
||||
font-size-adjust: inherit;
|
||||
letter-spacing: inherit;
|
||||
}
|
||||
|
||||
/* ---------- Header: menubar + toolbar + connection tabs ---------- */
|
||||
|
||||
/* No own row for the menubar: the hamburger floats into the toolbar row */
|
||||
@@ -98,9 +141,9 @@
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .gts-connection-tabs {
|
||||
font-family: var(--ide-mono);
|
||||
background: var(--bg);
|
||||
border-bottom: 1px solid var(--border);
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@@ -144,19 +187,19 @@
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-tree-panel {
|
||||
font-family: var(--ide-mono);
|
||||
grid-column: 1;
|
||||
overflow-x: hidden;
|
||||
min-width: 16rem;
|
||||
padding: 0 0 0.5rem;
|
||||
border-right: 1px solid var(--border);
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-side-panel {
|
||||
font-family: var(--ide-mono);
|
||||
grid-column: 3;
|
||||
border-left: 1px solid var(--border);
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
@@ -169,6 +212,7 @@
|
||||
/* Section headers like an IDE side bar */
|
||||
.ts-app.ts-design-ide .ts-tree-panel::before,
|
||||
.ts-app.ts-design-ide .ts-side-panel::before {
|
||||
font-family: var(--ide-mono);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
@@ -176,7 +220,6 @@
|
||||
padding: 0 1rem;
|
||||
margin-bottom: 0.4rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.15em;
|
||||
@@ -326,15 +369,16 @@
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-info-connection-link {
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--accent);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
/* ---------- Center: breadcrumb, voice grid, terminal ---------- */
|
||||
|
||||
.ts-app.ts-design-ide .ts-ide-breadcrumb {
|
||||
font-family: var(--ide-mono);
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -342,7 +386,6 @@
|
||||
height: 2rem;
|
||||
padding: 0 1rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 12px;
|
||||
color: var(--ide-faint);
|
||||
}
|
||||
@@ -397,6 +440,7 @@
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-speaking-now-avatar {
|
||||
font-family: var(--ide-mono);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -407,7 +451,6 @@
|
||||
border-radius: 4px;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--bg);
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #fff;
|
||||
@@ -492,11 +535,11 @@
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-speaking-now-group {
|
||||
font-family: var(--ide-mono);
|
||||
padding: 0 0.25rem;
|
||||
border: 1px solid var(--group-color);
|
||||
background: color-mix(in srgb, var(--group-color) 10%, transparent);
|
||||
color: color-mix(in srgb, var(--group-color) 75%, #fff);
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 9px;
|
||||
line-height: 1.5;
|
||||
text-transform: uppercase;
|
||||
@@ -518,11 +561,11 @@
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-speaking-now-status {
|
||||
font-family: var(--ide-mono);
|
||||
margin-top: 0.375rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 11px;
|
||||
color: var(--ide-faint);
|
||||
}
|
||||
@@ -542,22 +585,22 @@
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-chat-messages {
|
||||
font-family: var(--ide-mono);
|
||||
order: 2;
|
||||
padding: 1rem;
|
||||
background: var(--ide-panel);
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 12px;
|
||||
line-height: 1.6;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-chat-tab {
|
||||
font-family: var(--ide-mono);
|
||||
padding: 0 0 0.5rem;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-radius: 0;
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 11px;
|
||||
font-weight: 400;
|
||||
letter-spacing: 0.08em;
|
||||
@@ -595,13 +638,13 @@
|
||||
|
||||
/* Prompt-style input */
|
||||
.ts-app.ts-design-ide .ts-chat-input-row {
|
||||
font-family: var(--ide-mono);
|
||||
order: 3;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.3rem 1rem;
|
||||
background: var(--bg);
|
||||
border-top: 1px solid var(--border);
|
||||
font-family: var(--ide-mono);
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-chat-input-row::before {
|
||||
@@ -614,30 +657,30 @@
|
||||
|
||||
.ts-app.ts-design-ide .ts-chat-input-row textarea,
|
||||
.ts-app.ts-design-ide .ts-chat-input-row input {
|
||||
font-family: var(--ide-mono);
|
||||
background: transparent;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 12px;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-chat-input-row button,
|
||||
.ts-app.ts-design-ide .ts-dialog button:not(.ts-icon-button) {
|
||||
letter-spacing: 0.05em;
|
||||
border-radius: 4px;
|
||||
border: 1px solid var(--border);
|
||||
box-shadow: none;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.05em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
/* Client log strip at the very bottom */
|
||||
.ts-app.ts-design-ide > .ts-log {
|
||||
font-family: var(--ide-mono);
|
||||
background: var(--bg);
|
||||
border-top: 1px solid var(--border);
|
||||
font-family: var(--ide-mono);
|
||||
}
|
||||
|
||||
/* Narrow screens: stack instead of three columns */
|
||||
|
||||
Reference in new issue
Block a user