diff --git a/frontend/src/pages/settings/GeneralTab.tsx b/frontend/src/pages/settings/GeneralTab.tsx index 87817cf9a..765d04af3 100644 --- a/frontend/src/pages/settings/GeneralTab.tsx +++ b/frontend/src/pages/settings/GeneralTab.tsx @@ -210,6 +210,11 @@ export default function GeneralTab({ allSetting, updateSetting }: GeneralTabProp onChange={(v) => updateSetting({ pageSize: Number(v) || 0 })} /> + + updateSetting({ restartXrayOnClientDisable: v })} /> + + updateSetting({ subThemeDir: e.target.value })} /> diff --git a/frontend/src/pages/settings/TelegramTab.tsx b/frontend/src/pages/settings/TelegramTab.tsx index 800d94368..c3d61da81 100644 --- a/frontend/src/pages/settings/TelegramTab.tsx +++ b/frontend/src/pages/settings/TelegramTab.tsx @@ -1,6 +1,6 @@ -import { useMemo } from 'react'; +import { useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { Input, InputNumber, Select, Switch, Tabs } from 'antd'; +import { Input, InputNumber, Select, Space, Switch, Tabs } from 'antd'; import { BellOutlined, SettingOutlined } from '@ant-design/icons'; import { LanguageManager } from '@/utils'; import type { AllSetting } from '@/models/setting'; @@ -13,6 +13,134 @@ interface TelegramTabProps { updateSetting: (patch: Partial) => void; } +// The notification schedule is fed straight to robfig/cron's AddJob (see +// web.go startTask), which accepts @every , the @hourly/@daily/... +// macros, and full crontab expressions. This builder covers the common cases +// with dropdowns so users don't have to memorise the syntax, while "Custom" +// preserves the raw crontab escape hatch. +type Unit = 's' | 'm' | 'h'; +type Macro = '@hourly' | '@daily' | '@weekly' | '@monthly'; +type Mode = 'every' | Macro | 'custom'; +const MACROS: Macro[] = ['@hourly', '@daily', '@weekly', '@monthly']; +const EVERY_RE = /^@every\s+(\d+)\s*([smh])$/i; + +interface RunTime { + mode: Mode; + num: number; + unit: Unit; + custom: string; +} + +function parseRunTime(raw: string): RunTime { + const v = (raw ?? '').trim(); + const m = v.match(EVERY_RE); + if (m) { + return { mode: 'every', num: Math.max(1, Number(m[1]) || 1), unit: m[2].toLowerCase() as Unit, custom: '' }; + } + if ((MACROS as string[]).includes(v)) { + return { mode: v as Macro, num: 1, unit: 'h', custom: '' }; + } + return { mode: 'custom', num: 1, unit: 'h', custom: v }; +} + +function composeRunTime(s: RunTime): string { + if (s.mode === 'every') return `@every ${Math.max(1, s.num || 1)}${s.unit}`; + if (s.mode === 'custom') return s.custom; + return s.mode; +} + +// The panel's cron runs with seconds enabled (cron.WithSeconds() in web.go), so +// crontab expressions are 6-field: "second minute hour day month weekday". When +// the user drops into Custom we seed the box with the crontab equivalent of the +// current selection rather than a bare @macro, so they get a real expression to +// edit (and one that the 6-field parser accepts). +function toCrontab(s: RunTime): string { + switch (s.mode) { + case '@hourly': return '0 0 * * * *'; + case '@daily': return '0 0 0 * * *'; + case '@weekly': return '0 0 0 * * 0'; + case '@monthly': return '0 0 0 1 * *'; + case 'every': { + const n = Math.max(1, s.num || 1); + if (s.unit === 's') return `*/${n} * * * * *`; + if (s.unit === 'm') return `0 */${n} * * * *`; + return `0 0 */${n} * * *`; + } + default: return s.custom; + } +} + +function NotifyTimeField({ value, onChange }: { value: string; onChange: (v: string) => void }) { + const { t } = useTranslation(); + // Init once: the Settings tabs only mount after settings are fetched, so the + // incoming value is already the persisted one. + const [state, setState] = useState(() => parseRunTime(value)); + + function update(patch: Partial) { + const next = { ...state, ...patch }; + setState(next); + onChange(composeRunTime(next)); + } + + function onModeChange(mode: Mode) { + // Seed Custom with the crontab equivalent of the current selection so the + // box starts from a real expression (e.g. "0 0 0 * * *", not "@daily"). + if (mode === 'custom' && !state.custom.trim()) { + update({ mode, custom: toCrontab(state) }); + } else { + update({ mode }); + } + } + + const modeOptions = [ + { value: 'every', label: t('pages.settings.notifyTime.every') }, + { value: '@hourly', label: t('pages.settings.notifyTime.hourly') }, + { value: '@daily', label: t('pages.settings.notifyTime.daily') }, + { value: '@weekly', label: t('pages.settings.notifyTime.weekly') }, + { value: '@monthly', label: t('pages.settings.notifyTime.monthly') }, + { value: 'custom', label: t('pages.settings.notifyTime.custom') }, + ]; + const unitOptions = [ + { value: 's', label: t('pages.settings.notifyTime.seconds') }, + { value: 'm', label: t('pages.settings.notifyTime.minutes') }, + { value: 'h', label: t('pages.settings.notifyTime.hours') }, + ]; + + return ( + + + style={{ width: '100%' }} + value={state.mode} + options={modeOptions} + onChange={onModeChange} + /> + {state.mode === 'every' && ( + + update({ num: Math.max(1, Number(v) || 1) })} + /> + + style={{ width: '50%' }} + value={state.unit} + options={unitOptions} + onChange={(unit) => update({ unit })} + /> + + )} + {state.mode === 'custom' && ( + update({ custom: e.target.value })} + /> + )} + + ); +} + export default function TelegramTab({ allSetting, updateSetting }: TelegramTabProps) { const { t } = useTranslation(); const { isMobile } = useMediaQuery(); @@ -79,7 +207,7 @@ export default function TelegramTab({ allSetting, updateSetting }: TelegramTabPr children: ( <> - updateSetting({ tgRunTime: e.target.value })} /> + updateSetting({ tgRunTime: v })} /> updateSetting({ tgBotBackup: v })} /> diff --git a/internal/web/translation/ar-EG.json b/internal/web/translation/ar-EG.json index 85e88f826..d8acc4139 100644 --- a/internal/web/translation/ar-EG.json +++ b/internal/web/translation/ar-EG.json @@ -1005,7 +1005,18 @@ "telegramChatId": "ID شات الأدمن", "telegramChatIdDesc": "ID شات الأدمن في Telegram. (مفصول بفواصل)(تقدر تجيبه من {'@'}userinfobot) أو (استخدم '/id' في البوت)", "telegramNotifyTime": "وقت الإشعار", - "telegramNotifyTimeDesc": "وقت إشعار البوت للتقارير الدورية. (استخدم صيغة وقت crontab)", + "telegramNotifyTimeDesc": "عدد مرات إرسال البوت للتقارير الدورية. اختر فترة جاهزة، أو اختر «مخصص» لإدخال تعبير crontab.", + "notifyTime": { + "every": "@every — التكرار ضمن فترة", + "hourly": "@hourly — كل ساعة", + "daily": "@daily — كل يوم الساعة 00:00", + "weekly": "@weekly — كل أسبوع", + "monthly": "@monthly — كل شهر", + "custom": "مخصص (crontab)", + "seconds": "ثوانٍ", + "minutes": "دقائق", + "hours": "ساعات" + }, "tgNotifyBackup": "نسخة احتياطية لقاعدة البيانات", "tgNotifyBackupDesc": "ابعت ملف النسخة الاحتياطية لقاعدة البيانات مع التقرير.", "tgNotifyLogin": "إشعار بتسجيل الدخول", @@ -1036,6 +1047,7 @@ "subAnnounceDesc": "نص الإعلان المعروض في عميل VPN", "subThemeDir": "مجلد قالب الاشتراك", "subThemeDirDesc": "المسار المطلق لمجلد يحتوي على قالب مخصص (index.html/sub.html) لصفحة الاشتراك (مثل /etc/3x-ui/sub_templates/my-theme/). اتركه فارغًا لاستخدام الصفحة الافتراضية.", + "subThemeDirDocs": "دليل القالب ↗", "subEnableRouting": "تفعيل التوجيه", "subEnableRoutingDesc": "إعداد عام لتمكين التوجيه (Routing) في عميل VPN. (فقط لـ Happ)", "subRoutingRules": "قواعد التوجيه", diff --git a/internal/web/translation/en-US.json b/internal/web/translation/en-US.json index 3337ed240..a4f0c9d44 100644 --- a/internal/web/translation/en-US.json +++ b/internal/web/translation/en-US.json @@ -1006,7 +1006,18 @@ "telegramChatId": "Admin Chat ID", "telegramChatIdDesc": "The Telegram Admin Chat ID(s). (comma-separated)(get it here {'@'}userinfobot) or (use '/id' command in the bot)", "telegramNotifyTime": "Notification Time", - "telegramNotifyTimeDesc": "The Telegram bot notification time set for periodic reports. (use the crontab time format)", + "telegramNotifyTimeDesc": "How often the Telegram bot sends periodic reports. Pick a preset interval, or choose Custom to enter a raw crontab expression.", + "notifyTime": { + "every": "@every — repeat at an interval", + "hourly": "@hourly — every hour", + "daily": "@daily — every day at 00:00", + "weekly": "@weekly — every week", + "monthly": "@monthly — every month", + "custom": "Custom (crontab)", + "seconds": "Seconds", + "minutes": "Minutes", + "hours": "Hours" + }, "tgNotifyBackup": "Database Backup", "tgNotifyBackupDesc": "Send a database backup file with a report.", "tgNotifyLogin": "Login Notification", @@ -1037,6 +1048,7 @@ "subAnnounceDesc": "The announcement text displayed in the VPN client", "subThemeDir": "Sub Theme Directory", "subThemeDirDesc": "Absolute path to a folder containing a custom index.html/sub.html subscription page template (e.g. /etc/3x-ui/sub_templates/my-theme/). Leave empty to use the default page.", + "subThemeDirDocs": "Template guide ↗", "subEnableRouting": "Enable routing", "subEnableRoutingDesc": "Global setting to enable routing in the VPN client. (Only for Happ)", "subRoutingRules": "Routing rules", diff --git a/internal/web/translation/es-ES.json b/internal/web/translation/es-ES.json index e261fb75c..3aa2b9c6c 100644 --- a/internal/web/translation/es-ES.json +++ b/internal/web/translation/es-ES.json @@ -1005,7 +1005,18 @@ "telegramChatId": "IDs de Chat de Telegram para Administradores", "telegramChatIdDesc": "IDs de Chat múltiples separados por comas. Use {'@'}userinfobot o use el comando '/id' en el bot para obtener sus IDs de Chat.", "telegramNotifyTime": "Hora de Notificación del Bot de Telegram", - "telegramNotifyTimeDesc": "Usar el formato de tiempo de Crontab.", + "telegramNotifyTimeDesc": "Con qué frecuencia el bot de Telegram envía informes periódicos. Elige un intervalo predefinido o selecciona Personalizado para introducir una expresión crontab.", + "notifyTime": { + "every": "@every — repetir en un intervalo", + "hourly": "@hourly — cada hora", + "daily": "@daily — cada día a las 00:00", + "weekly": "@weekly — cada semana", + "monthly": "@monthly — cada mes", + "custom": "Personalizado (crontab)", + "seconds": "Segundos", + "minutes": "Minutos", + "hours": "Horas" + }, "tgNotifyBackup": "Respaldo de Base de Datos", "tgNotifyBackupDesc": "Incluir archivo de respaldo de base de datos con notificación de informe.", "tgNotifyLogin": "Notificación de Inicio de Sesión", @@ -1036,6 +1047,7 @@ "subAnnounceDesc": "El texto del anuncio mostrado en el cliente VPN", "subThemeDir": "Directorio del tema de suscripción", "subThemeDirDesc": "Ruta absoluta a una carpeta que contiene una plantilla personalizada (index.html/sub.html) para la página de suscripción (p. ej. /etc/3x-ui/sub_templates/my-theme/). Déjalo vacío para usar la página predeterminada.", + "subThemeDirDocs": "Guía de plantillas ↗", "subEnableRouting": "Habilitar enrutamiento", "subEnableRoutingDesc": "Configuración global para habilitar el enrutamiento en el cliente VPN. (Solo para Happ)", "subRoutingRules": "Reglas de enrutamiento", diff --git a/internal/web/translation/fa-IR.json b/internal/web/translation/fa-IR.json index 35cfb4661..66a7d62fd 100644 --- a/internal/web/translation/fa-IR.json +++ b/internal/web/translation/fa-IR.json @@ -1005,7 +1005,18 @@ "telegramChatId": "آی‌دی چت مدیر", "telegramChatIdDesc": "دریافت ‌کنید ('/id'یا (دستور ({'@'}userinfobot) آی‌دی(های) چت تلگرام مدیر، از", "telegramNotifyTime": "زمان نوتیفیکیشن", - "telegramNotifyTimeDesc": "زمان‌اطلاع‌رسانی ربات تلگرام برای گزارش های دوره‌ای. از فرمت زمانبندی لینوکس استفاده‌کنید‌", + "telegramNotifyTimeDesc": "هر چند وقت یک‌بار ربات تلگرام گزارش دوره‌ای بفرستد. یک بازهٔ آماده انتخاب کنید یا گزینهٔ سفارشی را بزنید تا عبارت crontab وارد کنید.", + "notifyTime": { + "every": "@every — تکرار در یک بازه", + "hourly": "@hourly — هر ساعت", + "daily": "@daily — هر روز ساعت ۰۰:۰۰", + "weekly": "@weekly — هر هفته", + "monthly": "@monthly — هر ماه", + "custom": "سفارشی (crontab)", + "seconds": "ثانیه", + "minutes": "دقیقه", + "hours": "ساعت" + }, "tgNotifyBackup": "پشتیبان‌گیری از دیتابیس", "tgNotifyBackupDesc": "فایل پشتیبان‌دیتابیس را به‌همراه گزارش ارسال می‌کند", "tgNotifyLogin": "اعلان ورود", @@ -1036,6 +1047,7 @@ "subAnnounceDesc": "متن اعلانی که در کلاینت VPN نمایش داده می‌شود", "subThemeDir": "پوشه قالب صفحه اشتراک", "subThemeDirDesc": "مسیر مطلق پوشه‌ای که شامل یک قالب سفارشی (index.html/sub.html) برای صفحه اشتراک است (مثلاً /etc/3x-ui/sub_templates/my-theme/). برای استفاده از صفحه پیش‌فرض خالی بگذارید.", + "subThemeDirDocs": "راهنمای قالب ↗", "subEnableRouting": "فعال‌سازی مسیریابی", "subEnableRoutingDesc": "تنظیمات سراسری برای فعال‌سازی مسیریابی در کلاینت VPN. (فقط برای Happ)", "subRoutingRules": "قوانین مسیریابی", diff --git a/internal/web/translation/id-ID.json b/internal/web/translation/id-ID.json index 61c865fe2..373529d06 100644 --- a/internal/web/translation/id-ID.json +++ b/internal/web/translation/id-ID.json @@ -1005,7 +1005,18 @@ "telegramChatId": "ID Obrolan Admin", "telegramChatIdDesc": "ID Obrolan Admin Telegram. (dipisahkan koma)(dapatkan di sini {'@'}userinfobot) atau (gunakan perintah '/id' di bot)", "telegramNotifyTime": "Waktu Notifikasi", - "telegramNotifyTimeDesc": "Waktu notifikasi bot Telegram yang diatur untuk laporan berkala. (gunakan format waktu crontab)", + "telegramNotifyTimeDesc": "Seberapa sering bot Telegram mengirim laporan berkala. Pilih interval siap pakai, atau pilih Kustom untuk memasukkan ekspresi crontab.", + "notifyTime": { + "every": "@every — ulangi dalam interval", + "hourly": "@hourly — setiap jam", + "daily": "@daily — setiap hari pukul 00:00", + "weekly": "@weekly — setiap minggu", + "monthly": "@monthly — setiap bulan", + "custom": "Kustom (crontab)", + "seconds": "Detik", + "minutes": "Menit", + "hours": "Jam" + }, "tgNotifyBackup": "Cadangan Database", "tgNotifyBackupDesc": "Kirim berkas cadangan database dengan laporan.", "tgNotifyLogin": "Notifikasi Login", @@ -1036,6 +1047,7 @@ "subAnnounceDesc": "Teks pengumuman yang ditampilkan di klien VPN", "subThemeDir": "Direktori Tema Langganan", "subThemeDirDesc": "Path absolut ke folder yang berisi template kustom (index.html/sub.html) untuk halaman langganan (mis. /etc/3x-ui/sub_templates/my-theme/). Biarkan kosong untuk menggunakan halaman default.", + "subThemeDirDocs": "Panduan templat ↗", "subEnableRouting": "Aktifkan perutean", "subEnableRoutingDesc": "Pengaturan global untuk mengaktifkan perutean (routing) di klien VPN. (Hanya untuk Happ)", "subRoutingRules": "Aturan routing", diff --git a/internal/web/translation/ja-JP.json b/internal/web/translation/ja-JP.json index 16794c409..f6df1fe82 100644 --- a/internal/web/translation/ja-JP.json +++ b/internal/web/translation/ja-JP.json @@ -1005,7 +1005,18 @@ "telegramChatId": "管理者チャットID", "telegramChatIdDesc": "Telegram管理者チャットID(複数の場合はカンマで区切る){'@'}userinfobotで取得するか、ボットで'/id'コマンドを使用して取得する", "telegramNotifyTime": "通知時間", - "telegramNotifyTimeDesc": "定期的なTelegramボット通知時間を設定する(crontab時間形式を使用)", + "telegramNotifyTimeDesc": "Telegram ボットが定期レポートを送信する頻度です。プリセットの間隔を選ぶか、「カスタム」を選んで crontab 式を入力します。", + "notifyTime": { + "every": "@every — 一定間隔で繰り返す", + "hourly": "@hourly — 1時間ごと", + "daily": "@daily — 毎日 00:00", + "weekly": "@weekly — 毎週", + "monthly": "@monthly — 毎月", + "custom": "カスタム (crontab)", + "seconds": "秒", + "minutes": "分", + "hours": "時間" + }, "tgNotifyBackup": "データベースバックアップ", "tgNotifyBackupDesc": "レポート付きのデータベースバックアップファイルを送信", "tgNotifyLogin": "ログイン通知", @@ -1036,6 +1047,7 @@ "subAnnounceDesc": "VPNクライアントに表示されるお知らせのテキスト", "subThemeDir": "サブスクリプションテーマディレクトリ", "subThemeDirDesc": "サブスクリプションページのカスタムテンプレート (index.html/sub.html) を含むフォルダーの絶対パス(例: /etc/3x-ui/sub_templates/my-theme/)。空欄の場合はデフォルトのページを使用します。", + "subThemeDirDocs": "テンプレートガイド ↗", "subEnableRouting": "ルーティングを有効化", "subEnableRoutingDesc": "VPNクライアントでルーティングを有効にするためのグローバル設定。(Happのみ)", "subRoutingRules": "ルーティングルール", diff --git a/internal/web/translation/pt-BR.json b/internal/web/translation/pt-BR.json index d8f7cd60f..b6e80d246 100644 --- a/internal/web/translation/pt-BR.json +++ b/internal/web/translation/pt-BR.json @@ -1005,7 +1005,18 @@ "telegramChatId": "ID de Chat do Administrador", "telegramChatIdDesc": "O(s) ID(s) de Chat do Administrador no Telegram. (separado por vírgulas)(obtenha aqui {'@'}userinfobot) ou (use o comando '/id' no bot)", "telegramNotifyTime": "Hora da Notificação", - "telegramNotifyTimeDesc": "O horário de notificação do bot do Telegram configurado para relatórios periódicos. (use o formato de tempo do crontab)", + "telegramNotifyTimeDesc": "Com que frequência o bot do Telegram envia relatórios periódicos. Escolha um intervalo predefinido ou selecione Personalizado para inserir uma expressão crontab.", + "notifyTime": { + "every": "@every — repetir em um intervalo", + "hourly": "@hourly — a cada hora", + "daily": "@daily — todos os dias às 00:00", + "weekly": "@weekly — toda semana", + "monthly": "@monthly — todo mês", + "custom": "Personalizado (crontab)", + "seconds": "Segundos", + "minutes": "Minutos", + "hours": "Horas" + }, "tgNotifyBackup": "Backup do Banco de Dados", "tgNotifyBackupDesc": "Enviar arquivo de backup do banco de dados junto com o relatório.", "tgNotifyLogin": "Notificação de Login", @@ -1036,6 +1047,7 @@ "subAnnounceDesc": "O texto do anúncio exibido no cliente VPN", "subThemeDir": "Diretório do tema de assinatura", "subThemeDirDesc": "Caminho absoluto para uma pasta contendo um modelo personalizado (index.html/sub.html) para a página de assinatura (ex.: /etc/3x-ui/sub_templates/my-theme/). Deixe vazio para usar a página padrão.", + "subThemeDirDocs": "Guia de modelos ↗", "subEnableRouting": "Ativar roteamento", "subEnableRoutingDesc": "Configuração global para habilitar o roteamento no cliente VPN. (Apenas para Happ)", "subRoutingRules": "Regras de roteamento", diff --git a/internal/web/translation/ru-RU.json b/internal/web/translation/ru-RU.json index 672eca970..282614a14 100644 --- a/internal/web/translation/ru-RU.json +++ b/internal/web/translation/ru-RU.json @@ -1005,7 +1005,18 @@ "telegramChatId": "User ID администратора бота", "telegramChatIdDesc": "Один или несколько User ID администратора(-ов) Telegram-бота. Для получения User ID используйте {'@'}userinfobot или команду '/id' в боте.", "telegramNotifyTime": "Частота уведомлений для администраторов от бота", - "telegramNotifyTimeDesc": "Укажите интервал уведомлений в формате Crontab", + "telegramNotifyTimeDesc": "Как часто бот Telegram отправляет периодические отчёты. Выберите готовый интервал или «Произвольный», чтобы ввести выражение crontab.", + "notifyTime": { + "every": "@every — повторять с интервалом", + "hourly": "@hourly — каждый час", + "daily": "@daily — каждый день в 00:00", + "weekly": "@weekly — каждую неделю", + "monthly": "@monthly — каждый месяц", + "custom": "Произвольный (crontab)", + "seconds": "Секунды", + "minutes": "Минуты", + "hours": "Часы" + }, "tgNotifyBackup": "Резервное копирование базы данных", "tgNotifyBackupDesc": "Отправлять уведомление с файлом резервной копии базы данных", "tgNotifyLogin": "Уведомление о входе", @@ -1036,6 +1047,7 @@ "subAnnounceDesc": "Текст объявления, отображаемый в VPN-клиенте", "subThemeDir": "Каталог темы подписки", "subThemeDirDesc": "Абсолютный путь к папке с пользовательским шаблоном (index.html/sub.html) для страницы подписки (например, /etc/3x-ui/sub_templates/my-theme/). Оставьте пустым, чтобы использовать страницу по умолчанию.", + "subThemeDirDocs": "Руководство по шаблонам ↗", "subEnableRouting": "Включить маршрутизацию", "subEnableRoutingDesc": "Глобальная настройка для включения маршрутизации в VPN-клиенте. (Только для Happ)", "subRoutingRules": "Правила маршрутизации", diff --git a/internal/web/translation/tr-TR.json b/internal/web/translation/tr-TR.json index 6ece7535d..3a5806b4b 100644 --- a/internal/web/translation/tr-TR.json +++ b/internal/web/translation/tr-TR.json @@ -1004,7 +1004,18 @@ "telegramChatId": "Yönetici Sohbet Kimliği", "telegramChatIdDesc": "Telegram Yönetici Sohbet Kimliği (Chat ID). Birden fazla ise virgülle ayırın. ({'@'}userinfobot'tan alabilirsiniz veya botta '/id' komutunu kullanabilirsiniz.)", "telegramNotifyTime": "Bildirim Zamanı", - "telegramNotifyTimeDesc": "Periyodik raporlar için ayarlanan Telegram bot bildirim zamanı. (crontab zaman formatını kullanın)", + "telegramNotifyTimeDesc": "Telegram botunun periyodik raporları gönderme sıklığı. Hazır bir aralık seçin veya bir crontab ifadesi girmek için Özel'i seçin.", + "notifyTime": { + "every": "@every — bir aralıkla tekrarla", + "hourly": "@hourly — her saat", + "daily": "@daily — her gün 00:00'da", + "weekly": "@weekly — her hafta", + "monthly": "@monthly — her ay", + "custom": "Özel (crontab)", + "seconds": "Saniye", + "minutes": "Dakika", + "hours": "Saat" + }, "tgNotifyBackup": "Veritabanı Yedeği", "tgNotifyBackupDesc": "Bir rapor ile birlikte veritabanı yedek dosyasını gönderir.", "tgNotifyLogin": "Giriş Bildirimi", @@ -1035,6 +1046,7 @@ "subAnnounceDesc": "VPN istemcisinde görüntülenen duyuru metni", "subThemeDir": "Abonelik Tema Dizini", "subThemeDirDesc": "Abonelik sayfası için özel bir şablon (index.html/sub.html) içeren klasörün mutlak yolu (örn. /etc/3x-ui/sub_templates/my-theme/). Varsayılan sayfayı kullanmak için boş bırakın.", + "subThemeDirDocs": "Şablon kılavuzu ↗", "subEnableRouting": "Yönlendirmeyi etkinleştir", "subEnableRoutingDesc": "VPN istemcisinde yönlendirmeyi etkinleştirmek için genel ayar. (Yalnızca Happ için)", "subRoutingRules": "Yönlendirme kuralları", diff --git a/internal/web/translation/uk-UA.json b/internal/web/translation/uk-UA.json index c072e61a8..b6e2566fd 100644 --- a/internal/web/translation/uk-UA.json +++ b/internal/web/translation/uk-UA.json @@ -1005,7 +1005,18 @@ "telegramChatId": "Ідентифікатор чату адміністратора", "telegramChatIdDesc": "Ідентифікатори чату адміністратора Telegram. (розділені комами) (отримайте тут {'@'}userinfobot) або (використовуйте команду '/id' у боті)", "telegramNotifyTime": "Час сповіщення", - "telegramNotifyTimeDesc": "Час повідомлення бота Telegram, встановлений для періодичних звітів. (використовуйте формат часу crontab)", + "telegramNotifyTimeDesc": "Як часто бот Telegram надсилає періодичні звіти. Виберіть готовий інтервал або «Власний», щоб ввести вираз crontab.", + "notifyTime": { + "every": "@every — повторювати з інтервалом", + "hourly": "@hourly — щогодини", + "daily": "@daily — щодня о 00:00", + "weekly": "@weekly — щотижня", + "monthly": "@monthly — щомісяця", + "custom": "Власний (crontab)", + "seconds": "Секунди", + "minutes": "Хвилини", + "hours": "Години" + }, "tgNotifyBackup": "Резервне копіювання бази даних", "tgNotifyBackupDesc": "Надіслати файл резервної копії бази даних зі звітом.", "tgNotifyLogin": "Сповіщення про вхід", @@ -1036,6 +1047,7 @@ "subAnnounceDesc": "Текст оголошення, що відображається у VPN-клієнті", "subThemeDir": "Каталог теми підписки", "subThemeDirDesc": "Абсолютний шлях до теки з користувацьким шаблоном (index.html/sub.html) для сторінки підписки (наприклад, /etc/3x-ui/sub_templates/my-theme/). Залиште порожнім, щоб використовувати сторінку за замовчуванням.", + "subThemeDirDocs": "Посібник із шаблонів ↗", "subEnableRouting": "Увімкнути маршрутизацію", "subEnableRoutingDesc": "Глобальне налаштування для увімкнення маршрутизації у VPN-клієнті. (Тільки для Happ)", "subRoutingRules": "Правила маршрутизації", diff --git a/internal/web/translation/vi-VN.json b/internal/web/translation/vi-VN.json index dd6d2f65e..243d72907 100644 --- a/internal/web/translation/vi-VN.json +++ b/internal/web/translation/vi-VN.json @@ -1005,7 +1005,18 @@ "telegramChatId": "Chat ID Telegram của quản trị viên", "telegramChatIdDesc": "Nhiều Chat ID phân tách bằng dấu phẩy. Sử dụng {'@'}userinfobot hoặc sử dụng lệnh '/id' trong bot để lấy Chat ID của bạn.", "telegramNotifyTime": "Thời gian thông báo của bot Telegram", - "telegramNotifyTimeDesc": "Sử dụng định dạng thời gian Crontab.", + "telegramNotifyTimeDesc": "Tần suất bot Telegram gửi báo cáo định kỳ. Chọn một khoảng thời gian có sẵn, hoặc chọn Tùy chỉnh để nhập biểu thức crontab.", + "notifyTime": { + "every": "@every — lặp lại theo khoảng thời gian", + "hourly": "@hourly — mỗi giờ", + "daily": "@daily — mỗi ngày lúc 00:00", + "weekly": "@weekly — mỗi tuần", + "monthly": "@monthly — mỗi tháng", + "custom": "Tùy chỉnh (crontab)", + "seconds": "Giây", + "minutes": "Phút", + "hours": "Giờ" + }, "tgNotifyBackup": "Sao lưu Cơ sở dữ liệu", "tgNotifyBackupDesc": "Bao gồm tệp sao lưu cơ sở dữ liệu với thông báo báo cáo.", "tgNotifyLogin": "Thông báo Đăng nhập", @@ -1036,6 +1047,7 @@ "subAnnounceDesc": "Văn bản thông báo hiển thị trong ứng dụng VPN", "subThemeDir": "Thư mục giao diện Đăng ký", "subThemeDirDesc": "Đường dẫn tuyệt đối đến thư mục chứa mẫu tùy chỉnh (index.html/sub.html) cho trang đăng ký (ví dụ: /etc/3x-ui/sub_templates/my-theme/). Để trống để dùng trang mặc định.", + "subThemeDirDocs": "Hướng dẫn mẫu ↗", "subEnableRouting": "Bật định tuyến", "subEnableRoutingDesc": "Cài đặt toàn cục để bật định tuyến trong ứng dụng khách VPN. (Chỉ dành cho Happ)", "subRoutingRules": "Quy tắc định tuyến", diff --git a/internal/web/translation/zh-CN.json b/internal/web/translation/zh-CN.json index 77d22affe..0d651c1bc 100644 --- a/internal/web/translation/zh-CN.json +++ b/internal/web/translation/zh-CN.json @@ -1005,7 +1005,18 @@ "telegramChatId": "管理员聊天 ID", "telegramChatIdDesc": "Telegram 管理员聊天 ID (多个以逗号分隔)(可通过 {'@'}userinfobot 获取,或在机器人中使用 '/id' 命令获取)", "telegramNotifyTime": "通知时间", - "telegramNotifyTimeDesc": "设置周期性的 Telegram 机器人通知时间(使用 crontab 时间格式)", + "telegramNotifyTimeDesc": "Telegram 机器人发送周期性报告的频率。选择预设间隔,或选择“自定义”以输入 crontab 表达式。", + "notifyTime": { + "every": "@every — 按间隔重复", + "hourly": "@hourly — 每小时", + "daily": "@daily — 每天 00:00", + "weekly": "@weekly — 每周", + "monthly": "@monthly — 每月", + "custom": "自定义 (crontab)", + "seconds": "秒", + "minutes": "分钟", + "hours": "小时" + }, "tgNotifyBackup": "数据库备份", "tgNotifyBackupDesc": "发送带有报告的数据库备份文件", "tgNotifyLogin": "登录通知", @@ -1036,6 +1047,7 @@ "subAnnounceDesc": "VPN 客户端中显示的公告文本", "subThemeDir": "订阅主题目录", "subThemeDirDesc": "包含自定义订阅页面模板 (index.html/sub.html) 的文件夹的绝对路径(例如 /etc/3x-ui/sub_templates/my-theme/)。留空则使用默认页面。", + "subThemeDirDocs": "模板指南 ↗", "subEnableRouting": "启用路由", "subEnableRoutingDesc": "在 VPN 客户端中启用路由的全局设置。(僅限 Happ)", "subRoutingRules": "路由規則", diff --git a/internal/web/translation/zh-TW.json b/internal/web/translation/zh-TW.json index 773d1de33..bd2d75a46 100644 --- a/internal/web/translation/zh-TW.json +++ b/internal/web/translation/zh-TW.json @@ -1005,7 +1005,18 @@ "telegramChatId": "管理員聊天 ID", "telegramChatIdDesc": "Telegram 管理員聊天 ID (多個以逗號分隔)(可通過 {'@'}userinfobot 獲取,或在機器人中使用 '/id' 命令獲取)", "telegramNotifyTime": "通知時間", - "telegramNotifyTimeDesc": "設定週期性的 Telegram 機器人通知時間(使用 crontab 時間格式)", + "telegramNotifyTimeDesc": "Telegram 機器人傳送週期性報告的頻率。選擇預設間隔,或選擇「自訂」以輸入 crontab 運算式。", + "notifyTime": { + "every": "@every — 依間隔重複", + "hourly": "@hourly — 每小時", + "daily": "@daily — 每天 00:00", + "weekly": "@weekly — 每週", + "monthly": "@monthly — 每月", + "custom": "自訂 (crontab)", + "seconds": "秒", + "minutes": "分鐘", + "hours": "小時" + }, "tgNotifyBackup": "資料庫備份", "tgNotifyBackupDesc": "傳送帶有報告的資料庫備份檔案", "tgNotifyLogin": "登入通知", @@ -1036,6 +1047,7 @@ "subAnnounceDesc": "VPN 用戶端中顯示的公告文字", "subThemeDir": "訂閱主題目錄", "subThemeDirDesc": "包含自訂訂閱頁面範本 (index.html/sub.html) 的資料夾的絕對路徑(例如 /etc/3x-ui/sub_templates/my-theme/)。留空則使用預設頁面。", + "subThemeDirDocs": "範本指南 ↗", "subEnableRouting": "啟用路由", "subEnableRoutingDesc": "在 VPN 用戶端中啟用路由的全域設定。(僅限 Happ)", "subRoutingRules": "路由規則",