mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-03 01:42:50 +08:00
Options -> Chat: line counts as spin boxes like the native client
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
e76278c5b8
commit
977f5d2c3b
6 files changed
+38
-31
No files matched your search
+23
-16
@@ -6393,8 +6393,6 @@ function DownloadsPanel() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const CHAT_MAX_LINES_OPTIONS = [100, 200, 500, 1000, 2000];
|
|
||||||
const CHAT_RESTORE_OPTIONS = [10, 50, 100, 500];
|
|
||||||
const CHAT_FONTS = [
|
const CHAT_FONTS = [
|
||||||
"Arial",
|
"Arial",
|
||||||
"Verdana",
|
"Verdana",
|
||||||
@@ -6420,13 +6418,19 @@ function ChatPanel() {
|
|||||||
<input type="checkbox" checked={chat[key] > 0} onChange={(e) => set({ [key]: e.target.checked ? 100 : 0 })} />
|
<input type="checkbox" checked={chat[key] > 0} onChange={(e) => set({ [key]: e.target.checked ? 100 : 0 })} />
|
||||||
{t(`chatSettings.${key}`)}
|
{t(`chatSettings.${key}`)}
|
||||||
</label>
|
</label>
|
||||||
<select value={chat[key] || 100} disabled={chat[key] === 0} onChange={(e) => set({ [key]: Number(e.target.value) })}>
|
<span>
|
||||||
{CHAT_RESTORE_OPTIONS.map((n) => (
|
{t("chatSettings.last")}{" "}
|
||||||
<option key={n} value={n}>
|
<input
|
||||||
{t("chatSettings.lastLines", { count: String(n) })}
|
type="number"
|
||||||
</option>
|
min={1}
|
||||||
))}
|
max={1000}
|
||||||
</select>
|
className="ts-download-number"
|
||||||
|
value={chat[key] || 100}
|
||||||
|
disabled={chat[key] === 0}
|
||||||
|
onChange={(e) => set({ [key]: Math.min(1000, Math.max(1, Number(e.target.value) || 1)) })}
|
||||||
|
/>{" "}
|
||||||
|
{t("chatSettings.linesUnit")}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
@@ -6438,13 +6442,16 @@ function ChatPanel() {
|
|||||||
<legend>{t("chatSettings.window")}</legend>
|
<legend>{t("chatSettings.window")}</legend>
|
||||||
<label className="ts-options-field">
|
<label className="ts-options-field">
|
||||||
{t("chatSettings.maxLines")}
|
{t("chatSettings.maxLines")}
|
||||||
<select value={chat.maxLines} onChange={(e) => set({ maxLines: Number(e.target.value) })}>
|
<span>
|
||||||
{CHAT_MAX_LINES_OPTIONS.map((n) => (
|
<input
|
||||||
<option key={n} value={n}>
|
type="number"
|
||||||
{t("chatSettings.lines", { count: String(n) })}
|
min={10}
|
||||||
</option>
|
className="ts-download-number"
|
||||||
))}
|
value={chat.maxLines}
|
||||||
</select>
|
onChange={(e) => set({ maxLines: Math.max(10, Number(e.target.value) || 10) })}
|
||||||
|
/>{" "}
|
||||||
|
{t("chatSettings.linesUnit")}
|
||||||
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<div className="ts-chat-font-row">
|
<div className="ts-chat-font-row">
|
||||||
{t("chatSettings.font")}
|
{t("chatSettings.font")}
|
||||||
|
|||||||
@@ -777,7 +777,6 @@
|
|||||||
"chatSettings.subtitle": "Nastavení chatu",
|
"chatSettings.subtitle": "Nastavení chatu",
|
||||||
"chatSettings.window": "Okno chatu",
|
"chatSettings.window": "Okno chatu",
|
||||||
"chatSettings.maxLines": "Maximální počet řádků:",
|
"chatSettings.maxLines": "Maximální počet řádků:",
|
||||||
"chatSettings.lines": "{count} řádků",
|
|
||||||
"chatSettings.font": "Písmo:",
|
"chatSettings.font": "Písmo:",
|
||||||
"chatSettings.fontDefault": "Výchozí",
|
"chatSettings.fontDefault": "Výchozí",
|
||||||
"chatSettings.fontReset": "Obnovit písmo",
|
"chatSettings.fontReset": "Obnovit písmo",
|
||||||
@@ -790,9 +789,10 @@
|
|||||||
"chatSettings.restore": "Načíst protokoly",
|
"chatSettings.restore": "Načíst protokoly",
|
||||||
"chatSettings.restoreChannelLines": "Načíst protokoly chatu kanálu",
|
"chatSettings.restoreChannelLines": "Načíst protokoly chatu kanálu",
|
||||||
"chatSettings.restorePrivateLines": "Načíst protokoly soukromých chatů",
|
"chatSettings.restorePrivateLines": "Načíst protokoly soukromých chatů",
|
||||||
"chatSettings.lastLines": "posledních {count} řádků",
|
|
||||||
"chatSettings.notify": "Upozornění na příchozí zprávy",
|
"chatSettings.notify": "Upozornění na příchozí zprávy",
|
||||||
"chatSettings.notifyServer": "Server",
|
"chatSettings.notifyServer": "Server",
|
||||||
"chatSettings.notifyChannel": "Kanál",
|
"chatSettings.notifyChannel": "Kanál",
|
||||||
"chatSettings.notifyPrivate": "Soukromé"
|
"chatSettings.notifyPrivate": "Soukromé",
|
||||||
|
"chatSettings.linesUnit": "řádků",
|
||||||
|
"chatSettings.last": "posledních"
|
||||||
}
|
}
|
||||||
@@ -777,7 +777,6 @@
|
|||||||
"chatSettings.subtitle": "Chat Einstellungen",
|
"chatSettings.subtitle": "Chat Einstellungen",
|
||||||
"chatSettings.window": "Chat Fenster",
|
"chatSettings.window": "Chat Fenster",
|
||||||
"chatSettings.maxLines": "Maximale Anzahl an Zeilen:",
|
"chatSettings.maxLines": "Maximale Anzahl an Zeilen:",
|
||||||
"chatSettings.lines": "{count} Zeilen",
|
|
||||||
"chatSettings.font": "Schrift:",
|
"chatSettings.font": "Schrift:",
|
||||||
"chatSettings.fontDefault": "Standard",
|
"chatSettings.fontDefault": "Standard",
|
||||||
"chatSettings.fontReset": "Schrift zurücksetzen",
|
"chatSettings.fontReset": "Schrift zurücksetzen",
|
||||||
@@ -790,9 +789,10 @@
|
|||||||
"chatSettings.restore": "Protokolle aktualisieren",
|
"chatSettings.restore": "Protokolle aktualisieren",
|
||||||
"chatSettings.restoreChannelLines": "Channel Chat Protokolle aktualisieren",
|
"chatSettings.restoreChannelLines": "Channel Chat Protokolle aktualisieren",
|
||||||
"chatSettings.restorePrivateLines": "Private Chat Protokolle aktualisieren",
|
"chatSettings.restorePrivateLines": "Private Chat Protokolle aktualisieren",
|
||||||
"chatSettings.lastLines": "letzten {count} Zeilen",
|
|
||||||
"chatSettings.notify": "Hinweis für eingehende Nachrichten",
|
"chatSettings.notify": "Hinweis für eingehende Nachrichten",
|
||||||
"chatSettings.notifyServer": "Server",
|
"chatSettings.notifyServer": "Server",
|
||||||
"chatSettings.notifyChannel": "Channel",
|
"chatSettings.notifyChannel": "Channel",
|
||||||
"chatSettings.notifyPrivate": "Privat"
|
"chatSettings.notifyPrivate": "Privat",
|
||||||
|
"chatSettings.linesUnit": "Zeilen",
|
||||||
|
"chatSettings.last": "letzten"
|
||||||
}
|
}
|
||||||
@@ -777,7 +777,6 @@
|
|||||||
"chatSettings.subtitle": "Chat settings",
|
"chatSettings.subtitle": "Chat settings",
|
||||||
"chatSettings.window": "Chat window",
|
"chatSettings.window": "Chat window",
|
||||||
"chatSettings.maxLines": "Maximum number of lines:",
|
"chatSettings.maxLines": "Maximum number of lines:",
|
||||||
"chatSettings.lines": "{count} lines",
|
|
||||||
"chatSettings.font": "Font:",
|
"chatSettings.font": "Font:",
|
||||||
"chatSettings.fontDefault": "Default",
|
"chatSettings.fontDefault": "Default",
|
||||||
"chatSettings.fontReset": "Reset font",
|
"chatSettings.fontReset": "Reset font",
|
||||||
@@ -790,9 +789,10 @@
|
|||||||
"chatSettings.restore": "Reload logs",
|
"chatSettings.restore": "Reload logs",
|
||||||
"chatSettings.restoreChannelLines": "Reload channel chat logs",
|
"chatSettings.restoreChannelLines": "Reload channel chat logs",
|
||||||
"chatSettings.restorePrivateLines": "Reload private chat logs",
|
"chatSettings.restorePrivateLines": "Reload private chat logs",
|
||||||
"chatSettings.lastLines": "last {count} lines",
|
|
||||||
"chatSettings.notify": "Notify on incoming messages",
|
"chatSettings.notify": "Notify on incoming messages",
|
||||||
"chatSettings.notifyServer": "Server",
|
"chatSettings.notifyServer": "Server",
|
||||||
"chatSettings.notifyChannel": "Channel",
|
"chatSettings.notifyChannel": "Channel",
|
||||||
"chatSettings.notifyPrivate": "Private"
|
"chatSettings.notifyPrivate": "Private",
|
||||||
|
"chatSettings.linesUnit": "lines",
|
||||||
|
"chatSettings.last": "last"
|
||||||
}
|
}
|
||||||
@@ -776,7 +776,6 @@
|
|||||||
"chatSettings.subtitle": "تنظیمات چت",
|
"chatSettings.subtitle": "تنظیمات چت",
|
||||||
"chatSettings.window": "پنجره چت",
|
"chatSettings.window": "پنجره چت",
|
||||||
"chatSettings.maxLines": "حداکثر تعداد خطوط:",
|
"chatSettings.maxLines": "حداکثر تعداد خطوط:",
|
||||||
"chatSettings.lines": "{count} خط",
|
|
||||||
"chatSettings.font": "قلم:",
|
"chatSettings.font": "قلم:",
|
||||||
"chatSettings.fontDefault": "پیشفرض",
|
"chatSettings.fontDefault": "پیشفرض",
|
||||||
"chatSettings.fontReset": "بازنشانی قلم",
|
"chatSettings.fontReset": "بازنشانی قلم",
|
||||||
@@ -789,9 +788,10 @@
|
|||||||
"chatSettings.restore": "بارگذاری گزارشها",
|
"chatSettings.restore": "بارگذاری گزارشها",
|
||||||
"chatSettings.restoreChannelLines": "بارگذاری گزارش چت کانال",
|
"chatSettings.restoreChannelLines": "بارگذاری گزارش چت کانال",
|
||||||
"chatSettings.restorePrivateLines": "بارگذاری گزارش چت خصوصی",
|
"chatSettings.restorePrivateLines": "بارگذاری گزارش چت خصوصی",
|
||||||
"chatSettings.lastLines": "{count} خط آخر",
|
|
||||||
"chatSettings.notify": "اعلان برای پیامهای ورودی",
|
"chatSettings.notify": "اعلان برای پیامهای ورودی",
|
||||||
"chatSettings.notifyServer": "سرور",
|
"chatSettings.notifyServer": "سرور",
|
||||||
"chatSettings.notifyChannel": "کانال",
|
"chatSettings.notifyChannel": "کانال",
|
||||||
"chatSettings.notifyPrivate": "خصوصی"
|
"chatSettings.notifyPrivate": "خصوصی",
|
||||||
|
"chatSettings.linesUnit": "خط",
|
||||||
|
"chatSettings.last": "آخرین"
|
||||||
}
|
}
|
||||||
@@ -776,7 +776,6 @@
|
|||||||
"chatSettings.subtitle": "聊天设置",
|
"chatSettings.subtitle": "聊天设置",
|
||||||
"chatSettings.window": "聊天窗口",
|
"chatSettings.window": "聊天窗口",
|
||||||
"chatSettings.maxLines": "最大行数:",
|
"chatSettings.maxLines": "最大行数:",
|
||||||
"chatSettings.lines": "{count} 行",
|
|
||||||
"chatSettings.font": "字体:",
|
"chatSettings.font": "字体:",
|
||||||
"chatSettings.fontDefault": "默认",
|
"chatSettings.fontDefault": "默认",
|
||||||
"chatSettings.fontReset": "重置字体",
|
"chatSettings.fontReset": "重置字体",
|
||||||
@@ -789,9 +788,10 @@
|
|||||||
"chatSettings.restore": "加载记录",
|
"chatSettings.restore": "加载记录",
|
||||||
"chatSettings.restoreChannelLines": "加载频道聊天记录",
|
"chatSettings.restoreChannelLines": "加载频道聊天记录",
|
||||||
"chatSettings.restorePrivateLines": "加载私聊记录",
|
"chatSettings.restorePrivateLines": "加载私聊记录",
|
||||||
"chatSettings.lastLines": "最近 {count} 行",
|
|
||||||
"chatSettings.notify": "新消息提示",
|
"chatSettings.notify": "新消息提示",
|
||||||
"chatSettings.notifyServer": "服务器",
|
"chatSettings.notifyServer": "服务器",
|
||||||
"chatSettings.notifyChannel": "频道",
|
"chatSettings.notifyChannel": "频道",
|
||||||
"chatSettings.notifyPrivate": "私聊"
|
"chatSettings.notifyPrivate": "私聊",
|
||||||
|
"chatSettings.linesUnit": "行",
|
||||||
|
"chatSettings.last": "最近"
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user