xonecas.io
8058
Ir

irvc / commit f1da788

fix: default browser fontsize support

xonecas2026-10-12 f1da788b4e2d32a5010c1c8eba34c195de552303 parent 33d61b1

4 files changed

web/src/components/SettingsPanel.tsx+2−1
@@ -85,7 +85,8 @@ export default function SettingsPanel({
8585 value={settings.fontSize}
8686 onChange={(v) => update({ fontSize: v as FontSize })}
8787 options={[
88- { value: "default", label: "default" },
88+ { value: "normal", label: "normal" },
89+ { value: "default", label: "browser default" },
8990 { value: "large", label: "Help, I'm old" },
9091 ]}
9192 />
web/src/lib/settings.ts+5−2
@@ -1,6 +1,9 @@
11 import { useCallback, useEffect, useState } from "react";
22
3-export type FontSize = "default" | "large";
3+// "normal" is our own pinned 16px default. "default" means the browser's root
4+// font size, which the user may have changed. Old stored "default" values are
5+// intentionally left as-is (no migration).
6+export type FontSize = "default" | "normal" | "large";
47
58 export type AudioPresetName =
69 | "telephone"
@@ -35,7 +38,7 @@ export const defaultSettings: Settings = {
3538 deafened: false,
3639 gateThreshold: -60,
3740 joinSound: true,
38- fontSize: "default",
41+ fontSize: "normal",
3942 };
4043
4144 const key = "irvc.settings";
web/src/lib/voice.ts+2−2
@@ -260,11 +260,11 @@ export function useVoice(
260260 const sync = () =>
261261 setPeers([...room.remoteParticipants.values()].map((p) => p.name || p.identity));
262262 room.on(RoomEvent.ParticipantConnected, () => {
263- if (readyRef.current && settingsRef.current.joinSound) beep(660);
263+ if (readyRef.current && settingsRef.current.joinSound) beep(440);
264264 sync();
265265 });
266266 room.on(RoomEvent.ParticipantDisconnected, () => {
267- if (readyRef.current && settingsRef.current.joinSound) beep(440);
267+ if (readyRef.current && settingsRef.current.joinSound) beep(660);
268268 sync();
269269 });
270270 room.on(RoomEvent.ActiveSpeakersChanged, (speakers: Participant[]) =>
web/src/views/Chat.tsx+2−1
@@ -32,7 +32,8 @@ export default function Chat({ user, onLogout }: { user: User; onLogout: () => v
3232 const { mode, toggleMode, theme, setTheme } = useTheme();
3333
3434 useEffect(() => {
35- document.documentElement.style.fontSize = settings.fontSize === "large" ? "18px" : "";
35+ document.documentElement.style.fontSize =
36+ { default: "", normal: "16px", large: "18px" }[settings.fontSize];
3637 }, [settings.fontSize]);
3738
3839 useEffect(() => {