feat: add reset to default for routing algorithm settings (#622)
- Add Reset button in routing settings with Icons.restart_alt - Extract default values as constants in AppSettings to avoid duplication - Add translations for all 18 supported languages - Update documentation in settings.md
This commit is contained in:
1 parent
ac28dac575
commit
3032be9bad
42 files changed
+377
-39
No files matched your search
@@ -119,12 +119,13 @@ Individual channels can be muted from the channel chat bell icon, the channel li
|
||||
- **Clear Path on Max Retry**: Erases the stored routing path after all retries fail
|
||||
- **Jump to Oldest Unread**: When opening a chat, scrolls to the oldest unread message instead of the newest
|
||||
- **Auto-fetch Repeater Settings** (off by default): Requests every setting when a repeater's settings screen opens. Each setting is a separate request over LoRa, so this is slow and uses airtime; when off, use Refresh All or the per-setting refresh buttons. See [Repeater Settings](repeater-management.md#repeater-settings)
|
||||
- **Auto Route Rotation**: Enables weighted routing algorithm. When enabled, expands to show five slider sub-settings (hidden when off):
|
||||
- **Auto Route Rotation**: Enables weighted routing algorithm. When enabled, expands to show five slider sub-settings (hidden when off) and a Reset button:
|
||||
- Max Route Weight (1–10, default 5, integer steps)
|
||||
- Initial Route Weight (0.5–5.0, default 3.0)
|
||||
- Success Increment (0.1–2.0, default 0.5, 0.1 steps)
|
||||
- Failure Decrement (0.1–2.0, default 0.2, 0.1 steps)
|
||||
- Max Message Retries (2–10, default 5)
|
||||
- **Reset Routing Algorithm to Default**: Restores all five routing algorithm settings to their factory default values
|
||||
- **Enable Message Tracing**: Shows path trace overlays and extra metadata on messages
|
||||
- **Region next to hop count** (default off): Shows a channel message's region chip on the same line as its hop count instead of below it
|
||||
- **Resend channel messages until they travel far enough** (default off): If your channel message isn't heard coming back through enough repeaters, it's sent again. Uses more airtime. When on, it shows:
|
||||
|
||||
@@ -3363,6 +3363,9 @@
|
||||
"settings_regionFetchNoneResponded": "Нито един близък ретранслатор не отговори. Приближете се до ретранслатор и опитайте отново.",
|
||||
"appSettings_sourceSummary": "{label} - {description}",
|
||||
"appSettings_routingSection": "Маршрутизиране",
|
||||
"appSettings_resetRoutingToDefault": "Нулиране на алгоритъма за маршрутизация до стойност по подразбиране",
|
||||
"appSettings_resetRoutingToDefaultSubtitle": "Възстановяване на настройките на алгоритъма за маршрутизация до заводските стойности по подразбиране",
|
||||
"appSettings_routingResetToDefault": "Настройките на алгоритъма за маршрутизация са нулирани до стойност по подразбиране",
|
||||
"appSettings_imageMessagesSection": "Съобщения с изображения",
|
||||
"appSettings_showApiKey": "Показване на API ключа",
|
||||
"appSettings_hideApiKey": "Скриване на API ключа",
|
||||
|
||||
@@ -3498,6 +3498,9 @@
|
||||
"settings_regionFetchNoneResponded": "Kein Repeater in der Nähe hat geantwortet. Gehe näher an einen Repeater heran und versuche es erneut.",
|
||||
"appSettings_sourceSummary": "{label} - {description}",
|
||||
"appSettings_routingSection": "Routing",
|
||||
"appSettings_resetRoutingToDefault": "Routing-Algorithmus auf Standard zurücksetzen",
|
||||
"appSettings_resetRoutingToDefaultSubtitle": "Routing-Algorithmus-Einstellungen auf Werkseinstellungen zurücksetzen",
|
||||
"appSettings_routingResetToDefault": "Routing-Algorithmus-Einstellungen auf Standard zurückgesetzt",
|
||||
"appSettings_imageMessagesSection": "Bildnachrichten",
|
||||
"appSettings_showApiKey": "API-Schlüssel anzeigen",
|
||||
"appSettings_hideApiKey": "API-Schlüssel verbergen",
|
||||
|
||||
@@ -3541,6 +3541,9 @@
|
||||
"appSettings_sourceSummary": "{label} - {description}",
|
||||
"@appSettings_sourceSummary": {"placeholders": {"label": {"type": "String"}, "description": {"type": "String"}}},
|
||||
"appSettings_routingSection": "Routing",
|
||||
"appSettings_resetRoutingToDefault": "Reset Routing Algorithm to Default",
|
||||
"appSettings_resetRoutingToDefaultSubtitle": "Restore routing algorithm settings to factory defaults",
|
||||
"appSettings_routingResetToDefault": "Routing algorithm settings reset to default",
|
||||
"appSettings_imageMessagesSection": "Image messages",
|
||||
"appSettings_showApiKey": "Show API key",
|
||||
"appSettings_hideApiKey": "Hide API key",
|
||||
|
||||
@@ -3380,6 +3380,9 @@
|
||||
"settings_regionFetchNoneResponded": "Ningún repetidor cercano respondió. Acércate a un repetidor e inténtalo de nuevo.",
|
||||
"appSettings_sourceSummary": "{label} - {description}",
|
||||
"appSettings_routingSection": "Enrutamiento",
|
||||
"appSettings_resetRoutingToDefault": "Restablecer algoritmo de enrutamiento a predeterminado",
|
||||
"appSettings_resetRoutingToDefaultSubtitle": "Restaurar la configuración del algoritmo de enrutamiento a los valores predeterminados de fábrica",
|
||||
"appSettings_routingResetToDefault": "Configuración del algoritmo de enrutamiento restablecida a predeterminado",
|
||||
"appSettings_imageMessagesSection": "Mensajes con imágenes",
|
||||
"appSettings_showApiKey": "Mostrar clave de API",
|
||||
"appSettings_hideApiKey": "Ocultar clave de API",
|
||||
|
||||
@@ -3380,6 +3380,9 @@
|
||||
"settings_regionFetchNoneResponded": "Aucun répéteur à proximité n'a répondu. Rapprochez-vous d'un répéteur et réessayez.",
|
||||
"appSettings_sourceSummary": "{label} - {description}",
|
||||
"appSettings_routingSection": "Routage",
|
||||
"appSettings_resetRoutingToDefault": "Réinitialiser l'algorithme de routage",
|
||||
"appSettings_resetRoutingToDefaultSubtitle": "Restaurer les paramètres de l'algorithme de routage aux valeurs par défaut",
|
||||
"appSettings_routingResetToDefault": "Paramètres de l'algorithme de routage réinitialisés",
|
||||
"appSettings_imageMessagesSection": "Messages image",
|
||||
"appSettings_showApiKey": "Afficher la clé API",
|
||||
"appSettings_hideApiKey": "Masquer la clé API",
|
||||
|
||||
@@ -3402,6 +3402,9 @@
|
||||
"settings_regionFetchNoneResponded": "Egyik közeli átjátszó sem válaszolt. Menjen közelebb egy átjátszóhoz, és próbálja újra.",
|
||||
"appSettings_sourceSummary": "{label} - {description}",
|
||||
"appSettings_routingSection": "Útválasztás",
|
||||
"appSettings_resetRoutingToDefault": "Útvonaltervezési algoritmus visszaállítása alapértelmezettre",
|
||||
"appSettings_resetRoutingToDefaultSubtitle": "Útvonaltervezési algoritmus beállításainak visszaállítása gyári alapértelmezett értékekre",
|
||||
"appSettings_routingResetToDefault": "Útvonaltervezési algoritmus beállításai visszaállítva alapértelmezettre",
|
||||
"appSettings_imageMessagesSection": "Képüzenetek",
|
||||
"appSettings_showApiKey": "API-kulcs megjelenítése",
|
||||
"appSettings_hideApiKey": "API-kulcs elrejtése",
|
||||
|
||||
@@ -3380,6 +3380,9 @@
|
||||
"settings_regionFetchNoneResponded": "Nessun ripetitore vicino ha risposto. Avvicinati a un ripetitore e riprova.",
|
||||
"appSettings_sourceSummary": "{label} - {description}",
|
||||
"appSettings_routingSection": "Instradamento",
|
||||
"appSettings_resetRoutingToDefault": "Reimposta algoritmo di instradamento sui valori predefiniti",
|
||||
"appSettings_resetRoutingToDefaultSubtitle": "Ripristina le impostazioni dell'algoritmo di instradamento ai valori predefiniti di fabbrica",
|
||||
"appSettings_routingResetToDefault": "Impostazioni algoritmo di instradamento reimpostate sui valori predefiniti",
|
||||
"appSettings_imageMessagesSection": "Messaggi immagine",
|
||||
"appSettings_showApiKey": "Mostra chiave API",
|
||||
"appSettings_hideApiKey": "Nascondi chiave API",
|
||||
|
||||
@@ -3380,6 +3380,9 @@
|
||||
"settings_regionFetchNoneResponded": "近くのリピータから応答がありませんでした。リピータに近づいてもう一度お試しください。",
|
||||
"appSettings_sourceSummary": "{label} - {description}",
|
||||
"appSettings_routingSection": "ルーティング",
|
||||
"appSettings_resetRoutingToDefault": "ルーティングアルゴリズムをデフォルトにリセット",
|
||||
"appSettings_resetRoutingToDefaultSubtitle": "ルーティングアルゴリズムの設定を工場出荷時のデフォルトに戻す",
|
||||
"appSettings_routingResetToDefault": "ルーティングアルゴリズムの設定がデフォルトにリセットされました",
|
||||
"appSettings_imageMessagesSection": "画像メッセージ",
|
||||
"appSettings_showApiKey": "APIキーを表示",
|
||||
"appSettings_hideApiKey": "APIキーを非表示",
|
||||
|
||||
@@ -3380,6 +3380,9 @@
|
||||
"settings_regionFetchNoneResponded": "응답한 주변 리피터가 없습니다. 리피터에 더 가까이 이동한 후 다시 시도하세요.",
|
||||
"appSettings_sourceSummary": "{label} - {description}",
|
||||
"appSettings_routingSection": "라우팅",
|
||||
"appSettings_resetRoutingToDefault": "라우팅 알고리즘 기본값으로 재설정",
|
||||
"appSettings_resetRoutingToDefaultSubtitle": "라우팅 알고리즘 설정을 공장 기본값으로 복원",
|
||||
"appSettings_routingResetToDefault": "라우팅 알고리즘 설정이 기본값으로 재설정되었습니다",
|
||||
"appSettings_imageMessagesSection": "이미지 메시지",
|
||||
"appSettings_showApiKey": "API 키 표시",
|
||||
"appSettings_hideApiKey": "API 키 숨기기",
|
||||
|
||||
@@ -10610,6 +10610,24 @@ abstract class AppLocalizations {
|
||||
/// **'Routing'**
|
||||
String get appSettings_routingSection;
|
||||
|
||||
/// No description provided for @appSettings_resetRoutingToDefault.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Reset Routing Algorithm to Default'**
|
||||
String get appSettings_resetRoutingToDefault;
|
||||
|
||||
/// No description provided for @appSettings_resetRoutingToDefaultSubtitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Restore routing algorithm settings to factory defaults'**
|
||||
String get appSettings_resetRoutingToDefaultSubtitle;
|
||||
|
||||
/// No description provided for @appSettings_routingResetToDefault.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Routing algorithm settings reset to default'**
|
||||
String get appSettings_routingResetToDefault;
|
||||
|
||||
/// No description provided for @appSettings_imageMessagesSection.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
|
||||
@@ -6341,6 +6341,18 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_routingSection => 'Маршрутизиране';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefault =>
|
||||
'Нулиране на алгоритъма за маршрутизация до стойност по подразбиране';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefaultSubtitle =>
|
||||
'Възстановяване на настройките на алгоритъма за маршрутизация до заводските стойности по подразбиране';
|
||||
|
||||
@override
|
||||
String get appSettings_routingResetToDefault =>
|
||||
'Настройките на алгоритъма за маршрутизация са нулирани до стойност по подразбиране';
|
||||
|
||||
@override
|
||||
String get appSettings_imageMessagesSection => 'Съобщения с изображения';
|
||||
|
||||
|
||||
@@ -6350,6 +6350,18 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_routingSection => 'Routing';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefault =>
|
||||
'Routing-Algorithmus auf Standard zurücksetzen';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefaultSubtitle =>
|
||||
'Routing-Algorithmus-Einstellungen auf Werkseinstellungen zurücksetzen';
|
||||
|
||||
@override
|
||||
String get appSettings_routingResetToDefault =>
|
||||
'Routing-Algorithmus-Einstellungen auf Standard zurückgesetzt';
|
||||
|
||||
@override
|
||||
String get appSettings_imageMessagesSection => 'Bildnachrichten';
|
||||
|
||||
|
||||
@@ -6250,6 +6250,18 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_routingSection => 'Routing';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefault =>
|
||||
'Reset Routing Algorithm to Default';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefaultSubtitle =>
|
||||
'Restore routing algorithm settings to factory defaults';
|
||||
|
||||
@override
|
||||
String get appSettings_routingResetToDefault =>
|
||||
'Routing algorithm settings reset to default';
|
||||
|
||||
@override
|
||||
String get appSettings_imageMessagesSection => 'Image messages';
|
||||
|
||||
|
||||
@@ -6341,6 +6341,18 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_routingSection => 'Enrutamiento';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefault =>
|
||||
'Restablecer algoritmo de enrutamiento a predeterminado';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefaultSubtitle =>
|
||||
'Restaurar la configuración del algoritmo de enrutamiento a los valores predeterminados de fábrica';
|
||||
|
||||
@override
|
||||
String get appSettings_routingResetToDefault =>
|
||||
'Configuración del algoritmo de enrutamiento restablecida a predeterminado';
|
||||
|
||||
@override
|
||||
String get appSettings_imageMessagesSection => 'Mensajes con imágenes';
|
||||
|
||||
|
||||
@@ -6362,6 +6362,18 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_routingSection => 'Routage';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefault =>
|
||||
'Réinitialiser l\'algorithme de routage';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefaultSubtitle =>
|
||||
'Restaurer les paramètres de l\'algorithme de routage aux valeurs par défaut';
|
||||
|
||||
@override
|
||||
String get appSettings_routingResetToDefault =>
|
||||
'Paramètres de l\'algorithme de routage réinitialisés';
|
||||
|
||||
@override
|
||||
String get appSettings_imageMessagesSection => 'Messages image';
|
||||
|
||||
|
||||
@@ -6329,6 +6329,18 @@ class AppLocalizationsHu extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_routingSection => 'Útválasztás';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefault =>
|
||||
'Útvonaltervezési algoritmus visszaállítása alapértelmezettre';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefaultSubtitle =>
|
||||
'Útvonaltervezési algoritmus beállításainak visszaállítása gyári alapértelmezett értékekre';
|
||||
|
||||
@override
|
||||
String get appSettings_routingResetToDefault =>
|
||||
'Útvonaltervezési algoritmus beállításai visszaállítva alapértelmezettre';
|
||||
|
||||
@override
|
||||
String get appSettings_imageMessagesSection => 'Képüzenetek';
|
||||
|
||||
|
||||
@@ -6348,6 +6348,18 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_routingSection => 'Instradamento';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefault =>
|
||||
'Reimposta algoritmo di instradamento sui valori predefiniti';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefaultSubtitle =>
|
||||
'Ripristina le impostazioni dell\'algoritmo di instradamento ai valori predefiniti di fabbrica';
|
||||
|
||||
@override
|
||||
String get appSettings_routingResetToDefault =>
|
||||
'Impostazioni algoritmo di instradamento reimpostate sui valori predefiniti';
|
||||
|
||||
@override
|
||||
String get appSettings_imageMessagesSection => 'Messaggi immagine';
|
||||
|
||||
|
||||
@@ -6045,6 +6045,17 @@ class AppLocalizationsJa extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_routingSection => 'ルーティング';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefault => 'ルーティングアルゴリズムをデフォルトにリセット';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefaultSubtitle =>
|
||||
'ルーティングアルゴリズムの設定を工場出荷時のデフォルトに戻す';
|
||||
|
||||
@override
|
||||
String get appSettings_routingResetToDefault =>
|
||||
'ルーティングアルゴリズムの設定がデフォルトにリセットされました';
|
||||
|
||||
@override
|
||||
String get appSettings_imageMessagesSection => '画像メッセージ';
|
||||
|
||||
|
||||
@@ -6055,6 +6055,16 @@ class AppLocalizationsKo extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_routingSection => '라우팅';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefault => '라우팅 알고리즘 기본값으로 재설정';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefaultSubtitle =>
|
||||
'라우팅 알고리즘 설정을 공장 기본값으로 복원';
|
||||
|
||||
@override
|
||||
String get appSettings_routingResetToDefault => '라우팅 알고리즘 설정이 기본값으로 재설정되었습니다';
|
||||
|
||||
@override
|
||||
String get appSettings_imageMessagesSection => '이미지 메시지';
|
||||
|
||||
|
||||
@@ -6305,6 +6305,18 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_routingSection => 'Routering';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefault =>
|
||||
'Routeringsalgoritme resetten naar standaard';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefaultSubtitle =>
|
||||
'Routeringsalgoritme-instellingen herstellen naar fabrieksstandaardwaarden';
|
||||
|
||||
@override
|
||||
String get appSettings_routingResetToDefault =>
|
||||
'Routeringsalgoritme-instellingen gereset naar standaard';
|
||||
|
||||
@override
|
||||
String get appSettings_imageMessagesSection => 'Afbeeldingsberichten';
|
||||
|
||||
|
||||
@@ -6371,6 +6371,18 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_routingSection => 'Routing';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefault =>
|
||||
'Resetuj algorytm trasowania do domyślnych';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefaultSubtitle =>
|
||||
'Przywróć ustawienia algorytmu trasowania do fabrycznych ustawień domyślnych';
|
||||
|
||||
@override
|
||||
String get appSettings_routingResetToDefault =>
|
||||
'Ustawienia algorytmu trasowania zresetowane do domyślnych';
|
||||
|
||||
@override
|
||||
String get appSettings_imageMessagesSection => 'Wiadomości z obrazami';
|
||||
|
||||
|
||||
@@ -6337,6 +6337,18 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_routingSection => 'Roteamento';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefault =>
|
||||
'Redefinir algoritmo de roteamento para o padrão';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefaultSubtitle =>
|
||||
'Restaurar as configurações do algoritmo de roteamento para os valores padrão de fábrica';
|
||||
|
||||
@override
|
||||
String get appSettings_routingResetToDefault =>
|
||||
'Configurações do algoritmo de roteamento redefinidas para o padrão';
|
||||
|
||||
@override
|
||||
String get appSettings_imageMessagesSection => 'Mensagens de imagem';
|
||||
|
||||
|
||||
@@ -6357,6 +6357,18 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_routingSection => 'Маршрутизация';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefault =>
|
||||
'Сбросить алгоритм маршрутизации к значению по умолчанию';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefaultSubtitle =>
|
||||
'Восстановить настройки алгоритма маршрутизации к заводским значениям по умолчанию';
|
||||
|
||||
@override
|
||||
String get appSettings_routingResetToDefault =>
|
||||
'Настройки алгоритма маршрутизации сброшены к значению по умолчанию';
|
||||
|
||||
@override
|
||||
String get appSettings_imageMessagesSection => 'Сообщения-изображения';
|
||||
|
||||
|
||||
@@ -6325,6 +6325,18 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_routingSection => 'Smerovanie';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefault =>
|
||||
'Obnoviť algoritmus smerovania na predvolené';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefaultSubtitle =>
|
||||
'Obnoviť nastavenia algoritmu smerovania na továrne predvolené hodnoty';
|
||||
|
||||
@override
|
||||
String get appSettings_routingResetToDefault =>
|
||||
'Nastavenia algoritmu smerovania obnovené na predvolené';
|
||||
|
||||
@override
|
||||
String get appSettings_imageMessagesSection => 'Obrazové správy';
|
||||
|
||||
|
||||
@@ -6309,6 +6309,18 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_routingSection => 'Usmerjanje';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefault =>
|
||||
'Ponastavite algoritem usmerjanja na privzeto';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefaultSubtitle =>
|
||||
'Obnovite nastavitve algoritma usmerjanja na tovarniške privzetke';
|
||||
|
||||
@override
|
||||
String get appSettings_routingResetToDefault =>
|
||||
'Nastavitve algoritma usmerjanja so ponastavljene na privzeto';
|
||||
|
||||
@override
|
||||
String get appSettings_imageMessagesSection => 'Sporočila s slikami';
|
||||
|
||||
|
||||
@@ -6285,6 +6285,18 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_routingSection => 'Routing';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefault =>
|
||||
'Återställ rutningsalgoritm till standard';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefaultSubtitle =>
|
||||
'Återställ rutningsalgoritmins inställningar till fabriksstandard';
|
||||
|
||||
@override
|
||||
String get appSettings_routingResetToDefault =>
|
||||
'Rutningsalgoritmins inställningar återställda till standard';
|
||||
|
||||
@override
|
||||
String get appSettings_imageMessagesSection => 'Bildmeddelanden';
|
||||
|
||||
|
||||
@@ -6362,6 +6362,18 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_routingSection => 'Маршрутизація';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefault =>
|
||||
'Скинути алгоритм маршрутизації до типового';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefaultSubtitle =>
|
||||
'Відновити налаштування алгоритму маршрутизації до заводських значень за замовчуванням';
|
||||
|
||||
@override
|
||||
String get appSettings_routingResetToDefault =>
|
||||
'Налаштування алгоритму маршрутизації скинуто до типових';
|
||||
|
||||
@override
|
||||
String get appSettings_imageMessagesSection => 'Повідомлення із зображеннями';
|
||||
|
||||
|
||||
@@ -5899,6 +5899,15 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get appSettings_routingSection => '路由';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefault => '将路由算法重置为默认值';
|
||||
|
||||
@override
|
||||
String get appSettings_resetRoutingToDefaultSubtitle => '将路由算法设置恢复为出厂默认值';
|
||||
|
||||
@override
|
||||
String get appSettings_routingResetToDefault => '路由算法设置已重置为默认值';
|
||||
|
||||
@override
|
||||
String get appSettings_imageMessagesSection => '图片消息';
|
||||
|
||||
|
||||
@@ -3264,6 +3264,9 @@
|
||||
"settings_regionFetchNoneResponded": "Geen repeaters in de buurt hebben geantwoord. Ga dichter bij een repeater staan en probeer het opnieuw.",
|
||||
"appSettings_sourceSummary": "{label} - {description}",
|
||||
"appSettings_routingSection": "Routering",
|
||||
"appSettings_resetRoutingToDefault": "Routeringsalgoritme resetten naar standaard",
|
||||
"appSettings_resetRoutingToDefaultSubtitle": "Routeringsalgoritme-instellingen herstellen naar fabrieksstandaardwaarden",
|
||||
"appSettings_routingResetToDefault": "Routeringsalgoritme-instellingen gereset naar standaard",
|
||||
"appSettings_imageMessagesSection": "Afbeeldingsberichten",
|
||||
"appSettings_showApiKey": "API-sleutel tonen",
|
||||
"appSettings_hideApiKey": "API-sleutel verbergen",
|
||||
|
||||
@@ -3396,6 +3396,9 @@
|
||||
"settings_regionFetchNoneResponded": "Żaden pobliski przekaźnik nie odpowiedział. Zbliż się do przekaźnika i spróbuj ponownie.",
|
||||
"appSettings_sourceSummary": "{label} - {description}",
|
||||
"appSettings_routingSection": "Routing",
|
||||
"appSettings_resetRoutingToDefault": "Resetuj algorytm trasowania do domyślnych",
|
||||
"appSettings_resetRoutingToDefaultSubtitle": "Przywróć ustawienia algorytmu trasowania do fabrycznych ustawień domyślnych",
|
||||
"appSettings_routingResetToDefault": "Ustawienia algorytmu trasowania zresetowane do domyślnych",
|
||||
"appSettings_imageMessagesSection": "Wiadomości z obrazami",
|
||||
"appSettings_showApiKey": "Pokaż klucz API",
|
||||
"appSettings_hideApiKey": "Ukryj klucz API",
|
||||
|
||||
@@ -3246,6 +3246,9 @@
|
||||
"settings_regionFetchNoneResponded": "Nenhum repetidor próximo respondeu. Aproxime-se de um repetidor e tente novamente.",
|
||||
"appSettings_sourceSummary": "{label} - {description}",
|
||||
"appSettings_routingSection": "Roteamento",
|
||||
"appSettings_resetRoutingToDefault": "Redefinir algoritmo de roteamento para o padrão",
|
||||
"appSettings_resetRoutingToDefaultSubtitle": "Restaurar as configurações do algoritmo de roteamento para os valores padrão de fábrica",
|
||||
"appSettings_routingResetToDefault": "Configurações do algoritmo de roteamento redefinidas para o padrão",
|
||||
"appSettings_imageMessagesSection": "Mensagens de imagem",
|
||||
"appSettings_showApiKey": "Mostrar chave de API",
|
||||
"appSettings_hideApiKey": "Ocultar chave de API",
|
||||
|
||||
@@ -2660,6 +2660,9 @@
|
||||
"settings_regionFetchNoneResponded": "Ближайшие репитеры не ответили. Подойдите ближе к репитеру и повторите попытку.",
|
||||
"appSettings_sourceSummary": "{label} - {description}",
|
||||
"appSettings_routingSection": "Маршрутизация",
|
||||
"appSettings_resetRoutingToDefault": "Сбросить алгоритм маршрутизации к значению по умолчанию",
|
||||
"appSettings_resetRoutingToDefaultSubtitle": "Восстановить настройки алгоритма маршрутизации к заводским значениям по умолчанию",
|
||||
"appSettings_routingResetToDefault": "Настройки алгоритма маршрутизации сброшены к значению по умолчанию",
|
||||
"appSettings_imageMessagesSection": "Сообщения-изображения",
|
||||
"appSettings_showApiKey": "Показать API-ключ",
|
||||
"appSettings_hideApiKey": "Скрыть API-ключ",
|
||||
|
||||
@@ -3364,6 +3364,9 @@
|
||||
"settings_regionFetchNoneResponded": "Blízke opakovače neodpovedali. Priblížte sa k opakovaču a skúste to znova.",
|
||||
"appSettings_sourceSummary": "{label} - {description}",
|
||||
"appSettings_routingSection": "Smerovanie",
|
||||
"appSettings_resetRoutingToDefault": "Obnoviť algoritmus smerovania na predvolené",
|
||||
"appSettings_resetRoutingToDefaultSubtitle": "Obnoviť nastavenia algoritmu smerovania na továrne predvolené hodnoty",
|
||||
"appSettings_routingResetToDefault": "Nastavenia algoritmu smerovania obnovené na predvolené",
|
||||
"appSettings_imageMessagesSection": "Obrazové správy",
|
||||
"appSettings_showApiKey": "Zobraziť API kľúč",
|
||||
"appSettings_hideApiKey": "Skryť API kľúč",
|
||||
|
||||
@@ -3247,6 +3247,9 @@
|
||||
"settings_regionFetchNoneResponded": "Noben bližnji ponovitelj ni odgovoril. Približajte se ponovitelju in poskusite znova.",
|
||||
"appSettings_sourceSummary": "{label} - {description}",
|
||||
"appSettings_routingSection": "Usmerjanje",
|
||||
"appSettings_resetRoutingToDefault": "Ponastavite algoritem usmerjanja na privzeto",
|
||||
"appSettings_resetRoutingToDefaultSubtitle": "Obnovite nastavitve algoritma usmerjanja na tovarniške privzetke",
|
||||
"appSettings_routingResetToDefault": "Nastavitve algoritma usmerjanja so ponastavljene na privzeto",
|
||||
"appSettings_imageMessagesSection": "Sporočila s slikami",
|
||||
"appSettings_showApiKey": "Pokaži API ključ",
|
||||
"appSettings_hideApiKey": "Skrij API ključ",
|
||||
|
||||
@@ -3241,6 +3241,9 @@
|
||||
"settings_regionFetchNoneResponded": "Ingen repeater i närheten svarade. Flytta dig närmare en repeater och försök igen.",
|
||||
"appSettings_sourceSummary": "{label} - {description}",
|
||||
"appSettings_routingSection": "Routing",
|
||||
"appSettings_resetRoutingToDefault": "Återställ rutningsalgoritm till standard",
|
||||
"appSettings_resetRoutingToDefaultSubtitle": "Återställ rutningsalgoritmins inställningar till fabriksstandard",
|
||||
"appSettings_routingResetToDefault": "Rutningsalgoritmins inställningar återställda till standard",
|
||||
"appSettings_imageMessagesSection": "Bildmeddelanden",
|
||||
"appSettings_showApiKey": "Visa API-nyckel",
|
||||
"appSettings_hideApiKey": "Dölj API-nyckel",
|
||||
|
||||
@@ -3343,6 +3343,9 @@
|
||||
"settings_regionFetchNoneResponded": "Ближні ретранслятори не відповіли. Підійдіть ближче до ретранслятора й спробуйте ще раз.",
|
||||
"appSettings_sourceSummary": "{label} - {description}",
|
||||
"appSettings_routingSection": "Маршрутизація",
|
||||
"appSettings_resetRoutingToDefault": "Скинути алгоритм маршрутизації до типового",
|
||||
"appSettings_resetRoutingToDefaultSubtitle": "Відновити налаштування алгоритму маршрутизації до заводських значень за замовчуванням",
|
||||
"appSettings_routingResetToDefault": "Налаштування алгоритму маршрутизації скинуто до типових",
|
||||
"appSettings_imageMessagesSection": "Повідомлення із зображеннями",
|
||||
"appSettings_showApiKey": "Показати API-ключ",
|
||||
"appSettings_hideApiKey": "Приховати API-ключ",
|
||||
|
||||
@@ -3251,6 +3251,9 @@
|
||||
"settings_regionFetchNoneResponded": "附近没有中继器响应。请靠近中继器后重试。",
|
||||
"appSettings_sourceSummary": "{label} - {description}",
|
||||
"appSettings_routingSection": "路由",
|
||||
"appSettings_resetRoutingToDefault": "将路由算法重置为默认值",
|
||||
"appSettings_resetRoutingToDefaultSubtitle": "将路由算法设置恢复为出厂默认值",
|
||||
"appSettings_routingResetToDefault": "路由算法设置已重置为默认值",
|
||||
"appSettings_imageMessagesSection": "图片消息",
|
||||
"appSettings_showApiKey": "显示 API 密钥",
|
||||
"appSettings_hideApiKey": "隐藏 API 密钥",
|
||||
|
||||
@@ -96,6 +96,13 @@ class AppSettings {
|
||||
static const String stadiaDemo = '51bd0381-4685-4666-bae8-48940f6d77c0';
|
||||
static const String defaultPublicIpfsGateway = 'https://ipfs.io/ipfs/';
|
||||
|
||||
// Routing algorithm default values
|
||||
static const double defaultMaxRouteWeight = 5.0;
|
||||
static const double defaultInitialRouteWeight = 3.0;
|
||||
static const double defaultRouteWeightSuccessIncrement = 0.5;
|
||||
static const double defaultRouteWeightFailureDecrement = 0.2;
|
||||
static const int defaultMaxMessageRetries = 5;
|
||||
|
||||
final bool clearPathOnMaxRetry;
|
||||
final bool mapShowRepeaters;
|
||||
final bool mapShowChatNodes;
|
||||
@@ -255,11 +262,11 @@ class AppSettings {
|
||||
this.autoSendZeroHopAdvertOnGpsUpdate = false,
|
||||
this.gpsIntervalSeconds = 900,
|
||||
this.autoRouteRotationEnabled = true,
|
||||
this.maxRouteWeight = 5.0,
|
||||
this.initialRouteWeight = 3.0,
|
||||
this.routeWeightSuccessIncrement = 0.5,
|
||||
this.routeWeightFailureDecrement = 0.2,
|
||||
this.maxMessageRetries = 5,
|
||||
this.maxRouteWeight = defaultMaxRouteWeight,
|
||||
this.initialRouteWeight = defaultInitialRouteWeight,
|
||||
this.routeWeightSuccessIncrement = defaultRouteWeightSuccessIncrement,
|
||||
this.routeWeightFailureDecrement = defaultRouteWeightFailureDecrement,
|
||||
this.maxMessageRetries = defaultMaxMessageRetries,
|
||||
this.channelMinHopsEnabled = false,
|
||||
this.channelMinHops = 2,
|
||||
this.channelMinHopsRetries = 1,
|
||||
@@ -480,14 +487,20 @@ class AppSettings {
|
||||
(json['gps_interval_seconds'] as num?)?.toInt() ?? 900,
|
||||
autoRouteRotationEnabled:
|
||||
json['auto_route_rotation_enabled'] as bool? ?? true,
|
||||
maxRouteWeight: (json['max_route_weight'] as num?)?.toDouble() ?? 5.0,
|
||||
maxRouteWeight:
|
||||
(json['max_route_weight'] as num?)?.toDouble() ??
|
||||
defaultMaxRouteWeight,
|
||||
initialRouteWeight:
|
||||
(json['initial_route_weight'] as num?)?.toDouble() ?? 3.0,
|
||||
(json['initial_route_weight'] as num?)?.toDouble() ??
|
||||
defaultInitialRouteWeight,
|
||||
routeWeightSuccessIncrement:
|
||||
(json['route_weight_success_increment'] as num?)?.toDouble() ?? 0.5,
|
||||
(json['route_weight_success_increment'] as num?)?.toDouble() ??
|
||||
defaultRouteWeightSuccessIncrement,
|
||||
routeWeightFailureDecrement:
|
||||
(json['route_weight_failure_decrement'] as num?)?.toDouble() ?? 0.2,
|
||||
maxMessageRetries: json['max_message_retries'] as int? ?? 5,
|
||||
(json['route_weight_failure_decrement'] as num?)?.toDouble() ??
|
||||
defaultRouteWeightFailureDecrement,
|
||||
maxMessageRetries:
|
||||
json['max_message_retries'] as int? ?? defaultMaxMessageRetries,
|
||||
channelMinHopsEnabled: json['channel_min_hops_enabled'] as bool? ?? false,
|
||||
channelMinHops: json['channel_min_hops'] as int? ?? 2,
|
||||
channelMinHopsRetries: json['channel_min_hops_retries'] as int? ?? 1,
|
||||
|
||||
@@ -623,6 +623,38 @@ class AppSettingsScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
const Divider(height: 1),
|
||||
ListTile(
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 16,
|
||||
vertical: 4,
|
||||
),
|
||||
leading: const Icon(Icons.restart_alt, size: 24),
|
||||
title: Text(
|
||||
context.l10n.appSettings_resetRoutingToDefault,
|
||||
),
|
||||
subtitle: Text(
|
||||
context
|
||||
.l10n
|
||||
.appSettings_resetRoutingToDefaultSubtitle,
|
||||
),
|
||||
trailing: const Icon(
|
||||
Icons.keyboard_arrow_right,
|
||||
size: 18,
|
||||
),
|
||||
onTap: () async {
|
||||
await settingsService.resetRoutingSettingsToDefault();
|
||||
if (context.mounted) {
|
||||
showDismissibleSnackBar(
|
||||
context,
|
||||
content: Text(
|
||||
context.l10n.appSettings_routingResetToDefault,
|
||||
),
|
||||
duration: const Duration(seconds: 2),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
@@ -496,4 +496,18 @@ class AppSettingsService extends ChangeNotifier {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> resetRoutingSettingsToDefault() async {
|
||||
await updateSettings(
|
||||
_settings.copyWith(
|
||||
maxRouteWeight: AppSettings.defaultMaxRouteWeight,
|
||||
initialRouteWeight: AppSettings.defaultInitialRouteWeight,
|
||||
routeWeightSuccessIncrement:
|
||||
AppSettings.defaultRouteWeightSuccessIncrement,
|
||||
routeWeightFailureDecrement:
|
||||
AppSettings.defaultRouteWeightFailureDecrement,
|
||||
maxMessageRetries: AppSettings.defaultMaxMessageRetries,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -61,34 +61,30 @@ int _readIntOption(Socket socket, int level, int option) {
|
||||
}
|
||||
|
||||
void main() {
|
||||
test(
|
||||
'connect enables TCP keepalive with short probe timings',
|
||||
() async {
|
||||
final server = await ServerSocket.bind(InternetAddress.loopbackIPv4, 0);
|
||||
final overrides = _CapturingConnectOverrides();
|
||||
final service = TcpTransportService();
|
||||
try {
|
||||
await IOOverrides.runZoned(
|
||||
() => service.connect(
|
||||
host: InternetAddress.loopbackIPv4.address,
|
||||
port: server.port,
|
||||
),
|
||||
socketConnect: overrides.socketConnect,
|
||||
);
|
||||
final socket = overrides.socket!;
|
||||
// Linux values: SO_KEEPALIVE 9, TCP_KEEPIDLE 4, TCP_KEEPINTVL 5,
|
||||
// TCP_KEEPCNT 6.
|
||||
expect(_readIntOption(socket, RawSocketOption.levelSocket, 9), 1);
|
||||
expect(_readIntOption(socket, RawSocketOption.levelTcp, 4), 30);
|
||||
expect(_readIntOption(socket, RawSocketOption.levelTcp, 5), 10);
|
||||
expect(_readIntOption(socket, RawSocketOption.levelTcp, 6), 3);
|
||||
} finally {
|
||||
await service.disconnect();
|
||||
await server.close();
|
||||
}
|
||||
},
|
||||
skip: Platform.isLinux ? false : 'Option numbers checked are Linux ones',
|
||||
);
|
||||
test('connect enables TCP keepalive with short probe timings', () async {
|
||||
final server = await ServerSocket.bind(InternetAddress.loopbackIPv4, 0);
|
||||
final overrides = _CapturingConnectOverrides();
|
||||
final service = TcpTransportService();
|
||||
try {
|
||||
await IOOverrides.runZoned(
|
||||
() => service.connect(
|
||||
host: InternetAddress.loopbackIPv4.address,
|
||||
port: server.port,
|
||||
),
|
||||
socketConnect: overrides.socketConnect,
|
||||
);
|
||||
final socket = overrides.socket!;
|
||||
// Linux values: SO_KEEPALIVE 9, TCP_KEEPIDLE 4, TCP_KEEPINTVL 5,
|
||||
// TCP_KEEPCNT 6.
|
||||
expect(_readIntOption(socket, RawSocketOption.levelSocket, 9), 1);
|
||||
expect(_readIntOption(socket, RawSocketOption.levelTcp, 4), 30);
|
||||
expect(_readIntOption(socket, RawSocketOption.levelTcp, 5), 10);
|
||||
expect(_readIntOption(socket, RawSocketOption.levelTcp, 6), 3);
|
||||
} finally {
|
||||
await service.disconnect();
|
||||
await server.close();
|
||||
}
|
||||
}, skip: Platform.isLinux ? false : 'Option numbers checked are Linux ones');
|
||||
|
||||
test('connect/disconnect updates TCP transport state', () async {
|
||||
final server = await ServerSocket.bind(InternetAddress.loopbackIPv4, 0);
|
||||
|
||||
Reference in new issue
Block a user