From a020eb30d0991ccd0ceb865143230d03c4f473f9 Mon Sep 17 00:00:00 2001 From: ericz Date: Sun, 8 Nov 2026 14:13:33 +0100 Subject: [PATCH] ask for download models and fix problem with reloading discovered list after import. --- documentation/settings.md | 2 +- lib/connector/meshcore_connector.dart | 6 + lib/l10n/app_en.arb | 10 + lib/l10n/app_localizations.dart | 30 ++ lib/l10n/app_localizations_bg.dart | 17 ++ lib/l10n/app_localizations_de.dart | 17 ++ lib/l10n/app_localizations_en.dart | 17 ++ lib/l10n/app_localizations_es.dart | 17 ++ lib/l10n/app_localizations_fr.dart | 17 ++ lib/l10n/app_localizations_hu.dart | 17 ++ lib/l10n/app_localizations_it.dart | 17 ++ lib/l10n/app_localizations_ja.dart | 17 ++ lib/l10n/app_localizations_ko.dart | 17 ++ lib/l10n/app_localizations_nl.dart | 17 ++ lib/l10n/app_localizations_pl.dart | 17 ++ lib/l10n/app_localizations_pt.dart | 17 ++ lib/l10n/app_localizations_ru.dart | 17 ++ lib/l10n/app_localizations_sk.dart | 17 ++ lib/l10n/app_localizations_sl.dart | 17 ++ lib/l10n/app_localizations_sv.dart | 17 ++ lib/l10n/app_localizations_uk.dart | 17 ++ lib/l10n/app_localizations_zh.dart | 17 ++ lib/models/app_settings.dart | 8 + lib/models/image_codec_support.dart | 13 + lib/screens/app_settings_screen.dart | 4 +- lib/screens/backup_restore_screen.dart | 319 ++++++++++++++++++++++ lib/services/backup_service.dart | 4 + lib/services/image_codec_service.dart | 16 +- lib/services/translation_service.dart | 11 +- test/models/image_codec_support_test.dart | 36 +++ test/services/backup_service_test.dart | 103 +++++++ untranslated.json | 85 ++++++ 32 files changed, 944 insertions(+), 9 deletions(-) diff --git a/documentation/settings.md b/documentation/settings.md index 45d15b2b..6045aef7 100644 --- a/documentation/settings.md +++ b/documentation/settings.md @@ -216,7 +216,7 @@ Choose individual items to include in a backup or restore. Location settings inc The private-key option is off by default because it changes the radio's identity. Select it only when you intend to restore that identity; the app asks for confirmation before proceeding. Some radios do not allow identity backup or restore, and the app will let you know if this feature is unavailable. -A password protects the backup file. Leave the password blank to create an unprotected file. Backups may contain your radio's private key, channel keys, messages and saved passwords, so store them carefully. Downloaded models, received image files and cached map tiles are not included. +A password protects the backup file. Leave the password blank to create an unprotected file. Backups may contain your radio's private key, channel keys, messages and saved passwords, so store them carefully. Model settings are backed up, but model files are not; after restoring, the app offers to download selected models that are missing. Download progress appears in that prompt, and closing it cancels an active download. Received image files and cached map tiles are not included. ### GPX Export diff --git a/lib/connector/meshcore_connector.dart b/lib/connector/meshcore_connector.dart index f2f3a132..017f3a4f 100644 --- a/lib/connector/meshcore_connector.dart +++ b/lib/connector/meshcore_connector.dart @@ -605,6 +605,12 @@ class MeshCoreConnector extends ChangeNotifier { return List.unmodifiable(_discoveredContacts); } + Future reloadDiscoveredContacts() async { + if (!isConnected) return; + await _loadDiscoveredContactCache(); + await updateKnownDiscovered(); + } + String exportDiscoveredContactsJson() { return _discoveryContactStore.exportContactsJson(_discoveredContacts); } diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 909eceb0..0a7a4ff0 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -235,6 +235,16 @@ "backupRestore_restore": "Restore Selected", "backupRestore_backupComplete": "Backup file created.", "backupRestore_restoreComplete": "Restore complete. Reconnect if you restored the radio identity.", + "backupRestore_missingModelsTitle": "Models Not Downloaded", + "backupRestore_missingModelsMessage": "The restored settings select models that are not available on this device:\n{models}\n\nDownload them now?", + "@backupRestore_missingModelsMessage": { + "placeholders": { + "models": {"type": "String"} + } + }, + "backupRestore_downloadModels": "Download Models", + "backupRestore_downloading": "Downloading…", + "backupRestore_cancelDownload": "Cancel Download", "backupRestore_failed": "Backup operation failed: {error}", "@backupRestore_failed": { "placeholders": { diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index 7728370c..f35fe909 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -1084,6 +1084,36 @@ abstract class AppLocalizations { /// **'Restore complete. Reconnect if you restored the radio identity.'** String get backupRestore_restoreComplete; + /// No description provided for @backupRestore_missingModelsTitle. + /// + /// In en, this message translates to: + /// **'Models Not Downloaded'** + String get backupRestore_missingModelsTitle; + + /// No description provided for @backupRestore_missingModelsMessage. + /// + /// In en, this message translates to: + /// **'The restored settings select models that are not available on this device:\n{models}\n\nDownload them now?'** + String backupRestore_missingModelsMessage(String models); + + /// No description provided for @backupRestore_downloadModels. + /// + /// In en, this message translates to: + /// **'Download Models'** + String get backupRestore_downloadModels; + + /// No description provided for @backupRestore_downloading. + /// + /// In en, this message translates to: + /// **'Downloading…'** + String get backupRestore_downloading; + + /// No description provided for @backupRestore_cancelDownload. + /// + /// In en, this message translates to: + /// **'Cancel Download'** + String get backupRestore_cancelDownload; + /// No description provided for @backupRestore_failed. /// /// In en, this message translates to: diff --git a/lib/l10n/app_localizations_bg.dart b/lib/l10n/app_localizations_bg.dart index 0e1f606e..e191175f 100644 --- a/lib/l10n/app_localizations_bg.dart +++ b/lib/l10n/app_localizations_bg.dart @@ -544,6 +544,23 @@ class AppLocalizationsBg extends AppLocalizations { String get backupRestore_restoreComplete => 'Restore complete. Reconnect if you restored the radio identity.'; + @override + String get backupRestore_missingModelsTitle => 'Models Not Downloaded'; + + @override + String backupRestore_missingModelsMessage(String models) { + return 'The restored settings select models that are not available on this device:\n$models\n\nDownload them now?'; + } + + @override + String get backupRestore_downloadModels => 'Download Models'; + + @override + String get backupRestore_downloading => 'Downloading…'; + + @override + String get backupRestore_cancelDownload => 'Cancel Download'; + @override String backupRestore_failed(String error) { return 'Backup operation failed: $error'; diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart index 367660db..1fba7ebb 100644 --- a/lib/l10n/app_localizations_de.dart +++ b/lib/l10n/app_localizations_de.dart @@ -547,6 +547,23 @@ class AppLocalizationsDe extends AppLocalizations { String get backupRestore_restoreComplete => 'Restore complete. Reconnect if you restored the radio identity.'; + @override + String get backupRestore_missingModelsTitle => 'Models Not Downloaded'; + + @override + String backupRestore_missingModelsMessage(String models) { + return 'The restored settings select models that are not available on this device:\n$models\n\nDownload them now?'; + } + + @override + String get backupRestore_downloadModels => 'Download Models'; + + @override + String get backupRestore_downloading => 'Downloading…'; + + @override + String get backupRestore_cancelDownload => 'Cancel Download'; + @override String backupRestore_failed(String error) { return 'Backup operation failed: $error'; diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index fb11ecfb..3f1dccab 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -540,6 +540,23 @@ class AppLocalizationsEn extends AppLocalizations { String get backupRestore_restoreComplete => 'Restore complete. Reconnect if you restored the radio identity.'; + @override + String get backupRestore_missingModelsTitle => 'Models Not Downloaded'; + + @override + String backupRestore_missingModelsMessage(String models) { + return 'The restored settings select models that are not available on this device:\n$models\n\nDownload them now?'; + } + + @override + String get backupRestore_downloadModels => 'Download Models'; + + @override + String get backupRestore_downloading => 'Downloading…'; + + @override + String get backupRestore_cancelDownload => 'Cancel Download'; + @override String backupRestore_failed(String error) { return 'Backup operation failed: $error'; diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart index eede141c..1fbb3f9d 100644 --- a/lib/l10n/app_localizations_es.dart +++ b/lib/l10n/app_localizations_es.dart @@ -545,6 +545,23 @@ class AppLocalizationsEs extends AppLocalizations { String get backupRestore_restoreComplete => 'Restore complete. Reconnect if you restored the radio identity.'; + @override + String get backupRestore_missingModelsTitle => 'Models Not Downloaded'; + + @override + String backupRestore_missingModelsMessage(String models) { + return 'The restored settings select models that are not available on this device:\n$models\n\nDownload them now?'; + } + + @override + String get backupRestore_downloadModels => 'Download Models'; + + @override + String get backupRestore_downloading => 'Downloading…'; + + @override + String get backupRestore_cancelDownload => 'Cancel Download'; + @override String backupRestore_failed(String error) { return 'Backup operation failed: $error'; diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart index c0ffdabb..9bb2b323 100644 --- a/lib/l10n/app_localizations_fr.dart +++ b/lib/l10n/app_localizations_fr.dart @@ -547,6 +547,23 @@ class AppLocalizationsFr extends AppLocalizations { String get backupRestore_restoreComplete => 'Restore complete. Reconnect if you restored the radio identity.'; + @override + String get backupRestore_missingModelsTitle => 'Models Not Downloaded'; + + @override + String backupRestore_missingModelsMessage(String models) { + return 'The restored settings select models that are not available on this device:\n$models\n\nDownload them now?'; + } + + @override + String get backupRestore_downloadModels => 'Download Models'; + + @override + String get backupRestore_downloading => 'Downloading…'; + + @override + String get backupRestore_cancelDownload => 'Cancel Download'; + @override String backupRestore_failed(String error) { return 'Backup operation failed: $error'; diff --git a/lib/l10n/app_localizations_hu.dart b/lib/l10n/app_localizations_hu.dart index b6bdb2a2..8332b153 100644 --- a/lib/l10n/app_localizations_hu.dart +++ b/lib/l10n/app_localizations_hu.dart @@ -543,6 +543,23 @@ class AppLocalizationsHu extends AppLocalizations { String get backupRestore_restoreComplete => 'Restore complete. Reconnect if you restored the radio identity.'; + @override + String get backupRestore_missingModelsTitle => 'Models Not Downloaded'; + + @override + String backupRestore_missingModelsMessage(String models) { + return 'The restored settings select models that are not available on this device:\n$models\n\nDownload them now?'; + } + + @override + String get backupRestore_downloadModels => 'Download Models'; + + @override + String get backupRestore_downloading => 'Downloading…'; + + @override + String get backupRestore_cancelDownload => 'Cancel Download'; + @override String backupRestore_failed(String error) { return 'Backup operation failed: $error'; diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart index e7d4f086..261d00e1 100644 --- a/lib/l10n/app_localizations_it.dart +++ b/lib/l10n/app_localizations_it.dart @@ -547,6 +547,23 @@ class AppLocalizationsIt extends AppLocalizations { String get backupRestore_restoreComplete => 'Restore complete. Reconnect if you restored the radio identity.'; + @override + String get backupRestore_missingModelsTitle => 'Models Not Downloaded'; + + @override + String backupRestore_missingModelsMessage(String models) { + return 'The restored settings select models that are not available on this device:\n$models\n\nDownload them now?'; + } + + @override + String get backupRestore_downloadModels => 'Download Models'; + + @override + String get backupRestore_downloading => 'Downloading…'; + + @override + String get backupRestore_cancelDownload => 'Cancel Download'; + @override String backupRestore_failed(String error) { return 'Backup operation failed: $error'; diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart index 37673dd9..f90ca7f9 100644 --- a/lib/l10n/app_localizations_ja.dart +++ b/lib/l10n/app_localizations_ja.dart @@ -528,6 +528,23 @@ class AppLocalizationsJa extends AppLocalizations { String get backupRestore_restoreComplete => 'Restore complete. Reconnect if you restored the radio identity.'; + @override + String get backupRestore_missingModelsTitle => 'Models Not Downloaded'; + + @override + String backupRestore_missingModelsMessage(String models) { + return 'The restored settings select models that are not available on this device:\n$models\n\nDownload them now?'; + } + + @override + String get backupRestore_downloadModels => 'Download Models'; + + @override + String get backupRestore_downloading => 'Downloading…'; + + @override + String get backupRestore_cancelDownload => 'Cancel Download'; + @override String backupRestore_failed(String error) { return 'Backup operation failed: $error'; diff --git a/lib/l10n/app_localizations_ko.dart b/lib/l10n/app_localizations_ko.dart index 7fb984ac..87d18c16 100644 --- a/lib/l10n/app_localizations_ko.dart +++ b/lib/l10n/app_localizations_ko.dart @@ -528,6 +528,23 @@ class AppLocalizationsKo extends AppLocalizations { String get backupRestore_restoreComplete => 'Restore complete. Reconnect if you restored the radio identity.'; + @override + String get backupRestore_missingModelsTitle => 'Models Not Downloaded'; + + @override + String backupRestore_missingModelsMessage(String models) { + return 'The restored settings select models that are not available on this device:\n$models\n\nDownload them now?'; + } + + @override + String get backupRestore_downloadModels => 'Download Models'; + + @override + String get backupRestore_downloading => 'Downloading…'; + + @override + String get backupRestore_cancelDownload => 'Cancel Download'; + @override String backupRestore_failed(String error) { return 'Backup operation failed: $error'; diff --git a/lib/l10n/app_localizations_nl.dart b/lib/l10n/app_localizations_nl.dart index 012ed113..7fcd961e 100644 --- a/lib/l10n/app_localizations_nl.dart +++ b/lib/l10n/app_localizations_nl.dart @@ -543,6 +543,23 @@ class AppLocalizationsNl extends AppLocalizations { String get backupRestore_restoreComplete => 'Restore complete. Reconnect if you restored the radio identity.'; + @override + String get backupRestore_missingModelsTitle => 'Models Not Downloaded'; + + @override + String backupRestore_missingModelsMessage(String models) { + return 'The restored settings select models that are not available on this device:\n$models\n\nDownload them now?'; + } + + @override + String get backupRestore_downloadModels => 'Download Models'; + + @override + String get backupRestore_downloading => 'Downloading…'; + + @override + String get backupRestore_cancelDownload => 'Cancel Download'; + @override String backupRestore_failed(String error) { return 'Backup operation failed: $error'; diff --git a/lib/l10n/app_localizations_pl.dart b/lib/l10n/app_localizations_pl.dart index effb0898..f5459540 100644 --- a/lib/l10n/app_localizations_pl.dart +++ b/lib/l10n/app_localizations_pl.dart @@ -550,6 +550,23 @@ class AppLocalizationsPl extends AppLocalizations { String get backupRestore_restoreComplete => 'Restore complete. Reconnect if you restored the radio identity.'; + @override + String get backupRestore_missingModelsTitle => 'Models Not Downloaded'; + + @override + String backupRestore_missingModelsMessage(String models) { + return 'The restored settings select models that are not available on this device:\n$models\n\nDownload them now?'; + } + + @override + String get backupRestore_downloadModels => 'Download Models'; + + @override + String get backupRestore_downloading => 'Downloading…'; + + @override + String get backupRestore_cancelDownload => 'Cancel Download'; + @override String backupRestore_failed(String error) { return 'Backup operation failed: $error'; diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart index 6bfa701f..c2990dd6 100644 --- a/lib/l10n/app_localizations_pt.dart +++ b/lib/l10n/app_localizations_pt.dart @@ -546,6 +546,23 @@ class AppLocalizationsPt extends AppLocalizations { String get backupRestore_restoreComplete => 'Restore complete. Reconnect if you restored the radio identity.'; + @override + String get backupRestore_missingModelsTitle => 'Models Not Downloaded'; + + @override + String backupRestore_missingModelsMessage(String models) { + return 'The restored settings select models that are not available on this device:\n$models\n\nDownload them now?'; + } + + @override + String get backupRestore_downloadModels => 'Download Models'; + + @override + String get backupRestore_downloading => 'Downloading…'; + + @override + String get backupRestore_cancelDownload => 'Cancel Download'; + @override String backupRestore_failed(String error) { return 'Backup operation failed: $error'; diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart index 626351fd..dbc6c731 100644 --- a/lib/l10n/app_localizations_ru.dart +++ b/lib/l10n/app_localizations_ru.dart @@ -546,6 +546,23 @@ class AppLocalizationsRu extends AppLocalizations { String get backupRestore_restoreComplete => 'Restore complete. Reconnect if you restored the radio identity.'; + @override + String get backupRestore_missingModelsTitle => 'Models Not Downloaded'; + + @override + String backupRestore_missingModelsMessage(String models) { + return 'The restored settings select models that are not available on this device:\n$models\n\nDownload them now?'; + } + + @override + String get backupRestore_downloadModels => 'Download Models'; + + @override + String get backupRestore_downloading => 'Downloading…'; + + @override + String get backupRestore_cancelDownload => 'Cancel Download'; + @override String backupRestore_failed(String error) { return 'Backup operation failed: $error'; diff --git a/lib/l10n/app_localizations_sk.dart b/lib/l10n/app_localizations_sk.dart index 34c98ba8..6d955ff3 100644 --- a/lib/l10n/app_localizations_sk.dart +++ b/lib/l10n/app_localizations_sk.dart @@ -546,6 +546,23 @@ class AppLocalizationsSk extends AppLocalizations { String get backupRestore_restoreComplete => 'Restore complete. Reconnect if you restored the radio identity.'; + @override + String get backupRestore_missingModelsTitle => 'Models Not Downloaded'; + + @override + String backupRestore_missingModelsMessage(String models) { + return 'The restored settings select models that are not available on this device:\n$models\n\nDownload them now?'; + } + + @override + String get backupRestore_downloadModels => 'Download Models'; + + @override + String get backupRestore_downloading => 'Downloading…'; + + @override + String get backupRestore_cancelDownload => 'Cancel Download'; + @override String backupRestore_failed(String error) { return 'Backup operation failed: $error'; diff --git a/lib/l10n/app_localizations_sl.dart b/lib/l10n/app_localizations_sl.dart index c397c6a3..a4049f8e 100644 --- a/lib/l10n/app_localizations_sl.dart +++ b/lib/l10n/app_localizations_sl.dart @@ -545,6 +545,23 @@ class AppLocalizationsSl extends AppLocalizations { String get backupRestore_restoreComplete => 'Restore complete. Reconnect if you restored the radio identity.'; + @override + String get backupRestore_missingModelsTitle => 'Models Not Downloaded'; + + @override + String backupRestore_missingModelsMessage(String models) { + return 'The restored settings select models that are not available on this device:\n$models\n\nDownload them now?'; + } + + @override + String get backupRestore_downloadModels => 'Download Models'; + + @override + String get backupRestore_downloading => 'Downloading…'; + + @override + String get backupRestore_cancelDownload => 'Cancel Download'; + @override String backupRestore_failed(String error) { return 'Backup operation failed: $error'; diff --git a/lib/l10n/app_localizations_sv.dart b/lib/l10n/app_localizations_sv.dart index 9ed2b494..c64fe9cd 100644 --- a/lib/l10n/app_localizations_sv.dart +++ b/lib/l10n/app_localizations_sv.dart @@ -541,6 +541,23 @@ class AppLocalizationsSv extends AppLocalizations { String get backupRestore_restoreComplete => 'Restore complete. Reconnect if you restored the radio identity.'; + @override + String get backupRestore_missingModelsTitle => 'Models Not Downloaded'; + + @override + String backupRestore_missingModelsMessage(String models) { + return 'The restored settings select models that are not available on this device:\n$models\n\nDownload them now?'; + } + + @override + String get backupRestore_downloadModels => 'Download Models'; + + @override + String get backupRestore_downloading => 'Downloading…'; + + @override + String get backupRestore_cancelDownload => 'Cancel Download'; + @override String backupRestore_failed(String error) { return 'Backup operation failed: $error'; diff --git a/lib/l10n/app_localizations_uk.dart b/lib/l10n/app_localizations_uk.dart index fd931301..44ffe2ab 100644 --- a/lib/l10n/app_localizations_uk.dart +++ b/lib/l10n/app_localizations_uk.dart @@ -545,6 +545,23 @@ class AppLocalizationsUk extends AppLocalizations { String get backupRestore_restoreComplete => 'Restore complete. Reconnect if you restored the radio identity.'; + @override + String get backupRestore_missingModelsTitle => 'Models Not Downloaded'; + + @override + String backupRestore_missingModelsMessage(String models) { + return 'The restored settings select models that are not available on this device:\n$models\n\nDownload them now?'; + } + + @override + String get backupRestore_downloadModels => 'Download Models'; + + @override + String get backupRestore_downloading => 'Downloading…'; + + @override + String get backupRestore_cancelDownload => 'Cancel Download'; + @override String backupRestore_failed(String error) { return 'Backup operation failed: $error'; diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart index 6edd82ac..a78a0b1a 100644 --- a/lib/l10n/app_localizations_zh.dart +++ b/lib/l10n/app_localizations_zh.dart @@ -522,6 +522,23 @@ class AppLocalizationsZh extends AppLocalizations { String get backupRestore_restoreComplete => 'Restore complete. Reconnect if you restored the radio identity.'; + @override + String get backupRestore_missingModelsTitle => 'Models Not Downloaded'; + + @override + String backupRestore_missingModelsMessage(String models) { + return 'The restored settings select models that are not available on this device:\n$models\n\nDownload them now?'; + } + + @override + String get backupRestore_downloadModels => 'Download Models'; + + @override + String get backupRestore_downloading => 'Downloading…'; + + @override + String get backupRestore_cancelDownload => 'Cancel Download'; + @override String backupRestore_failed(String error) { return 'Backup operation failed: $error'; diff --git a/lib/models/app_settings.dart b/lib/models/app_settings.dart index 023807d5..9b2b80b6 100644 --- a/lib/models/app_settings.dart +++ b/lib/models/app_settings.dart @@ -110,6 +110,7 @@ class AppSettings { final bool mapShowChatNodes; final bool mapShowOtherNodes; final bool mapShowOnlineLinks; + final bool mapUseOnlineMapForPaths; final bool mapShowOverlaps; final double mapTimeFilterHours; // 0 = all time final bool mapKeyPrefixEnabled; @@ -263,6 +264,7 @@ class AppSettings { this.mapShowChatNodes = true, this.mapShowOtherNodes = true, this.mapShowOnlineLinks = true, + this.mapUseOnlineMapForPaths = false, this.mapShowOverlaps = false, this.mapTimeFilterHours = 168, this.mapKeyPrefixEnabled = false, @@ -359,6 +361,7 @@ class AppSettings { 'map_show_chat_nodes': mapShowChatNodes, 'map_show_other_nodes': mapShowOtherNodes, 'map_show_online_links': mapShowOnlineLinks, + 'map_use_online_map_for_paths': mapUseOnlineMapForPaths, 'map_show_overlaps': mapShowOverlaps, 'map_time_filter_hours': mapTimeFilterHours, 'map_key_prefix_enabled': mapKeyPrefixEnabled, @@ -492,6 +495,8 @@ class AppSettings { mapShowChatNodes: json['map_show_chat_nodes'] as bool? ?? true, mapShowOtherNodes: json['map_show_other_nodes'] as bool? ?? true, mapShowOnlineLinks: json['map_show_online_links'] as bool? ?? true, + mapUseOnlineMapForPaths: + json['map_use_online_map_for_paths'] as bool? ?? false, mapShowOverlaps: json['map_show_overlaps'] as bool? ?? false, mapTimeFilterHours: (json['map_time_filter_hours'] as num?)?.toDouble() ?? 168, @@ -666,6 +671,7 @@ class AppSettings { bool? mapShowChatNodes, bool? mapShowOtherNodes, bool? mapShowOnlineLinks, + bool? mapUseOnlineMapForPaths, bool? mapShowOverlaps, double? mapTimeFilterHours, bool? mapKeyPrefixEnabled, @@ -746,6 +752,8 @@ class AppSettings { mapShowChatNodes: mapShowChatNodes ?? this.mapShowChatNodes, mapShowOtherNodes: mapShowOtherNodes ?? this.mapShowOtherNodes, mapShowOnlineLinks: mapShowOnlineLinks ?? this.mapShowOnlineLinks, + mapUseOnlineMapForPaths: + mapUseOnlineMapForPaths ?? this.mapUseOnlineMapForPaths, mapShowOverlaps: mapShowOverlaps ?? this.mapShowOverlaps, mapTimeFilterHours: mapTimeFilterHours ?? this.mapTimeFilterHours, mapKeyPrefixEnabled: mapKeyPrefixEnabled ?? this.mapKeyPrefixEnabled, diff --git a/lib/models/image_codec_support.dart b/lib/models/image_codec_support.dart index e11476b3..9c93f804 100644 --- a/lib/models/image_codec_support.dart +++ b/lib/models/image_codec_support.dart @@ -481,6 +481,19 @@ class ImageCodecModelSpec { maybeAssetFor(ImageCodecAssetRole.entropyGraph) != null && maybeAssetFor(ImageCodecAssetRole.entropyDecodeGraph) != null && maybeAssetFor(ImageCodecAssetRole.cdfTables) != null; + + bool hasCompleteInstalledRecord( + Iterable downloadedModels, + ) => downloadedModels.any( + (record) => + record.id == id && + record.bundleVersion >= kImageCodecBundleVersion && + assets.every( + (asset) => + record.assetFileNames.contains(asset.fileName) && + record.assetRoles[asset.fileName] == asset.role, + ), + ); } /// The set of on-disk paths a codec session needs, replacing the bare diff --git a/lib/screens/app_settings_screen.dart b/lib/screens/app_settings_screen.dart index a346d135..7187fd62 100644 --- a/lib/screens/app_settings_screen.dart +++ b/lib/screens/app_settings_screen.dart @@ -942,7 +942,7 @@ class AppSettingsScreen extends StatelessWidget { ) { final textTheme = Theme.of(context).textTheme; final scheme = Theme.of(context).colorScheme; - final alreadyHave = codec.availableModels.any((m) => m.id == spec.id); + final alreadyHave = spec.hasCompleteInstalledRecord(codec.availableModels); // downloadPresetModel throws StateError on a placeholder URL, deliberately, // so the button must not be offerable until the weights are published. final blocked = spec.urlsArePlaceholders; @@ -1001,7 +1001,7 @@ class AppSettingsScreen extends StatelessWidget { final l10n = context.l10n; try { await codec.downloadPresetModel(spec); - } on Exception catch (error) { + } catch (error) { messenger.showSnackBar( SnackBar( content: Text(l10n.imageMessages_downloadFailedWithError('$error')), diff --git a/lib/screens/backup_restore_screen.dart b/lib/screens/backup_restore_screen.dart index c152dcc1..84b47d2a 100644 --- a/lib/screens/backup_restore_screen.dart +++ b/lib/screens/backup_restore_screen.dart @@ -10,8 +10,12 @@ import 'package:share_plus/share_plus.dart'; import '../connector/meshcore_connector.dart'; import '../helpers/snack_bar_builder.dart'; import '../l10n/l10n.dart'; +import '../models/image_codec_support.dart'; +import '../models/translation_support.dart'; import '../services/app_settings_service.dart'; import '../services/backup_service.dart'; +import '../services/image_codec_service.dart'; +import '../services/translation_service.dart'; import '../services/message_filter/message_filter_service.dart'; import '../utils/platform_info.dart'; import '../utils/share_origin.dart'; @@ -429,6 +433,8 @@ class _BackupRestoreScreenState extends State { final connector = context.read(); final appSettingsService = context.read(); final messageFilterService = context.read(); + final translationService = context.read(); + final imageCodecService = context.read(); final needsKeyConfirmation = _selectedItems.contains(BackupItem.privateKey); if (needsKeyConfirmation && !await _confirmIdentityReplacement()) return; setState(() => _busy = true); @@ -447,6 +453,13 @@ class _BackupRestoreScreenState extends State { item == BackupItem.stadiaMapKey, )) { await appSettingsService.loadSettings(); + if (_selectedItems.contains(BackupItem.appSettings)) { + await _offerMissingModels( + appSettingsService, + translationService, + imageCodecService, + ); + } } if (_selectedItems.contains(BackupItem.channelFilters)) { await messageFilterService.load(); @@ -476,6 +489,312 @@ class _BackupRestoreScreenState extends State { } } + Future _offerMissingModels( + AppSettingsService appSettingsService, + TranslationService translationService, + ImageCodecService imageCodecService, + ) async { + if (PlatformInfo.isWeb) return; + final settings = appSettingsService.settings; + final translationId = settings.translationSelectedModelId; + final imageCodecId = settings.imageCodecSelectedModelId; + + TranslationModelRecord? translationModel; + for (final model in settings.translationDownloadedModels) { + if (model.id == translationId) { + translationModel = model; + break; + } + } + for (final model in translationPresetModels) { + if (model.id == translationId) { + translationModel ??= model; + break; + } + } + if (translationModel == null && + translationId != null && + settings.translationModelSourceUrl != null) { + final uri = Uri.tryParse(settings.translationModelSourceUrl!); + final pathSegments = uri?.pathSegments ?? const []; + final fileName = pathSegments.isEmpty ? null : pathSegments.last; + translationModel = TranslationModelRecord( + id: translationId, + name: fileName?.isNotEmpty == true ? fileName! : translationId, + sourceUrl: settings.translationModelSourceUrl!, + localPath: '', + downloadedAt: DateTime.fromMillisecondsSinceEpoch(0), + fileSizeBytes: 0, + ); + } + + ImageCodecModelRecord? imageCodecModel; + for (final model in settings.imageCodecDownloadedModels) { + if (model.id == imageCodecId) { + imageCodecModel = model; + break; + } + } + ImageCodecModelSpec? imageCodecSpec; + for (final spec in imageCodecPresetModels) { + if (spec.id == imageCodecId) { + imageCodecSpec = spec; + break; + } + } + if (imageCodecModel == null && imageCodecSpec != null) { + final graph = imageCodecSpec.graph; + imageCodecModel = ImageCodecModelRecord( + id: imageCodecSpec.id, + name: graph.fileName, + sourceUrl: graph.sourceUrl, + localPath: '', + downloadedAt: DateTime.fromMillisecondsSinceEpoch(0), + fileSizeBytes: imageCodecSpec.totalSizeBytes, + assetFileNames: [ + for (final asset in imageCodecSpec.assets) asset.fileName, + ], + bundleVersion: kImageCodecBundleVersion, + ); + } else if (imageCodecModel == null && + imageCodecId != null && + settings.imageCodecModelSourceUrl != null) { + final uri = Uri.tryParse(settings.imageCodecModelSourceUrl!); + final pathSegments = uri?.pathSegments ?? const []; + final fileName = pathSegments.isEmpty ? null : pathSegments.last; + imageCodecModel = ImageCodecModelRecord( + id: imageCodecId, + name: fileName?.isNotEmpty == true ? fileName! : imageCodecId, + sourceUrl: settings.imageCodecModelSourceUrl!, + localPath: '', + downloadedAt: DateTime.fromMillisecondsSinceEpoch(0), + fileSizeBytes: 0, + ); + } + + await translationService.refreshDownloadedModels(clearMissing: true); + await imageCodecService.refreshDownloadedModels(clearMissing: true); + + final translationRequest = translationModel; + final translationMissing = + translationRequest != null && + !translationService.availableModels.any( + (model) => + model.id == translationRequest.id || + model.name == translationRequest.name, + ); + ImageCodecModelRecord? installedCodec; + if (imageCodecModel != null) { + for (final model in imageCodecService.availableModels) { + if (model.id == imageCodecModel.id || + model.name == imageCodecModel.name) { + installedCodec = model; + break; + } + } + } + final codecRequest = imageCodecModel; + final installedCodecForCheck = installedCodec; + final imageCodecMissing = + codecRequest != null && + (imageCodecSpec != null + ? !imageCodecSpec.hasCompleteInstalledRecord( + imageCodecService.availableModels, + ) + : installedCodecForCheck == null); + if (!translationMissing && !imageCodecMissing) return; + if (!mounted) return; + + await _showModelDownloadDialog( + translationModel: translationMissing ? translationRequest : null, + imageCodecModel: imageCodecMissing ? codecRequest : null, + imageCodecSpec: imageCodecMissing ? imageCodecSpec : null, + translationService: translationService, + imageCodecService: imageCodecService, + ); + } + + Future _showModelDownloadDialog({ + required TranslationModelRecord? translationModel, + required ImageCodecModelRecord? imageCodecModel, + required ImageCodecModelSpec? imageCodecSpec, + required TranslationService translationService, + required ImageCodecService imageCodecService, + }) async { + final l10n = context.l10n; + final modelNames = [ + if (translationModel != null) + translationModelFriendlyName(translationModel), + if (imageCodecModel != null) + imageCodecSpec?.label ?? imageCodecModel.name, + ]; + var starting = false; + var cancelRequested = false; + var translationDone = translationModel == null; + var imageCodecDone = imageCodecModel == null; + String? currentModel; + String? downloadError; + final servicesListenable = Listenable.merge([ + translationService, + imageCodecService, + ]); + + await showDialog( + context: context, + barrierDismissible: true, + builder: (dialogContext) => StatefulBuilder( + builder: (dialogContext, setDialogState) => AnimatedBuilder( + animation: servicesListenable, + builder: (context, _) { + final isDownloading = + starting || + translationService.isDownloading || + imageCodecService.isDownloading; + final currentProgress = currentModel == translationModel?.name + ? translationService.downloadProgress + : currentModel == imageCodecModel?.name + ? imageCodecService.downloadProgress + : null; + final currentFile = currentModel == translationModel?.name + ? translationService.downloadFileName + : currentModel == imageCodecModel?.name + ? imageCodecService.downloadFileName + : null; + + void requestDownloadCancel() { + cancelRequested = true; + translationService.cancelDownload(); + imageCodecService.cancelDownload(); + } + + return PopScope( + canPop: !isDownloading, + onPopInvokedWithResult: (didPop, _) { + if (!didPop && isDownloading) requestDownloadCancel(); + }, + child: AlertDialog( + title: Text(l10n.backupRestore_missingModelsTitle), + content: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + l10n.backupRestore_missingModelsMessage( + modelNames.join('\n'), + ), + ), + if (isDownloading) ...[ + const SizedBox(height: 16), + Text(currentFile ?? currentModel ?? ''), + const SizedBox(height: 8), + LinearProgressIndicator(value: currentProgress), + ], + if (downloadError != null) ...[ + const SizedBox(height: 12), + Text( + l10n.backupRestore_failed(downloadError!), + style: TextStyle( + color: Theme.of(context).colorScheme.error, + ), + ), + ], + ], + ), + actions: [ + TextButton( + onPressed: () { + if (isDownloading) { + requestDownloadCancel(); + } else { + Navigator.pop(dialogContext); + } + }, + child: Text( + isDownloading + ? l10n.backupRestore_cancelDownload + : l10n.common_cancel, + ), + ), + FilledButton( + onPressed: isDownloading + ? null + : () async { + setDialogState(() { + starting = true; + currentModel = translationDone + ? imageCodecModel?.name + : translationModel?.name; + downloadError = null; + }); + try { + if (!translationDone) { + final model = translationModel!; + if (model.sourceUrl.isEmpty) { + throw StateError( + 'No download address is available for ${model.name}', + ); + } + await translationService.downloadModel( + sourceUrl: model.sourceUrl, + fileName: model.name, + id: model.id, + ); + translationDone = true; + setDialogState(() { + currentModel = imageCodecModel?.name; + }); + } + if (!imageCodecDone) { + final model = imageCodecModel!; + final spec = imageCodecSpec; + if (spec != null) { + await imageCodecService.downloadPresetModel( + spec, + ); + } else if (model.sourceUrl.isNotEmpty) { + await imageCodecService.downloadModel( + sourceUrl: model.sourceUrl, + fileName: model.name, + id: model.id, + ); + } else { + throw StateError( + 'No download address is available for ${model.name}', + ); + } + imageCodecDone = true; + } + if (dialogContext.mounted) { + Navigator.pop(dialogContext); + } + } catch (error) { + if (dialogContext.mounted) { + if (cancelRequested) { + Navigator.pop(dialogContext); + } else { + setDialogState(() { + starting = false; + downloadError = error.toString(); + }); + } + } + } + }, + child: Text( + isDownloading + ? l10n.backupRestore_downloading + : l10n.backupRestore_downloadModels, + ), + ), + ], + ), + ); + }, + ), + ), + ); + } + Future _confirmIdentityReplacement() async { final l10n = context.l10n; return await showDialog( diff --git a/lib/services/backup_service.dart b/lib/services/backup_service.dart index e24ca0c5..13048808 100644 --- a/lib/services/backup_service.dart +++ b/lib/services/backup_service.dart @@ -480,6 +480,10 @@ class BackupService { ); } } + if (!importingIdentity && + selectedItems.contains(BackupItem.discoveredContacts)) { + await connector.reloadDiscoveredContacts(); + } if (replaceContacts) { await _restoreRadioContacts(connector, destinationPublicKey); } diff --git a/lib/services/image_codec_service.dart b/lib/services/image_codec_service.dart index fa1936fb..edf5e0e5 100644 --- a/lib/services/image_codec_service.dart +++ b/lib/services/image_codec_service.dart @@ -385,7 +385,7 @@ class ImageCodecService extends ChangeNotifier implements ImageSendCodec { /// /// Call once at startup, next to /// `await translationService.refreshDownloadedModels();` in `main.dart`. - Future refreshDownloadedModels() async { + Future refreshDownloadedModels({bool clearMissing = false}) async { if (_isDownloading) return; await _settingsStore.load(); if (kIsWeb) { @@ -393,7 +393,7 @@ class ImageCodecService extends ChangeNotifier implements ImageSendCodec { return; } final scanned = await _fileStore.scanDownloadedModels(); - if (scanned.isEmpty) { + if (scanned.isEmpty && !clearMissing) { _notify(); return; } @@ -405,6 +405,9 @@ class ImageCodecService extends ChangeNotifier implements ImageSendCodec { final existingByPath = { for (final model in preferences.downloadedModels) model.localPath: model, }; + final existingByName = { + for (final model in preferences.downloadedModels) model.name: model, + }; final merged = []; // Every filename the registry knows about, so a half-installed bundle's // leftovers are never mistaken for standalone models. @@ -457,9 +460,14 @@ class ImageCodecService extends ChangeNotifier implements ImageSendCodec { // as its own single-file record so a hand-fetched graph is not deleted. for (final model in scanned) { if (claimed.contains(model.name)) continue; - final existing = existingByPath[model.localPath]; + final existing = + existingByPath[model.localPath] ?? existingByName[model.name]; merged.add( - existing?.copyWith(fileSizeBytes: model.fileSizeBytes) ?? model, + existing?.copyWith( + localPath: model.localPath, + fileSizeBytes: model.fileSizeBytes, + ) ?? + model, ); } diff --git a/lib/services/translation_service.dart b/lib/services/translation_service.dart index 0be08c4e..27fbaaff 100644 --- a/lib/services/translation_service.dart +++ b/lib/services/translation_service.dart @@ -142,18 +142,25 @@ class TranslationService extends ChangeNotifier { return availableModels.isNotEmpty ? availableModels.first : null; } - Future refreshDownloadedModels() async { + Future refreshDownloadedModels({bool clearMissing = false}) async { if (_isDownloading) return; final scanned = await _fileStore.scanDownloadedModels(); + if (scanned.isEmpty && !clearMissing) return; if (scanned.isEmpty) { + await _appSettingsService.setTranslationDownloadedModels(const []); return; } final existingByPath = { for (final model in _settings.translationDownloadedModels) model.localPath: model, }; + final existingByName = { + for (final model in _settings.translationDownloadedModels) + model.name: model, + }; final merged = scanned.map((model) { - final existing = existingByPath[model.localPath]; + final existing = + existingByPath[model.localPath] ?? existingByName[model.name]; if (existing == null) { return model; } diff --git a/test/models/image_codec_support_test.dart b/test/models/image_codec_support_test.dart index 5a9d7cf0..6d02ddc6 100644 --- a/test/models/image_codec_support_test.dart +++ b/test/models/image_codec_support_test.dart @@ -454,6 +454,42 @@ void main() { expect(sendOnly.isComplete, isFalse); }); + test('only considers a complete bundle installed', () { + final spec = imageCodecPresetModels.single; + ImageCodecModelRecord record({ + required int bundleVersion, + required List assetFileNames, + required Map assetRoles, + }) => ImageCodecModelRecord( + id: spec.id, + name: spec.fileName, + sourceUrl: spec.graph.sourceUrl, + localPath: '/models/${spec.fileName}', + downloadedAt: DateTime.fromMillisecondsSinceEpoch(0), + fileSizeBytes: 10, + assetFileNames: assetFileNames, + assetRoles: assetRoles, + bundleVersion: bundleVersion, + ); + + final completeRecord = record( + bundleVersion: kImageCodecBundleVersion, + assetFileNames: [for (final asset in spec.assets) asset.fileName], + assetRoles: { + for (final asset in spec.assets) asset.fileName: asset.role, + }, + ); + final partialRecord = record( + bundleVersion: 0, + assetFileNames: [spec.fileName], + assetRoles: {spec.fileName: ImageCodecAssetRole.decoderGraph}, + ); + + expect(spec.hasCompleteInstalledRecord([completeRecord]), isTrue); + expect(spec.hasCompleteInstalledRecord([partialRecord]), isFalse); + expect(spec.hasCompleteInstalledRecord([]), isFalse); + }); + test('uses the HuggingFace resolve/main URL shape', () { for (final asset in imageCodecPresetModels.single.assets) { expect(asset.sourceUrl, startsWith('https://huggingface.co/')); diff --git a/test/services/backup_service_test.dart b/test/services/backup_service_test.dart index 9cf07dd4..ad6e46ce 100644 --- a/test/services/backup_service_test.dart +++ b/test/services/backup_service_test.dart @@ -3,11 +3,44 @@ import 'dart:convert'; import 'package:flutter_test/flutter_test.dart'; import 'package:meshcore_open/connector/meshcore_connector.dart'; import 'package:meshcore_open/models/app_settings.dart'; +import 'package:meshcore_open/models/image_codec_support.dart'; +import 'package:meshcore_open/models/translation_support.dart'; import 'package:meshcore_open/services/app_settings_service.dart'; +import 'package:meshcore_open/services/image_codec_file_store.dart'; +import 'package:meshcore_open/services/image_codec_service.dart'; +import 'package:meshcore_open/services/image_codec_settings_store.dart'; +import 'package:meshcore_open/services/translation_file_store.dart'; +import 'package:meshcore_open/services/translation_service.dart'; import 'package:meshcore_open/services/backup_service.dart'; import 'package:meshcore_open/storage/prefs_manager.dart'; import 'package:shared_preferences/shared_preferences.dart'; +class _EmptyTranslationFileStore extends TranslationFileStore { + @override + Future> scanDownloadedModels() async => const []; +} + +class _EmptyImageCodecFileStore extends ImageCodecFileStore { + @override + Future> scanDownloadedModels() async => const []; +} + +class _AppSettingsCodecStore implements ImageCodecSettingsStore { + _AppSettingsCodecStore(this.service); + + final AppSettingsService service; + + @override + ImageCodecPreferences get preferences => service.settings.imageCodec; + + @override + Future load() async {} + + @override + Future save(ImageCodecPreferences preferences) => + service.setImageCodecPreferences(preferences); +} + void main() { const payload = { 'format': 'meshcore-open-backup', @@ -26,6 +59,7 @@ void main() { SharedPreferences.setMockInitialValues({ 'app_settings': jsonEncode({ 'theme_mode': 'dark', + 'map_use_online_map_for_paths': true, 'upload_ipfs_api_key': 'ipfs-secret', 'map_tile_api_key': 'stadia-secret', 'custom_themes': [ @@ -60,6 +94,7 @@ void main() { final appSettings = values['app_settings'] as Map; expect(appSettings, isNot(contains('upload_ipfs_api_key'))); expect(appSettings, isNot(contains('map_tile_api_key'))); + expect(appSettings['map_use_online_map_for_paths'], isTrue); expect(values['node_banner_txt'], 'banner text'); expect(values['node_banner_expires_ms'], 123); expect(json, contains('"theme_mode": "dark"')); @@ -178,6 +213,74 @@ void main() { ); }); + group('restored model registry reconciliation', () { + test( + 'removes model records absent from disk but retains selections', + () async { + SharedPreferences.setMockInitialValues({}); + PrefsManager.reset(); + await PrefsManager.initialize(); + addTearDown(PrefsManager.reset); + final settingsService = AppSettingsService(); + addTearDown(settingsService.dispose); + final downloadedAt = DateTime(2026); + await settingsService.updateSettings( + AppSettings( + mapUseOnlineMapForPaths: true, + translationSelectedModelId: 'translation-model', + translationDownloadedModels: [ + TranslationModelRecord( + id: 'translation-model', + name: 'translation.gguf', + sourceUrl: 'https://example.com/translation.gguf', + localPath: '/old-device/translation.gguf', + downloadedAt: downloadedAt, + fileSizeBytes: 100, + ), + ], + imageCodecSelectedModelId: 'image-model', + imageCodecDownloadedModels: [ + ImageCodecModelRecord( + id: 'image-model', + name: 'image.onnx', + sourceUrl: 'https://example.com/image.onnx', + localPath: '/old-device/image.onnx', + downloadedAt: downloadedAt, + fileSizeBytes: 100, + ), + ], + ), + ); + final translationService = TranslationService( + settingsService, + fileStore: _EmptyTranslationFileStore(), + ); + final imageCodecService = ImageCodecService( + settingsService, + fileStore: _EmptyImageCodecFileStore(), + settingsStore: _AppSettingsCodecStore(settingsService), + ); + addTearDown(translationService.dispose); + addTearDown(imageCodecService.dispose); + + await translationService.refreshDownloadedModels(clearMissing: true); + await imageCodecService.refreshDownloadedModels(clearMissing: true); + + expect(settingsService.settings.translationDownloadedModels, isEmpty); + expect(settingsService.settings.mapUseOnlineMapForPaths, isTrue); + expect( + settingsService.settings.translationSelectedModelId, + 'translation-model', + ); + expect(settingsService.settings.imageCodecDownloadedModels, isEmpty); + expect( + settingsService.settings.imageCodecSelectedModelId, + 'image-model', + ); + }, + ); + }); + group('BackupService import inspection', () { test( 'identifies only the fields present in an official app backup', diff --git a/untranslated.json b/untranslated.json index e3fb0acb..bb36aa81 100644 --- a/untranslated.json +++ b/untranslated.json @@ -45,6 +45,11 @@ "backupRestore_restore", "backupRestore_backupComplete", "backupRestore_restoreComplete", + "backupRestore_missingModelsTitle", + "backupRestore_missingModelsMessage", + "backupRestore_downloadModels", + "backupRestore_downloading", + "backupRestore_cancelDownload", "backupRestore_failed", "backupRestore_fileTooLarge", "backupRestore_selectAtLeastOne", @@ -98,6 +103,11 @@ "backupRestore_restore", "backupRestore_backupComplete", "backupRestore_restoreComplete", + "backupRestore_missingModelsTitle", + "backupRestore_missingModelsMessage", + "backupRestore_downloadModels", + "backupRestore_downloading", + "backupRestore_cancelDownload", "backupRestore_failed", "backupRestore_fileTooLarge", "backupRestore_selectAtLeastOne", @@ -151,6 +161,11 @@ "backupRestore_restore", "backupRestore_backupComplete", "backupRestore_restoreComplete", + "backupRestore_missingModelsTitle", + "backupRestore_missingModelsMessage", + "backupRestore_downloadModels", + "backupRestore_downloading", + "backupRestore_cancelDownload", "backupRestore_failed", "backupRestore_fileTooLarge", "backupRestore_selectAtLeastOne", @@ -204,6 +219,11 @@ "backupRestore_restore", "backupRestore_backupComplete", "backupRestore_restoreComplete", + "backupRestore_missingModelsTitle", + "backupRestore_missingModelsMessage", + "backupRestore_downloadModels", + "backupRestore_downloading", + "backupRestore_cancelDownload", "backupRestore_failed", "backupRestore_fileTooLarge", "backupRestore_selectAtLeastOne", @@ -257,6 +277,11 @@ "backupRestore_restore", "backupRestore_backupComplete", "backupRestore_restoreComplete", + "backupRestore_missingModelsTitle", + "backupRestore_missingModelsMessage", + "backupRestore_downloadModels", + "backupRestore_downloading", + "backupRestore_cancelDownload", "backupRestore_failed", "backupRestore_fileTooLarge", "backupRestore_selectAtLeastOne", @@ -310,6 +335,11 @@ "backupRestore_restore", "backupRestore_backupComplete", "backupRestore_restoreComplete", + "backupRestore_missingModelsTitle", + "backupRestore_missingModelsMessage", + "backupRestore_downloadModels", + "backupRestore_downloading", + "backupRestore_cancelDownload", "backupRestore_failed", "backupRestore_fileTooLarge", "backupRestore_selectAtLeastOne", @@ -363,6 +393,11 @@ "backupRestore_restore", "backupRestore_backupComplete", "backupRestore_restoreComplete", + "backupRestore_missingModelsTitle", + "backupRestore_missingModelsMessage", + "backupRestore_downloadModels", + "backupRestore_downloading", + "backupRestore_cancelDownload", "backupRestore_failed", "backupRestore_fileTooLarge", "backupRestore_selectAtLeastOne", @@ -416,6 +451,11 @@ "backupRestore_restore", "backupRestore_backupComplete", "backupRestore_restoreComplete", + "backupRestore_missingModelsTitle", + "backupRestore_missingModelsMessage", + "backupRestore_downloadModels", + "backupRestore_downloading", + "backupRestore_cancelDownload", "backupRestore_failed", "backupRestore_fileTooLarge", "backupRestore_selectAtLeastOne", @@ -469,6 +509,11 @@ "backupRestore_restore", "backupRestore_backupComplete", "backupRestore_restoreComplete", + "backupRestore_missingModelsTitle", + "backupRestore_missingModelsMessage", + "backupRestore_downloadModels", + "backupRestore_downloading", + "backupRestore_cancelDownload", "backupRestore_failed", "backupRestore_fileTooLarge", "backupRestore_selectAtLeastOne", @@ -522,6 +567,11 @@ "backupRestore_restore", "backupRestore_backupComplete", "backupRestore_restoreComplete", + "backupRestore_missingModelsTitle", + "backupRestore_missingModelsMessage", + "backupRestore_downloadModels", + "backupRestore_downloading", + "backupRestore_cancelDownload", "backupRestore_failed", "backupRestore_fileTooLarge", "backupRestore_selectAtLeastOne", @@ -575,6 +625,11 @@ "backupRestore_restore", "backupRestore_backupComplete", "backupRestore_restoreComplete", + "backupRestore_missingModelsTitle", + "backupRestore_missingModelsMessage", + "backupRestore_downloadModels", + "backupRestore_downloading", + "backupRestore_cancelDownload", "backupRestore_failed", "backupRestore_fileTooLarge", "backupRestore_selectAtLeastOne", @@ -628,6 +683,11 @@ "backupRestore_restore", "backupRestore_backupComplete", "backupRestore_restoreComplete", + "backupRestore_missingModelsTitle", + "backupRestore_missingModelsMessage", + "backupRestore_downloadModels", + "backupRestore_downloading", + "backupRestore_cancelDownload", "backupRestore_failed", "backupRestore_fileTooLarge", "backupRestore_selectAtLeastOne", @@ -681,6 +741,11 @@ "backupRestore_restore", "backupRestore_backupComplete", "backupRestore_restoreComplete", + "backupRestore_missingModelsTitle", + "backupRestore_missingModelsMessage", + "backupRestore_downloadModels", + "backupRestore_downloading", + "backupRestore_cancelDownload", "backupRestore_failed", "backupRestore_fileTooLarge", "backupRestore_selectAtLeastOne", @@ -734,6 +799,11 @@ "backupRestore_restore", "backupRestore_backupComplete", "backupRestore_restoreComplete", + "backupRestore_missingModelsTitle", + "backupRestore_missingModelsMessage", + "backupRestore_downloadModels", + "backupRestore_downloading", + "backupRestore_cancelDownload", "backupRestore_failed", "backupRestore_fileTooLarge", "backupRestore_selectAtLeastOne", @@ -787,6 +857,11 @@ "backupRestore_restore", "backupRestore_backupComplete", "backupRestore_restoreComplete", + "backupRestore_missingModelsTitle", + "backupRestore_missingModelsMessage", + "backupRestore_downloadModels", + "backupRestore_downloading", + "backupRestore_cancelDownload", "backupRestore_failed", "backupRestore_fileTooLarge", "backupRestore_selectAtLeastOne", @@ -840,6 +915,11 @@ "backupRestore_restore", "backupRestore_backupComplete", "backupRestore_restoreComplete", + "backupRestore_missingModelsTitle", + "backupRestore_missingModelsMessage", + "backupRestore_downloadModels", + "backupRestore_downloading", + "backupRestore_cancelDownload", "backupRestore_failed", "backupRestore_fileTooLarge", "backupRestore_selectAtLeastOne", @@ -893,6 +973,11 @@ "backupRestore_restore", "backupRestore_backupComplete", "backupRestore_restoreComplete", + "backupRestore_missingModelsTitle", + "backupRestore_missingModelsMessage", + "backupRestore_downloadModels", + "backupRestore_downloading", + "backupRestore_cancelDownload", "backupRestore_failed", "backupRestore_fileTooLarge", "backupRestore_selectAtLeastOne",