remove ab pull error toast, translate group pull error

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2023-09-24 08:36:53 +08:00
parent 2080e56f87
commit d83d8c18fc
39 changed files with 44 additions and 8 deletions

View File

@ -105,9 +105,6 @@ class AbModel {
if (!quiet) { if (!quiet) {
pullError.value = pullError.value =
'${translate('pull_ab_failed_tip')}: ${translate(err.toString())}'; '${translate('pull_ab_failed_tip')}: ${translate(err.toString())}';
if (gFFI.peerTabModel.currentTab != PeerTabIndex.ab.index) {
BotToast.showText(contentColor: Colors.red, text: pullError.value);
}
} }
} finally { } finally {
abLoading.value = false; abLoading.value = false;

View File

@ -133,7 +133,8 @@ class GroupModel {
return true; return true;
} catch (err) { } catch (err) {
debugPrint('get accessible users: $err'); debugPrint('get accessible users: $err');
groupLoadError.value = err.toString(); groupLoadError.value =
'${translate('pull_group_failed_tip')}: ${translate(err.toString())}';
} }
return false; return false;
} }
@ -198,7 +199,8 @@ class GroupModel {
return true; return true;
} catch (err) { } catch (err) {
debugPrint('get accessible peers: $err'); debugPrint('get accessible peers: $err');
groupLoadError.value = err.toString(); groupLoadError.value =
'${translate('pull_group_failed_tip')}: ${translate(err.toString())}';
} }
return false; return false;
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -535,8 +535,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("List View", "列表视图"), ("List View", "列表视图"),
("Select", "选择"), ("Select", "选择"),
("Toggle Tags", "切换标签"), ("Toggle Tags", "切换标签"),
("pull_ab_failed_tip", "未成功获取地址簿"), ("pull_ab_failed_tip", "获取地址簿失败"),
("push_ab_failed_tip", "未成功上传地址簿"), ("push_ab_failed_tip", "上传地址簿失败"),
("synced_peer_readded_tip", "最近会话中存在的设备将会被重新同步到地址簿。"), ("synced_peer_readded_tip", "最近会话中存在的设备将会被重新同步到地址簿。"),
("Change Color", "更改颜色"), ("Change Color", "更改颜色"),
("Primary Color", "基本色"), ("Primary Color", "基本色"),
@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", "由于长时间无操作, 连接被自动断开"), ("Connection failed due to inactivity", "由于长时间无操作, 连接被自动断开"),
("Check for software update on startup", "启动时检查软件更新"), ("Check for software update on startup", "启动时检查软件更新"),
("upgrade_rustdesk_server_pro_to_{}_tip", "请升级专业版服务器到{}或更高版本!"), ("upgrade_rustdesk_server_pro_to_{}_tip", "请升级专业版服务器到{}或更高版本!"),
("pull_group_failed_tip", "获取组信息失败"),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", "Automatische Trennung der Verbindung aufgrund von Inaktivität"), ("Connection failed due to inactivity", "Automatische Trennung der Verbindung aufgrund von Inaktivität"),
("Check for software update on startup", "Beim Start auf Softwareaktualisierung prüfen"), ("Check for software update on startup", "Beim Start auf Softwareaktualisierung prüfen"),
("upgrade_rustdesk_server_pro_to_{}_tip", "Bitte aktualisieren Sie RustDesk Server Pro auf die Version {} oder neuer!"), ("upgrade_rustdesk_server_pro_to_{}_tip", "Bitte aktualisieren Sie RustDesk Server Pro auf die Version {} oder neuer!"),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -90,6 +90,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Decline", "Decline"), ("Decline", "Decline"),
("auto_disconnect_option_tip", "Automatically close incoming sessions on user inactivity"), ("auto_disconnect_option_tip", "Automatically close incoming sessions on user inactivity"),
("Connection failed due to inactivity", "Automatically disconnected due to inactivity"), ("Connection failed due to inactivity", "Automatically disconnected due to inactivity"),
("upgrade_rustdesk_server_pro_to_{}_tip", "Please upgrade RustDesk Server Pro to version {} or newer!") ("upgrade_rustdesk_server_pro_to_{}_tip", "Please upgrade RustDesk Server Pro to version {} or newer!"),
("pull_group_failed_tip", "Failed to refresh group"),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", "Desconectar automáticamente por inactividad."), ("Connection failed due to inactivity", "Desconectar automáticamente por inactividad."),
("Check for software update on startup", "Comprobar actualización al iniciar"), ("Check for software update on startup", "Comprobar actualización al iniciar"),
("upgrade_rustdesk_server_pro_to_{}_tip", "¡Por favor, actualiza RustDesk Server Pro a la versión {} o superior"), ("upgrade_rustdesk_server_pro_to_{}_tip", "¡Por favor, actualiza RustDesk Server Pro a la versión {} o superior"),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", "Secara otomatis akan terputus ketik tidak ada aktivitas."), ("Connection failed due to inactivity", "Secara otomatis akan terputus ketik tidak ada aktivitas."),
("Check for software update on startup", "Periksa pembaruan aplikasi saat sistem dinyalakan."), ("Check for software update on startup", "Periksa pembaruan aplikasi saat sistem dinyalakan."),
("upgrade_rustdesk_server_pro_to_{}_tip", "Silahkan perbarui RustDesk Server Pro ke versi {} atau yang lebih baru!"), ("upgrade_rustdesk_server_pro_to_{}_tip", "Silahkan perbarui RustDesk Server Pro ke versi {} atau yang lebih baru!"),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", "Connessione non riuscita a causa di inattività"), ("Connection failed due to inactivity", "Connessione non riuscita a causa di inattività"),
("Check for software update on startup", "All'avvio verifica presenza aggiornamenti programma"), ("Check for software update on startup", "All'avvio verifica presenza aggiornamenti programma"),
("upgrade_rustdesk_server_pro_to_{}_tip", "Aggiorna RustDesk Server Pro alla versione {} o successiva!"), ("upgrade_rustdesk_server_pro_to_{}_tip", "Aggiorna RustDesk Server Pro alla versione {} o successiva!"),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -559,5 +559,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", "Automātiski atvienots neaktivitātes dēļ"), ("Connection failed due to inactivity", "Automātiski atvienots neaktivitātes dēļ"),
("Check for software update on startup", "Startējot pārbaudīt, vai nav programmatūras atjauninājumu"), ("Check for software update on startup", "Startējot pārbaudīt, vai nav programmatūras atjauninājumu"),
("upgrade_rustdesk_server_pro_to_{}_tip", "Lūdzu, jauniniet RustDesk Server Pro uz versiju {} vai jaunāku!"), ("upgrade_rustdesk_server_pro_to_{}_tip", "Lūdzu, jauniniet RustDesk Server Pro uz versiju {} vai jaunāku!"),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", "Automatycznie rozłącz przy bezczynności"), ("Connection failed due to inactivity", "Automatycznie rozłącz przy bezczynności"),
("Check for software update on startup", "Sprawdź aktualizacje przy starcie programu"), ("Check for software update on startup", "Sprawdź aktualizacje przy starcie programu"),
("upgrade_rustdesk_server_pro_to_{}_tip", "Proszę zaktualizować RustDesk Server Pro do wersji {} lub nowszej!"), ("upgrade_rustdesk_server_pro_to_{}_tip", "Proszę zaktualizować RustDesk Server Pro do wersji {} lub nowszej!"),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", "Подключение не выполнено из-за неактивности"), ("Connection failed due to inactivity", "Подключение не выполнено из-за неактивности"),
("Check for software update on startup", "Проверять обновления программы при запуске"), ("Check for software update on startup", "Проверять обновления программы при запуске"),
("upgrade_rustdesk_server_pro_to_{}_tip", "Обновите RustDesk Server Pro до версии {} или новее!"), ("upgrade_rustdesk_server_pro_to_{}_tip", "Обновите RustDesk Server Pro до версии {} или новее!"),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -556,5 +556,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Connection failed due to inactivity", ""), ("Connection failed due to inactivity", ""),
("Check for software update on startup", ""), ("Check for software update on startup", ""),
("upgrade_rustdesk_server_pro_to_{}_tip", ""), ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
("pull_group_failed_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }