Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions lib/app_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import 'models/operator_profile.dart';
import 'models/osm_node.dart';
import 'models/pending_upload.dart';
import 'models/suspected_location.dart';
import 'models/service_endpoint.dart';
import 'models/tile_provider.dart';
import 'models/search_result.dart';
import 'services/offline_area_service.dart';
Expand All @@ -31,6 +32,7 @@ import 'state/operator_profile_state.dart';
import 'state/profile_state.dart';
import 'state/search_state.dart';
import 'state/session_state.dart';
import 'state/service_registry.dart';
import 'state/settings_state.dart';
import 'state/suspected_location_state.dart';
import 'state/upload_queue_state.dart';
Expand Down Expand Up @@ -167,6 +169,14 @@ class AppState extends ChangeNotifier {
bool get hasUnreadMessages => _messagesState.hasUnreadMessages;
bool get isCheckingMessages => _messagesState.isChecking;

// API endpoint settings
List<ServiceEndpoint> get routingEndpoints => _settingsState.routingEndpoints;
List<ServiceEndpoint> get enabledRoutingEndpoints => _settingsState.enabledRoutingEndpoints;
List<ServiceEndpoint> get overpassEndpoints => _settingsState.overpassEndpoints;
List<ServiceEndpoint> get enabledOverpassEndpoints => _settingsState.enabledOverpassEndpoints;
ServiceRegistry<ServiceEndpoint> get routingRegistry => _settingsState.routingRegistry;
ServiceRegistry<ServiceEndpoint> get overpassRegistry => _settingsState.overpassRegistry;

// Tile provider state
List<TileProvider> get tileProviders => _settingsState.tileProviders;
TileType? get selectedTileType => _settingsState.selectedTileType;
Expand Down Expand Up @@ -753,6 +763,8 @@ class AppState extends ChangeNotifier {
await _settingsState.setDistanceUnit(unit);
}

// Endpoint registry methods are accessed via routingRegistry/overpassRegistry directly

// ---------- Queue Methods ----------
void clearQueue() {
_uploadQueueState.clearQueue();
Expand Down
2 changes: 1 addition & 1 deletion lib/dev_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const Duration kChangesetAutoCloseTimeout = Duration(minutes: 59); // Give up an
const double kChangesetCloseBackoffMultiplier = 2.0;

// Navigation routing configuration
const Duration kNavigationRoutingTimeout = Duration(seconds: 90); // HTTP timeout for routing requests
const Duration kNavigationRoutingTimeout = Duration(seconds: 30); // HTTP timeout for routing requests (legacy — prefer ResiliencePolicy.httpTimeout)

// Overpass API configuration
const Duration kOverpassQueryTimeout = Duration(seconds: 45); // Timeout for Overpass API queries (was 25s hardcoded)
Expand Down
18 changes: 17 additions & 1 deletion lib/localizations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,23 @@
"advancedSettings": "Erweiterte Einstellungen",
"advancedSettingsSubtitle": "Leistungs-, Warnungs- und Kachelanbieter-Einstellungen",
"proximityAlerts": "Näherungswarnungen",
"networkStatusIndicator": "Netzwerkstatus-Anzeige"
"networkStatusIndicator": "Netzwerkstatus-Anzeige",
"apiEndpoints": "API-Endpunkte",
"apiEndpointsDescription": "Prioritätsreihenfolge der API-Endpunkte konfigurieren, benutzerdefinierte Endpunkte hinzufügen oder auf Standard zurücksetzen.",
"apiEndpointRouting": "Routing",
"apiEndpointNodeSource": "Knotenquelle",
"invalidUrl": "Geben Sie eine gültige HTTPS-URL ein",
"addEndpoint": "Endpunkt hinzufügen",
"editEndpoint": "Endpunkt bearbeiten",
"resetToDefaults": "Auf Standard zurücksetzen",
"endpointName": "Endpunktname",
"endpointUrl": "Endpunkt-URL",
"endpointMaxRetries": "Max. Wiederholungen",
"endpointTimeout": "Timeout (Sekunden)",
"endpointEnabled": "Aktiviert",
"noEnabledEndpoints": "Mindestens ein Endpunkt muss aktiviert bleiben",
"confirmResetEndpoints": "Alle Endpunkte auf Standardkonfiguration zurücksetzen?",
"builtInEndpoint": "Eingebaut"
},
"proximityAlerts": {
"getNotified": "Benachrichtigung erhalten beim Annähern an Überwachungsgeräte",
Expand Down
18 changes: 17 additions & 1 deletion lib/localizations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,23 @@
"advancedSettings": "Advanced Settings",
"advancedSettingsSubtitle": "Performance, alerts, and tile provider settings",
"proximityAlerts": "Proximity Alerts",
"networkStatusIndicator": "Network Status Indicator"
"networkStatusIndicator": "Network Status Indicator",
"apiEndpoints": "API Endpoints",
"apiEndpointsDescription": "Configure API endpoint priority order, add custom endpoints, or reset to defaults.",
"apiEndpointRouting": "Routing",
"apiEndpointNodeSource": "Node Source",
"invalidUrl": "Enter a valid HTTPS URL",
"addEndpoint": "Add Endpoint",
"editEndpoint": "Edit Endpoint",
"resetToDefaults": "Reset to Defaults",
"endpointName": "Endpoint Name",
"endpointUrl": "Endpoint URL",
"endpointMaxRetries": "Max Retries",
"endpointTimeout": "Timeout (seconds)",
"endpointEnabled": "Enabled",
"noEnabledEndpoints": "At least one endpoint must remain enabled",
"confirmResetEndpoints": "Reset all endpoints to their default configuration?",
"builtInEndpoint": "Built-in"
},
"proximityAlerts": {
"getNotified": "Get notified when approaching surveillance devices",
Expand Down
18 changes: 17 additions & 1 deletion lib/localizations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,23 @@
"advancedSettings": "Configuración Avanzada",
"advancedSettingsSubtitle": "Configuración de rendimiento, alertas y proveedores de teselas",
"proximityAlerts": "Alertas de Proximidad",
"networkStatusIndicator": "Indicador de Estado de Red"
"networkStatusIndicator": "Indicador de Estado de Red",
"apiEndpoints": "Endpoints de API",
"apiEndpointsDescription": "Configurar el orden de prioridad de los endpoints de API, agregar endpoints personalizados o restablecer valores predeterminados.",
"apiEndpointRouting": "Enrutamiento",
"apiEndpointNodeSource": "Fuente de nodos",
"invalidUrl": "Ingrese una URL HTTPS válida",
"addEndpoint": "Agregar Endpoint",
"editEndpoint": "Editar Endpoint",
"resetToDefaults": "Restablecer Valores Predeterminados",
"endpointName": "Nombre del Endpoint",
"endpointUrl": "URL del Endpoint",
"endpointMaxRetries": "Máx. Reintentos",
"endpointTimeout": "Tiempo de espera (segundos)",
"endpointEnabled": "Habilitado",
"noEnabledEndpoints": "Al menos un endpoint debe permanecer habilitado",
"confirmResetEndpoints": "¿Restablecer todos los endpoints a su configuración predeterminada?",
"builtInEndpoint": "Incorporado"
},
"proximityAlerts": {
"getNotified": "Recibe notificaciones al acercarte a dispositivos de vigilancia",
Expand Down
18 changes: 17 additions & 1 deletion lib/localizations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,23 @@
"advancedSettings": "Paramètres Avancés",
"advancedSettingsSubtitle": "Paramètres de performance, alertes et fournisseurs de tuiles",
"proximityAlerts": "Alertes de Proximité",
"networkStatusIndicator": "Indicateur de Statut Réseau"
"networkStatusIndicator": "Indicateur de Statut Réseau",
"apiEndpoints": "Points d'accès API",
"apiEndpointsDescription": "Configurer l'ordre de priorité des points d'accès API, ajouter des points d'accès personnalisés ou réinitialiser aux valeurs par défaut.",
"apiEndpointRouting": "Routage",
"apiEndpointNodeSource": "Source des nœuds",
"invalidUrl": "Entrez une URL HTTPS valide",
"addEndpoint": "Ajouter un Point d'accès",
"editEndpoint": "Modifier le Point d'accès",
"resetToDefaults": "Réinitialiser aux Valeurs par Défaut",
"endpointName": "Nom du Point d'accès",
"endpointUrl": "URL du Point d'accès",
"endpointMaxRetries": "Max. Tentatives",
"endpointTimeout": "Délai d'attente (secondes)",
"endpointEnabled": "Activé",
"noEnabledEndpoints": "Au moins un point d'accès doit rester activé",
"confirmResetEndpoints": "Réinitialiser tous les points d'accès à leur configuration par défaut ?",
"builtInEndpoint": "Intégré"
},
"proximityAlerts": {
"getNotified": "Recevoir des notifications en s'approchant de dispositifs de surveillance",
Expand Down
18 changes: 17 additions & 1 deletion lib/localizations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,23 @@
"advancedSettings": "Impostazioni Avanzate",
"advancedSettingsSubtitle": "Impostazioni di prestazioni, avvisi e fornitori di tessere",
"proximityAlerts": "Avvisi di Prossimità",
"networkStatusIndicator": "Indicatore di Stato di Rete"
"networkStatusIndicator": "Indicatore di Stato di Rete",
"apiEndpoints": "Endpoint API",
"apiEndpointsDescription": "Configura l'ordine di priorità degli endpoint API, aggiungi endpoint personalizzati o ripristina i valori predefiniti.",
"apiEndpointRouting": "Routing",
"apiEndpointNodeSource": "Fonte dei nodi",
"invalidUrl": "Inserisci un URL HTTPS valido",
"addEndpoint": "Aggiungi Endpoint",
"editEndpoint": "Modifica Endpoint",
"resetToDefaults": "Ripristina Predefiniti",
"endpointName": "Nome Endpoint",
"endpointUrl": "URL Endpoint",
"endpointMaxRetries": "Max Tentativi",
"endpointTimeout": "Timeout (secondi)",
"endpointEnabled": "Abilitato",
"noEnabledEndpoints": "Almeno un endpoint deve rimanere abilitato",
"confirmResetEndpoints": "Ripristinare tutti gli endpoint alla configurazione predefinita?",
"builtInEndpoint": "Integrato"
},
"proximityAlerts": {
"getNotified": "Ricevi notifiche quando ti avvicini a dispositivi di sorveglianza",
Expand Down
18 changes: 17 additions & 1 deletion lib/localizations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,23 @@
"advancedSettings": "Geavanceerde Instellingen",
"advancedSettingsSubtitle": "Prestaties, waarschuwingen en tile provider instellingen",
"proximityAlerts": "Nabijheids Waarschuwingen",
"networkStatusIndicator": "Netwerk Status Indicator"
"networkStatusIndicator": "Netwerk Status Indicator",
"apiEndpoints": "API-eindpunten",
"apiEndpointsDescription": "Configureer de prioriteitsvolgorde van API-eindpunten, voeg aangepaste eindpunten toe of reset naar standaard.",
"apiEndpointRouting": "Routing",
"apiEndpointNodeSource": "Knooppuntbron",
"invalidUrl": "Voer een geldige HTTPS-URL in",
"addEndpoint": "Eindpunt Toevoegen",
"editEndpoint": "Eindpunt Bewerken",
"resetToDefaults": "Standaardwaarden Herstellen",
"endpointName": "Eindpuntnaam",
"endpointUrl": "Eindpunt-URL",
"endpointMaxRetries": "Max. Pogingen",
"endpointTimeout": "Timeout (seconden)",
"endpointEnabled": "Ingeschakeld",
"noEnabledEndpoints": "Minstens één eindpunt moet ingeschakeld blijven",
"confirmResetEndpoints": "Alle eindpunten terugzetten naar standaardconfiguratie?",
"builtInEndpoint": "Ingebouwd"
},
"proximityAlerts": {
"getNotified": "Krijg meldingen wanneer u surveillance apparaten nadert",
Expand Down
18 changes: 17 additions & 1 deletion lib/localizations/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,23 @@
"advancedSettings": "Ustawienia Zaawansowane",
"advancedSettingsSubtitle": "Wydajność, alerty i ustawienia dostawców kafelków",
"proximityAlerts": "Alerty Bliskości",
"networkStatusIndicator": "Wskaźnik Stanu Sieci"
"networkStatusIndicator": "Wskaźnik Stanu Sieci",
"apiEndpoints": "Punkty końcowe API",
"apiEndpointsDescription": "Skonfiguruj kolejność priorytetów punktów końcowych API, dodaj niestandardowe punkty końcowe lub przywróć wartości domyślne.",
"apiEndpointRouting": "Trasowanie",
"apiEndpointNodeSource": "Źródło węzłów",
"invalidUrl": "Wprowadź prawidłowy URL HTTPS",
"addEndpoint": "Dodaj Punkt Końcowy",
"editEndpoint": "Edytuj Punkt Końcowy",
"resetToDefaults": "Przywróć Domyślne",
"endpointName": "Nazwa Punktu Końcowego",
"endpointUrl": "URL Punktu Końcowego",
"endpointMaxRetries": "Maks. Powtórzeń",
"endpointTimeout": "Limit czasu (sekundy)",
"endpointEnabled": "Włączony",
"noEnabledEndpoints": "Co najmniej jeden punkt końcowy musi pozostać włączony",
"confirmResetEndpoints": "Przywrócić wszystkie punkty końcowe do konfiguracji domyślnej?",
"builtInEndpoint": "Wbudowany"
},
"proximityAlerts": {
"getNotified": "Otrzymuj powiadomienia przy zbliżaniu się do urządzeń nadzoru",
Expand Down
18 changes: 17 additions & 1 deletion lib/localizations/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,23 @@
"advancedSettings": "Configurações Avançadas",
"advancedSettingsSubtitle": "Configurações de desempenho, alertas e provedores de mapas",
"proximityAlerts": "Alertas de Proximidade",
"networkStatusIndicator": "Indicador de Status de Rede"
"networkStatusIndicator": "Indicador de Status de Rede",
"apiEndpoints": "Endpoints de API",
"apiEndpointsDescription": "Configurar a ordem de prioridade dos endpoints de API, adicionar endpoints personalizados ou redefinir para os padrões.",
"apiEndpointRouting": "Roteamento",
"apiEndpointNodeSource": "Fonte de nós",
"invalidUrl": "Insira um URL HTTPS válido",
"addEndpoint": "Adicionar Endpoint",
"editEndpoint": "Editar Endpoint",
"resetToDefaults": "Redefinir para Padrões",
"endpointName": "Nome do Endpoint",
"endpointUrl": "URL do Endpoint",
"endpointMaxRetries": "Máx. Tentativas",
"endpointTimeout": "Tempo limite (segundos)",
"endpointEnabled": "Habilitado",
"noEnabledEndpoints": "Pelo menos um endpoint deve permanecer habilitado",
"confirmResetEndpoints": "Redefinir todos os endpoints para a configuração padrão?",
"builtInEndpoint": "Integrado"
},
"proximityAlerts": {
"getNotified": "Receba notificações ao se aproximar de dispositivos de vigilância",
Expand Down
18 changes: 17 additions & 1 deletion lib/localizations/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,23 @@
"advancedSettings": "Gelişmiş Ayarlar",
"advancedSettingsSubtitle": "Performans, uyarılar ve döşeme sağlayıcı ayarları",
"proximityAlerts": "Yakınlık Uyarıları",
"networkStatusIndicator": "Ağ Durumu Göstergesi"
"networkStatusIndicator": "Ağ Durumu Göstergesi",
"apiEndpoints": "API Uç Noktaları",
"apiEndpointsDescription": "API uç noktası öncelik sırasını yapılandırın, özel uç noktalar ekleyin veya varsayılanlara sıfırlayın.",
"apiEndpointRouting": "Yönlendirme",
"apiEndpointNodeSource": "Düğüm kaynağı",
"invalidUrl": "Geçerli bir HTTPS URL'si girin",
"addEndpoint": "Uç Nokta Ekle",
"editEndpoint": "Uç Noktayı Düzenle",
"resetToDefaults": "Varsayılanlara Sıfırla",
"endpointName": "Uç Nokta Adı",
"endpointUrl": "Uç Nokta URL'si",
"endpointMaxRetries": "Maks. Yeniden Deneme",
"endpointTimeout": "Zaman Aşımı (saniye)",
"endpointEnabled": "Etkin",
"noEnabledEndpoints": "En az bir uç nokta etkin kalmalıdır",
"confirmResetEndpoints": "Tüm uç noktalar varsayılan yapılandırmaya sıfırlansın mı?",
"builtInEndpoint": "Yerleşik"
},
"proximityAlerts": {
"getNotified": "Gözetleme cihazlarına yaklaşırken bildirim al",
Expand Down
18 changes: 17 additions & 1 deletion lib/localizations/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,23 @@
"advancedSettings": "Розширені Налаштування",
"advancedSettingsSubtitle": "Продуктивність, сповіщення та налаштування постачальників плиток",
"proximityAlerts": "Сповіщення Про Близькість",
"networkStatusIndicator": "Індикатор Стану Мережі"
"networkStatusIndicator": "Індикатор Стану Мережі",
"apiEndpoints": "Кінцеві точки API",
"apiEndpointsDescription": "Налаштувати порядок пріоритету кінцевих точок API, додати власні кінцеві точки або скинути до стандартних.",
"apiEndpointRouting": "Маршрутизація",
"apiEndpointNodeSource": "Джерело вузлів",
"invalidUrl": "Введіть дійсну HTTPS URL-адресу",
"addEndpoint": "Додати Кінцеву Точку",
"editEndpoint": "Редагувати Кінцеву Точку",
"resetToDefaults": "Скинути до Стандартних",
"endpointName": "Назва Кінцевої Точки",
"endpointUrl": "URL Кінцевої Точки",
"endpointMaxRetries": "Макс. Спроб",
"endpointTimeout": "Тайм-аут (секунди)",
"endpointEnabled": "Увімкнено",
"noEnabledEndpoints": "Принаймні одна кінцева точка повинна залишатися увімкненою",
"confirmResetEndpoints": "Скинути всі кінцеві точки до стандартної конфігурації?",
"builtInEndpoint": "Вбудована"
},
"proximityAlerts": {
"getNotified": "Отримувати сповіщення при наближенні до пристроїв спостереження",
Expand Down
18 changes: 17 additions & 1 deletion lib/localizations/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,23 @@
"advancedSettings": "高级设置",
"advancedSettingsSubtitle": "性能、警报和地图提供商设置",
"proximityAlerts": "邻近警报",
"networkStatusIndicator": "网络状态指示器"
"networkStatusIndicator": "网络状态指示器",
"apiEndpoints": "API 端点",
"apiEndpointsDescription": "配置 API 端点优先级顺序,添加自定义端点或重置为默认值。",
"apiEndpointRouting": "路由",
"apiEndpointNodeSource": "节点来源",
"invalidUrl": "请输入有效的 HTTPS URL",
"addEndpoint": "添加端点",
"editEndpoint": "编辑端点",
"resetToDefaults": "重置为默认值",
"endpointName": "端点名称",
"endpointUrl": "端点 URL",
"endpointMaxRetries": "最大重试次数",
"endpointTimeout": "超时时间(秒)",
"endpointEnabled": "已启用",
"noEnabledEndpoints": "至少需要保留一个已启用的端点",
"confirmResetEndpoints": "将所有端点重置为默认配置?",
"builtInEndpoint": "内置"
},
"proximityAlerts": {
"getNotified": "接近监控设备时接收通知",
Expand Down
Loading
Loading