Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

require login for note (#13775)

21pages4f2aea65ab63
diff --git a/flutter/lib/desktop/pages/desktop_setting_page.dart b/flutter/lib/desktop/pages/desktop_setting_page.dart
index 6e8f42d4e..82b7c75ee 100644
--- a/flutter/lib/desktop/pages/desktop_setting_page.dart
+++ b/flutter/lib/desktop/pages/desktop_setting_page.dart
@@ -566,6 +566,13 @@ class _GeneralState extends State<_General> {
'note-at-conn-end-tip',
kOptionAllowAskForNoteAtEndOfConnection,
isServer: false,
+ optSetter: (key, value) async {
+ if (value && !gFFI.userModel.isLogin) {
+ final res = await loginDialog();
+ if (res != true) return;
+ }
+ await mainSetLocalBoolOption(key, value);
+ },
));
return _Card(title: 'Other', children: children);
}
diff --git a/flutter/lib/mobile/pages/settings_page.dart b/flutter/lib/mobile/pages/settings_page.dart
index 395b77962..9a237f44a 100644
--- a/flutter/lib/mobile/pages/settings_page.dart
+++ b/flutter/lib/mobile/pages/settings_page.dart
@@ -790,6 +790,10 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
title: Text(translate('note-at-conn-end-tip')),
initialValue: _allowAskForNoteAtEndOfConnection,
onToggle: (v) async {
+ if (v && !gFFI.userModel.isLogin) {
+ final res = await loginDialog();
+ if (res != true) return;
+ }
await mainSetLocalBoolOption(
kOptionAllowAskForNoteAtEndOfConnection, v);
final newValue = mainGetLocalBoolOptionSync(
diff --git a/flutter/lib/models/model.dart b/flutter/lib/models/model.dart
index b6d98a01c..5eba92cb7 100644
--- a/flutter/lib/models/model.dart
+++ b/flutter/lib/models/model.dart
@@ -1081,7 +1081,8 @@ class FfiModel with ChangeNotifier {
if (displays.length == 1) {
bind.sessionSetSize(
sessionId: sessionId,
- display: pi.currentDisplay == kAllDisplayValue ? 0 : pi.currentDisplay,
+ display:
+ pi.currentDisplay == kAllDisplayValue ? 0 : pi.currentDisplay,
width: displays[0].width,
height: displays[0].height,
);
@@ -1100,6 +1101,11 @@ class FfiModel with ChangeNotifier {
void _queryAuditGuid(String peerId) async {
try {
+ if (bind
+ .sessionGetAuditServerSync(sessionId: sessionId, typ: "conn/active")
+ .isEmpty) {
+ return;
+ }
if (!mainGetLocalBoolOptionSync(
kOptionAllowAskForNoteAtEndOfConnection)) {
return;
diff --git a/src/lang/vi.rs b/src/lang/vi.rs
index 0f3ae4fec..58fb13656 100644
--- a/src/lang/vi.rs
+++ b/src/lang/vi.rs
@@ -539,7 +539,31 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Timeout in minutes", ""),
("auto_disconnect_option_tip", ""),
("Connection failed due to inactivity", ""),
- ("Check for software update on startupmật", ""),
+ ("Check for software update on startup", ""),
+ ("upgrade_rustdesk_server_pro_to_{}_tip", ""),
+ ("pull_group_failed_tip", ""),
+ ("Filter by intersection", ""),
+ ("Remove wallpaper during incoming sessions", ""),
+ ("Test", ""),
+ ("display_is_plugged_out_msg", ""),
+ ("No displays", ""),
+ ("Open in new window", ""),
+ ("Show displays as individual windows", ""),
+ ("Use all my displays for the remote session", ""),
+ ("selinux_tip", ""),
+ ("Change view", ""),
+ ("Big tiles", ""),
+ ("Small tiles", ""),
+ ("List", ""),
+ ("Virtual display", ""),
+ ("Plug out all", ""),
+ ("True color (4:4:4)", ""),
+ ("Enable blocking user input", ""),
+ ("id_input_tip", ""),
+ ("privacy_mode_impl_mag_tip", ""),
+ ("privacy_mode_impl_virtual_display_tip", ""),
+ ("Enter privacy mode", ""),
+ ("Exit privacy mode", ""),
("idd_not_support_under_win10_2004_tip", ""),
("input_source_1_tip", ""),
("input_source_2_tip", ""),
diff --git a/src/ui_session_interface.rs b/src/ui_session_interface.rs
index be1baa587..88ee7bc9b 100644
--- a/src/ui_session_interface.rs
+++ b/src/ui_session_interface.rs
@@ -567,6 +567,9 @@ impl<T: InvokeUiSession> Session<T> {
}
pub fn get_audit_server(&self, typ: String) -> String {
+ if LocalConfig::get_option("access_token").is_empty() {
+ return "".to_owned();
+ }
crate::get_audit_server(
Config::get_option("api-server"),
Config::get_option("custom-rendezvous-server"),