An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Rust androidanydeskdartflatpakflutterflutter-appsioslinuxmacosp2prdpremote-controlremote-desktoprustrust-langteamviewervncwaylandwindows
fix(sicter): control side, privacy mode (#14880)
fufesou6cb323725b5c
diff --git a/src/ui/header.tis b/src/ui/header.tisindex 17efe6982..2698ce4d0 100644--- a/src/ui/header.tis+++ b/src/ui/header.tis@@ -602,7 +602,13 @@ function togglePrivacyMode(privacy_id) {if (!supported) {msgbox("nocancel", translate("Privacy mode"), translate("Unsupported"), "", function() { });} else {- handler.toggle_option(privacy_id);+ var privacy_mode_impls = pi.platform_additions?.supported_privacy_mode_impl;+ if (privacy_mode_impls == null || privacy_mode_impls == undefined) {+ handler.toggle_option(privacy_id);+ return;+ }+ var is_on = handler.get_toggle_option("privacy-mode");+ handler.toggle_privacy_mode("", !is_on);}}@@ -713,4 +719,4 @@ handler.setConnectionType = function(secured, direct, stream_type) {handler.updateRecordStatus = function(status) {recording = status;header.update();-}\ No newline at end of file+}diff --git a/src/ui/remote.rs b/src/ui/remote.rsindex a575cf397..8b6f01ae0 100644--- a/src/ui/remote.rs+++ b/src/ui/remote.rs@@ -85,6 +85,22 @@ impl SciterHandler {serde_json::Value::Bool(b) => {value.set_item(k, b);}+ serde_json::Value::Array(arr) if k == "supported_privacy_mode_impl" => {+ let mut impls = Value::array(0);+ for item in arr {+ if let serde_json::Value::Array(entry) = item {+ let impl_key = entry.get(0).and_then(|v| v.as_str());+ let impl_name = entry.get(1).and_then(|v| v.as_str());+ if let (Some(impl_key), Some(impl_name)) = (impl_key, impl_name) {+ let mut impl_item = Value::array(0);+ impl_item.push(impl_key);+ impl_item.push(impl_name);+ impls.push(impl_item);+ }+ }+ }+ value.set_item(k, impls);+ }_ => {// ignore for now}@@ -550,6 +566,7 @@ impl sciter::EventHandler for SciterSession {fn get_toggle_option(String);fn is_privacy_mode_supported();fn toggle_option(String);+ fn toggle_privacy_mode(String, bool);fn get_remember();fn peer_platform();fn set_write_override(i32, i32, bool, bool, bool);