feat: comprehensive code review fixes + receivers-only architecture
Security:
- Refuse startup with default secret_key in production (was just logging)
- Settings endpoint now requires admin role
- Password validation on initial setup
- DOM-based HTML sanitizer replaces regex in template previews
- Add *.log to .gitignore
Performance & reliability:
- Token refresh deduplication prevents race condition on concurrent 401s
- Theme media query listener registered once (no leak)
- IconPicker uses $derived instead of function call per render
- Snackbar uses single-batch state update instead of while loop
- Replace 11 inline hover handlers with CSS :hover in layout
Architecture - receivers-only:
- Delivery endpoints (chat_id, email, url, room_id, topic) now stored
exclusively in TargetReceiver rows, never in target.config
- Migration extracts existing delivery fields to receiver rows
- Notifier and dispatcher remove all config fallbacks
- Frontend targets page shows receivers list per target with
add/remove/toggle/test per receiver
- Single-receiver test endpoint: POST /targets/{id}/receivers/{id}/test
Code quality:
- Extract AuthLayout.svelte from login/setup (150 lines CSS dedup)
- Split telegram-bots page (754→51 lines + 3 tab components)
- Split notification-trackers page (547→432 lines + 4 components)
- Deduplicate _send_reply into shared handler.send_reply()
- Add locale column to template models, replace name-based detection
- Fix delete_notification_tracker dead protection check
- Fix check_telegram_bot query (filter by type, remove bogus OR)
- Add graceful scheduler shutdown in lifespan
- Consistent /bots?tab=telegram URLs across all nav links
i18n:
- Error page, chat actions, target types, provider types internationalized
- All new receiver UI strings in EN + RU
This commit is contained in:
@@ -105,6 +105,7 @@
|
||||
"online": "Online",
|
||||
"offline": "Offline",
|
||||
"checking": "Checking...",
|
||||
"typeImmich": "Immich",
|
||||
"loadError": "Failed to load providers.",
|
||||
"externalDomain": "External Domain",
|
||||
"optional": "optional",
|
||||
@@ -228,6 +229,14 @@
|
||||
"sendLargeAsDocuments": "Send large photos as documents",
|
||||
"chatAction": "Chat action",
|
||||
"chatActionNone": "None (no action)",
|
||||
"chatActionTyping": "Typing",
|
||||
"chatActionUploadPhoto": "Upload Photo",
|
||||
"chatActionUploadVideo": "Upload Video",
|
||||
"chatActionUploadDoc": "Upload Doc",
|
||||
"chatActionRecordVideo": "Record Video",
|
||||
"chatActionRecordVoice": "Record Voice",
|
||||
"typeTelegram": "Telegram",
|
||||
"typeWebhook": "Webhook",
|
||||
"overrideUsername": "Override bot username",
|
||||
"ntfyServer": "ntfy Server URL",
|
||||
"ntfyTopic": "Topic",
|
||||
@@ -236,7 +245,16 @@
|
||||
"selectEmailBot": "Select Email Bot",
|
||||
"selectMatrixBot": "Select Matrix Bot",
|
||||
"recipientEmail": "Recipient Email",
|
||||
"matrixRoomId": "Room ID"
|
||||
"matrixRoomId": "Room ID",
|
||||
"receivers": "Receivers",
|
||||
"noReceivers": "No receivers yet",
|
||||
"addReceiver": "Add Receiver",
|
||||
"receiverAdded": "Receiver added",
|
||||
"receiverDeleted": "Receiver deleted",
|
||||
"receiverUpdated": "Receiver updated",
|
||||
"confirmDeleteReceiver": "Delete this receiver?",
|
||||
"receiverEnabled": "Receiver enabled",
|
||||
"receiverDisabled": "Receiver disabled"
|
||||
},
|
||||
"users": {
|
||||
"title": "Users",
|
||||
@@ -702,6 +720,10 @@
|
||||
"line": "line",
|
||||
"add": "Add"
|
||||
},
|
||||
"error": {
|
||||
"notFound": "Page not found",
|
||||
"goHome": "Go home"
|
||||
},
|
||||
"searchPalette": {
|
||||
"placeholder": "Search entities...",
|
||||
"noResults": "No results found",
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
"online": "В сети",
|
||||
"offline": "Не в сети",
|
||||
"checking": "Проверка...",
|
||||
"typeImmich": "Immich",
|
||||
"loadError": "Не удалось загрузить провайдеры.",
|
||||
"externalDomain": "Внешний домен",
|
||||
"optional": "необязательно",
|
||||
@@ -228,6 +229,14 @@
|
||||
"sendLargeAsDocuments": "Отправлять большие фото как документы",
|
||||
"chatAction": "Действие в чате",
|
||||
"chatActionNone": "Нет (без действия)",
|
||||
"chatActionTyping": "Печатает",
|
||||
"chatActionUploadPhoto": "Загрузка фото",
|
||||
"chatActionUploadVideo": "Загрузка видео",
|
||||
"chatActionUploadDoc": "Загрузка документа",
|
||||
"chatActionRecordVideo": "Запись видео",
|
||||
"chatActionRecordVoice": "Запись голоса",
|
||||
"typeTelegram": "Telegram",
|
||||
"typeWebhook": "Вебхук",
|
||||
"overrideUsername": "Переопределить имя бота",
|
||||
"ntfyServer": "URL сервера ntfy",
|
||||
"ntfyTopic": "Тема",
|
||||
@@ -236,7 +245,16 @@
|
||||
"selectEmailBot": "Выберите Email бот",
|
||||
"selectMatrixBot": "Выберите Matrix бот",
|
||||
"recipientEmail": "Email получателя",
|
||||
"matrixRoomId": "ID комнаты"
|
||||
"matrixRoomId": "ID комнаты",
|
||||
"receivers": "Получатели",
|
||||
"noReceivers": "Нет получателей",
|
||||
"addReceiver": "Добавить получателя",
|
||||
"receiverAdded": "Получатель добавлен",
|
||||
"receiverDeleted": "Получатель удалён",
|
||||
"receiverUpdated": "Получатель обновлён",
|
||||
"confirmDeleteReceiver": "Удалить этого получателя?",
|
||||
"receiverEnabled": "Получатель включён",
|
||||
"receiverDisabled": "Получатель отключён"
|
||||
},
|
||||
"users": {
|
||||
"title": "Пользователи",
|
||||
@@ -702,6 +720,10 @@
|
||||
"line": "строка",
|
||||
"add": "Добавить"
|
||||
},
|
||||
"error": {
|
||||
"notFound": "Страница не найдена",
|
||||
"goHome": "На главную"
|
||||
},
|
||||
"searchPalette": {
|
||||
"placeholder": "Поиск объектов...",
|
||||
"noResults": "Ничего не найдено",
|
||||
|
||||
Reference in New Issue
Block a user