Merge pull request #3036 from 21pages/default_setting

Default display setting
This commit is contained in:
RustDesk 2023-02-02 15:17:31 +08:00 committed by GitHub
commit 992d5b9b24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
41 changed files with 814 additions and 100 deletions

View File

@ -33,6 +33,7 @@ const double _kContentFontSize = 15;
const Color _accentColor = MyTheme.accent; const Color _accentColor = MyTheme.accent;
const String _kSettingPageControllerTag = 'settingPageController'; const String _kSettingPageControllerTag = 'settingPageController';
const String _kSettingPageIndexTag = 'settingPageIndex'; const String _kSettingPageIndexTag = 'settingPageIndex';
const int _kPageCount = 6;
class _TabInfo { class _TabInfo {
late final String label; late final String label;
@ -51,7 +52,7 @@ class DesktopSettingPage extends StatefulWidget {
State<DesktopSettingPage> createState() => _DesktopSettingPageState(); State<DesktopSettingPage> createState() => _DesktopSettingPageState();
static void switch2page(int page) { static void switch2page(int page) {
if (page >= 5) return; if (page >= _kPageCount) return;
try { try {
if (Get.isRegistered<PageController>(tag: _kSettingPageControllerTag)) { if (Get.isRegistered<PageController>(tag: _kSettingPageControllerTag)) {
DesktopTabPage.onAddSetting(initialPage: page); DesktopTabPage.onAddSetting(initialPage: page);
@ -75,6 +76,7 @@ class _DesktopSettingPageState extends State<DesktopSettingPage>
_TabInfo('Security', Icons.enhanced_encryption_outlined, _TabInfo('Security', Icons.enhanced_encryption_outlined,
Icons.enhanced_encryption), Icons.enhanced_encryption),
_TabInfo('Network', Icons.link_outlined, Icons.link), _TabInfo('Network', Icons.link_outlined, Icons.link),
_TabInfo('Display', Icons.desktop_windows_outlined, Icons.desktop_windows),
_TabInfo('Account', Icons.person_outline, Icons.person), _TabInfo('Account', Icons.person_outline, Icons.person),
_TabInfo('About', Icons.info_outline, Icons.info) _TabInfo('About', Icons.info_outline, Icons.info)
]; ];
@ -88,7 +90,8 @@ class _DesktopSettingPageState extends State<DesktopSettingPage>
@override @override
void initState() { void initState() {
super.initState(); super.initState();
selectedIndex = (widget.initialPage < 5 ? widget.initialPage : 0).obs; selectedIndex =
(widget.initialPage < _kPageCount ? widget.initialPage : 0).obs;
Get.put<RxInt>(selectedIndex, tag: _kSettingPageIndexTag); Get.put<RxInt>(selectedIndex, tag: _kSettingPageIndexTag);
controller = PageController(initialPage: widget.initialPage); controller = PageController(initialPage: widget.initialPage);
Get.put<PageController>(controller, tag: _kSettingPageControllerTag); Get.put<PageController>(controller, tag: _kSettingPageControllerTag);
@ -130,6 +133,7 @@ class _DesktopSettingPageState extends State<DesktopSettingPage>
_General(), _General(),
_Safety(), _Safety(),
_Network(), _Network(),
_Display(),
_Account(), _Account(),
_About(), _About(),
], ],
@ -1047,6 +1051,247 @@ class _NetworkState extends State<_Network> with AutomaticKeepAliveClientMixin {
} }
} }
class _Display extends StatefulWidget {
const _Display({Key? key}) : super(key: key);
@override
State<_Display> createState() => _DisplayState();
}
class _DisplayState extends State<_Display> {
@override
Widget build(BuildContext context) {
final scrollController = ScrollController();
return DesktopScrollWrapper(
scrollController: scrollController,
child: ListView(
controller: scrollController,
physics: NeverScrollableScrollPhysics(),
children: [
viewStyle(context),
scrollStyle(context),
imageQuality(context),
codec(context),
other(context),
]).marginOnly(bottom: _kListViewBottomMargin));
}
Widget viewStyle(BuildContext context) {
final key = 'view_style';
onChanged(String value) async {
await bind.mainSetUserDefaultOption(key: key, value: value);
setState(() {});
}
final groupValue = bind.mainGetUserDefaultOption(key: key);
return _Card(title: 'Default View Style', children: [
_Radio(context,
value: kRemoteViewStyleOriginal,
groupValue: groupValue,
label: 'Scale original',
onChanged: onChanged),
_Radio(context,
value: kRemoteViewStyleAdaptive,
groupValue: groupValue,
label: 'Scale adaptive',
onChanged: onChanged),
]);
}
Widget scrollStyle(BuildContext context) {
final key = 'scroll_style';
onChanged(String value) async {
await bind.mainSetUserDefaultOption(key: key, value: value);
setState(() {});
}
final groupValue = bind.mainGetUserDefaultOption(key: key);
return _Card(title: 'Default Scroll Style', children: [
_Radio(context,
value: kRemoteScrollStyleAuto,
groupValue: groupValue,
label: 'ScrollAuto',
onChanged: onChanged),
_Radio(context,
value: kRemoteScrollStyleBar,
groupValue: groupValue,
label: 'Scrollbar',
onChanged: onChanged),
]);
}
Widget imageQuality(BuildContext context) {
final key = 'image_quality';
onChanged(String value) async {
await bind.mainSetUserDefaultOption(key: key, value: value);
setState(() {});
}
final groupValue = bind.mainGetUserDefaultOption(key: key);
final qualityKey = 'custom_image_quality';
final qualityValue =
(double.tryParse(bind.mainGetUserDefaultOption(key: qualityKey)) ??
50.0)
.obs;
final fpsKey = 'custom-fps';
final fpsValue =
(double.tryParse(bind.mainGetUserDefaultOption(key: fpsKey)) ?? 30.0)
.obs;
return _Card(title: 'Default Image Quality', children: [
_Radio(context,
value: kRemoteImageQualityBest,
groupValue: groupValue,
label: 'Good image quality',
onChanged: onChanged),
_Radio(context,
value: kRemoteImageQualityBalanced,
groupValue: groupValue,
label: 'Balanced',
onChanged: onChanged),
_Radio(context,
value: kRemoteImageQualityLow,
groupValue: groupValue,
label: 'Optimize reaction time',
onChanged: onChanged),
_Radio(context,
value: kRemoteImageQualityCustom,
groupValue: groupValue,
label: 'Custom',
onChanged: onChanged),
Offstage(
offstage: groupValue != kRemoteImageQualityCustom,
child: Column(
children: [
Obx(() => Row(
children: [
Slider(
value: qualityValue.value,
min: 10.0,
max: 100.0,
divisions: 18,
onChanged: (double value) async {
qualityValue.value = value;
await bind.mainSetUserDefaultOption(
key: qualityKey, value: value.toString());
},
),
SizedBox(
width: 40,
child: Text(
'${qualityValue.value.round()}%',
style: const TextStyle(fontSize: 15),
)),
SizedBox(
width: 50,
child: Text(
translate('Bitrate'),
style: const TextStyle(fontSize: 15),
))
],
)),
Obx(() => Row(
children: [
Slider(
value: fpsValue.value,
min: 10.0,
max: 120.0,
divisions: 22,
onChanged: (double value) async {
fpsValue.value = value;
await bind.mainSetUserDefaultOption(
key: fpsKey, value: value.toString());
},
),
SizedBox(
width: 40,
child: Text(
'${fpsValue.value.round()}',
style: const TextStyle(fontSize: 15),
)),
SizedBox(
width: 50,
child: Text(
translate('FPS'),
style: const TextStyle(fontSize: 15),
))
],
)),
],
),
)
]);
}
Widget codec(BuildContext context) {
if (!bind.mainHasHwcodec()) {
return Offstage();
}
final key = 'codec-preference';
onChanged(String value) async {
await bind.mainSetUserDefaultOption(key: key, value: value);
setState(() {});
}
final groupValue = bind.mainGetUserDefaultOption(key: key);
return _Card(title: 'Default Codec', children: [
_Radio(context,
value: 'auto',
groupValue: groupValue,
label: 'Auto',
onChanged: onChanged),
_Radio(context,
value: 'vp9',
groupValue: groupValue,
label: 'VP9',
onChanged: onChanged),
_Radio(context,
value: 'h264',
groupValue: groupValue,
label: 'H264',
onChanged: onChanged),
_Radio(context,
value: 'h265',
groupValue: groupValue,
label: 'H265',
onChanged: onChanged),
]);
}
Widget otherRow(String label, String key) {
final value = bind.mainGetUserDefaultOption(key: key) == 'Y';
onChanged(bool b) async {
await bind.mainSetUserDefaultOption(key: key, value: b ? 'Y' : '');
setState(() {});
}
return GestureDetector(
child: Row(
children: [
Checkbox(value: value, onChanged: (_) => onChanged(!value))
.marginOnly(right: 5),
Expanded(
child: Text(translate(label)),
)
],
).marginOnly(left: _kCheckBoxLeftMargin),
onTap: () => onChanged(!value));
}
Widget other(BuildContext context) {
return _Card(title: 'Other Default Options', children: [
otherRow('Show remote cursor', 'show_remote_cursor'),
otherRow('Zoom cursor', 'zoom-cursor'),
otherRow('Show quality monitor', 'show_quality_monitor'),
otherRow('Mute', 'disable_audio'),
otherRow('Allow file copy and paste', 'enable_file_transfer'),
otherRow('Disable clipboard', 'disable_clipboard'),
otherRow('Lock after session end', 'lock_after_session_end'),
otherRow('Privacy mode', 'privacy_mode'),
]);
}
}
class _Account extends StatefulWidget { class _Account extends StatefulWidget {
const _Account({Key? key}) : super(key: key); const _Account({Key? key}) : super(key: key);

View File

@ -867,18 +867,24 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
value: qualitySliderValue.value, value: qualitySliderValue.value,
min: qualityMinValue, min: qualityMinValue,
max: qualityMaxValue, max: qualityMaxValue,
divisions: 90, divisions: 18,
onChanged: (double value) { onChanged: (double value) {
qualitySliderValue.value = value; qualitySliderValue.value = value;
debouncerQuality.value = value; debouncerQuality.value = value;
}, },
), ),
SizedBox( SizedBox(
width: 90, width: 40,
child: Obx(() => Text( child: Text(
'${qualitySliderValue.value.round()}% Bitrate', '${qualitySliderValue.value.round()}%',
style: const TextStyle(fontSize: 15), style: const TextStyle(fontSize: 15),
))) )),
SizedBox(
width: 50,
child: Text(
translate('Bitrate'),
style: const TextStyle(fontSize: 15),
))
], ],
)); ));
// fps // fps
@ -919,20 +925,17 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
}, },
))), ))),
SizedBox( SizedBox(
width: 90, width: 40,
child: Obx(() { child: Obx(() => Text(
final fps = fpsSliderValue.value.round(); '${fpsSliderValue.value.round()}',
String text;
if (fps < 100) {
text = '$fps FPS';
} else {
text = '$fps FPS';
}
return Text(
text,
style: const TextStyle(fontSize: 15), style: const TextStyle(fontSize: 15),
); ))),
})) SizedBox(
width: 50,
child: Text(
translate('FPS'),
style: const TextStyle(fontSize: 15),
))
], ],
), ),
); );
@ -1111,6 +1114,7 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
)); ));
} }
} }
displayMenu.add(MenuEntryDivider());
/// Show remote cursor /// Show remote cursor
if (!widget.ffi.canvasModel.cursorEmbedded) { if (!widget.ffi.canvasModel.cursorEmbedded) {

View File

@ -43,11 +43,14 @@ class RustDeskMultiWindowManager {
Future<dynamic> newRemoteDesktop(String remoteId, Future<dynamic> newRemoteDesktop(String remoteId,
{String? switch_uuid}) async { {String? switch_uuid}) async {
final msg = jsonEncode({ var params = {
"type": WindowType.RemoteDesktop.index, "type": WindowType.RemoteDesktop.index,
"id": remoteId, "id": remoteId,
"switch_uuid": switch_uuid ?? "" };
}); if (switch_uuid != null) {
params['switch_uuid'] = switch_uuid;
}
final msg = jsonEncode(params);
try { try {
final ids = await DesktopMultiWindow.getAllSubWindowIds(); final ids = await DesktopMultiWindow.getAllSubWindowIds();

View File

@ -115,6 +115,26 @@ macro_rules! serde_field_string {
}; };
} }
macro_rules! serde_field_bool {
($struct_name: ident, $field_name: literal, $func: ident) => {
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct $struct_name {
#[serde(rename = $field_name)]
pub v: bool,
}
impl Default for $struct_name {
fn default() -> Self {
Self { v: Self::$func() }
}
}
impl $struct_name {
pub fn $func() -> bool {
UserDefaultConfig::load().get($field_name) == "Y"
}
}
};
}
#[derive(Clone, Copy, PartialEq, Eq, Debug)] #[derive(Clone, Copy, PartialEq, Eq, Debug)]
pub enum NetworkType { pub enum NetworkType {
Direct, Direct,
@ -192,26 +212,29 @@ pub struct PeerConfig {
deserialize_with = "PeerConfig::deserialize_image_quality" deserialize_with = "PeerConfig::deserialize_image_quality"
)] )]
pub image_quality: String, pub image_quality: String,
#[serde(default)] #[serde(
default = "PeerConfig::default_custom_image_quality",
deserialize_with = "PeerConfig::deserialize_custom_image_quality"
)]
pub custom_image_quality: Vec<i32>, pub custom_image_quality: Vec<i32>,
#[serde(default)] #[serde(flatten)]
pub show_remote_cursor: bool, pub show_remote_cursor: ShowRemoteCursor,
#[serde(default)] #[serde(flatten)]
pub lock_after_session_end: bool, pub lock_after_session_end: LockAfterSessionEnd,
#[serde(default)] #[serde(flatten)]
pub privacy_mode: bool, pub privacy_mode: PrivacyMode,
#[serde(default)] #[serde(default)]
pub port_forwards: Vec<(i32, String, i32)>, pub port_forwards: Vec<(i32, String, i32)>,
#[serde(default)] #[serde(default)]
pub direct_failures: i32, pub direct_failures: i32,
#[serde(default)] #[serde(flatten)]
pub disable_audio: bool, pub disable_audio: DisableAudio,
#[serde(default)] #[serde(flatten)]
pub disable_clipboard: bool, pub disable_clipboard: DisableClipboard,
#[serde(default)] #[serde(flatten)]
pub enable_file_transfer: bool, pub enable_file_transfer: EnableFileTransfer,
#[serde(default)] #[serde(flatten)]
pub show_quality_monitor: bool, pub show_quality_monitor: ShowQualityMonitor,
#[serde(default)] #[serde(default)]
pub keyboard_mode: String, pub keyboard_mode: String,
@ -961,31 +984,88 @@ impl PeerConfig {
serde_field_string!( serde_field_string!(
default_view_style, default_view_style,
deserialize_view_style, deserialize_view_style,
"original".to_owned() UserDefaultConfig::load().get("view_style")
); );
serde_field_string!( serde_field_string!(
default_scroll_style, default_scroll_style,
deserialize_scroll_style, deserialize_scroll_style,
"scrollauto".to_owned() UserDefaultConfig::load().get("scroll_style")
); );
serde_field_string!( serde_field_string!(
default_image_quality, default_image_quality,
deserialize_image_quality, deserialize_image_quality,
"balanced".to_owned() UserDefaultConfig::load().get("image_quality")
); );
fn default_custom_image_quality() -> Vec<i32> {
let f: f64 = UserDefaultConfig::load()
.get("custom_image_quality")
.parse()
.unwrap_or(50.0);
vec![f as _]
}
fn deserialize_custom_image_quality<'de, D>(deserializer: D) -> Result<Vec<i32>, D::Error>
where
D: de::Deserializer<'de>,
{
let v: Vec<i32> = de::Deserialize::deserialize(deserializer)?;
if v.len() == 1 && v[0] >= 10 && v[0] <= 100 {
Ok(v)
} else {
Ok(Self::default_custom_image_quality())
}
}
fn deserialize_options<'de, D>(deserializer: D) -> Result<HashMap<String, String>, D::Error> fn deserialize_options<'de, D>(deserializer: D) -> Result<HashMap<String, String>, D::Error>
where where
D: de::Deserializer<'de>, D: de::Deserializer<'de>,
{ {
let mut mp: HashMap<String, String> = de::Deserialize::deserialize(deserializer)?; let mut mp: HashMap<String, String> = de::Deserialize::deserialize(deserializer)?;
if !mp.contains_key("codec-preference") { let mut key = "codec-preference";
mp.insert("codec-preference".to_owned(), "auto".to_owned()); if !mp.contains_key(key) {
mp.insert(key.to_owned(), UserDefaultConfig::load().get(key));
}
key = "custom-fps";
if !mp.contains_key(key) {
mp.insert(key.to_owned(), UserDefaultConfig::load().get(key));
}
key = "zoom-cursor";
if !mp.contains_key(key) {
mp.insert(key.to_owned(), UserDefaultConfig::load().get(key));
} }
Ok(mp) Ok(mp)
} }
} }
serde_field_bool!(
ShowRemoteCursor,
"show_remote_cursor",
default_show_remote_cursor
);
serde_field_bool!(
ShowQualityMonitor,
"show_quality_monitor",
default_show_quality_monitor
);
serde_field_bool!(DisableAudio, "disable_audio", default_disable_audio);
serde_field_bool!(
EnableFileTransfer,
"enable_file_transfer",
default_enable_file_transfer
);
serde_field_bool!(
DisableClipboard,
"disable_clipboard",
default_disable_clipboard
);
serde_field_bool!(
LockAfterSessionEnd,
"lock_after_session_end",
default_lock_after_session_end
);
serde_field_bool!(PrivacyMode, "privacy_mode", default_privacy_mode);
#[derive(Debug, Default, Serialize, Deserialize, Clone)] #[derive(Debug, Default, Serialize, Deserialize, Clone)]
pub struct LocalConfig { pub struct LocalConfig {
#[serde(default)] #[serde(default)]
@ -1192,6 +1272,73 @@ impl HwCodecConfig {
} }
} }
#[derive(Debug, Default, Serialize, Deserialize, Clone)]
pub struct UserDefaultConfig {
#[serde(default)]
options: HashMap<String, String>,
}
impl UserDefaultConfig {
pub fn load() -> UserDefaultConfig {
Config::load_::<UserDefaultConfig>("_default")
}
#[inline]
fn store(&self) {
Config::store_(self, "_default");
}
pub fn get(&self, key: &str) -> String {
match key {
"view_style" => self.get_string(key, "original", vec!["adaptive"]),
"scroll_style" => self.get_string(key, "scrollauto", vec!["scrollbar"]),
"image_quality" => self.get_string(key, "balanced", vec!["best", "low", "custom"]),
"codec-preference" => self.get_string(key, "auto", vec!["vp9", "h264", "h265"]),
"custom_image_quality" => self.get_double_string(key, 50.0, 10.0, 100.0),
"custom-fps" => self.get_double_string(key, 30.0, 10.0, 120.0),
_ => self
.options
.get(key)
.map(|v| v.to_string())
.unwrap_or_default(),
}
}
pub fn set(&mut self, key: String, value: String) {
self.options.insert(key, value);
self.store();
}
#[inline]
fn get_string(&self, key: &str, default: &str, others: Vec<&str>) -> String {
match self.options.get(key) {
Some(option) => {
if others.contains(&option.as_str()) {
option.to_owned()
} else {
default.to_owned()
}
}
None => default.to_owned(),
}
}
#[inline]
fn get_double_string(&self, key: &str, default: f64, min: f64, max: f64) -> String {
match self.options.get(key) {
Some(option) => {
let v: f64 = option.parse().unwrap_or(default);
if v >= min && v <= max {
v.to_string()
} else {
default.to_string()
}
}
None => default.to_string(),
}
}
}
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;

View File

@ -956,7 +956,7 @@ impl LoginConfigHandler {
/// Check if the client should auto login. /// Check if the client should auto login.
/// Return password if the client should auto login, otherwise return empty string. /// Return password if the client should auto login, otherwise return empty string.
pub fn should_auto_login(&self) -> String { pub fn should_auto_login(&self) -> String {
let l = self.lock_after_session_end; let l = self.lock_after_session_end.v;
let a = !self.get_option("auto-login").is_empty(); let a = !self.get_option("auto-login").is_empty();
let p = self.get_option("os-password"); let p = self.get_option("os-password");
if !p.is_empty() && l && a { if !p.is_empty() && l && a {
@ -1063,32 +1063,32 @@ impl LoginConfigHandler {
let mut option = OptionMessage::default(); let mut option = OptionMessage::default();
let mut config = self.load_config(); let mut config = self.load_config();
if name == "show-remote-cursor" { if name == "show-remote-cursor" {
config.show_remote_cursor = !config.show_remote_cursor; config.show_remote_cursor.v = !config.show_remote_cursor.v;
option.show_remote_cursor = (if config.show_remote_cursor { option.show_remote_cursor = (if config.show_remote_cursor.v {
BoolOption::Yes BoolOption::Yes
} else { } else {
BoolOption::No BoolOption::No
}) })
.into(); .into();
} else if name == "disable-audio" { } else if name == "disable-audio" {
config.disable_audio = !config.disable_audio; config.disable_audio.v = !config.disable_audio.v;
option.disable_audio = (if config.disable_audio { option.disable_audio = (if config.disable_audio.v {
BoolOption::Yes BoolOption::Yes
} else { } else {
BoolOption::No BoolOption::No
}) })
.into(); .into();
} else if name == "disable-clipboard" { } else if name == "disable-clipboard" {
config.disable_clipboard = !config.disable_clipboard; config.disable_clipboard.v = !config.disable_clipboard.v;
option.disable_clipboard = (if config.disable_clipboard { option.disable_clipboard = (if config.disable_clipboard.v {
BoolOption::Yes BoolOption::Yes
} else { } else {
BoolOption::No BoolOption::No
}) })
.into(); .into();
} else if name == "lock-after-session-end" { } else if name == "lock-after-session-end" {
config.lock_after_session_end = !config.lock_after_session_end; config.lock_after_session_end.v = !config.lock_after_session_end.v;
option.lock_after_session_end = (if config.lock_after_session_end { option.lock_after_session_end = (if config.lock_after_session_end.v {
BoolOption::Yes BoolOption::Yes
} else { } else {
BoolOption::No BoolOption::No
@ -1096,15 +1096,15 @@ impl LoginConfigHandler {
.into(); .into();
} else if name == "privacy-mode" { } else if name == "privacy-mode" {
// try toggle privacy mode // try toggle privacy mode
option.privacy_mode = (if config.privacy_mode { option.privacy_mode = (if config.privacy_mode.v {
BoolOption::No BoolOption::No
} else { } else {
BoolOption::Yes BoolOption::Yes
}) })
.into(); .into();
} else if name == "enable-file-transfer" { } else if name == "enable-file-transfer" {
config.enable_file_transfer = !config.enable_file_transfer; config.enable_file_transfer.v = !config.enable_file_transfer.v;
option.enable_file_transfer = (if config.enable_file_transfer { option.enable_file_transfer = (if config.enable_file_transfer.v {
BoolOption::Yes BoolOption::Yes
} else { } else {
BoolOption::No BoolOption::No
@ -1115,7 +1115,7 @@ impl LoginConfigHandler {
} else if name == "unblock-input" { } else if name == "unblock-input" {
option.block_input = BoolOption::No.into(); option.block_input = BoolOption::No.into();
} else if name == "show-quality-monitor" { } else if name == "show-quality-monitor" {
config.show_quality_monitor = !config.show_quality_monitor; config.show_quality_monitor.v = !config.show_quality_monitor.v;
} else { } else {
let v = self.options.get(&name).is_some(); let v = self.options.get(&name).is_some();
if v { if v {
@ -1252,19 +1252,19 @@ impl LoginConfigHandler {
/// * `name` - The name of the toggle option. /// * `name` - The name of the toggle option.
pub fn get_toggle_option(&self, name: &str) -> bool { pub fn get_toggle_option(&self, name: &str) -> bool {
if name == "show-remote-cursor" { if name == "show-remote-cursor" {
self.config.show_remote_cursor self.config.show_remote_cursor.v
} else if name == "lock-after-session-end" { } else if name == "lock-after-session-end" {
self.config.lock_after_session_end self.config.lock_after_session_end.v
} else if name == "privacy-mode" { } else if name == "privacy-mode" {
self.config.privacy_mode self.config.privacy_mode.v
} else if name == "enable-file-transfer" { } else if name == "enable-file-transfer" {
self.config.enable_file_transfer self.config.enable_file_transfer.v
} else if name == "disable-audio" { } else if name == "disable-audio" {
self.config.disable_audio self.config.disable_audio.v
} else if name == "disable-clipboard" { } else if name == "disable-clipboard" {
self.config.disable_clipboard self.config.disable_clipboard.v
} else if name == "show-quality-monitor" { } else if name == "show-quality-monitor" {
self.config.show_quality_monitor self.config.show_quality_monitor.v
} else { } else {
!self.get_option(name).is_empty() !self.get_option(name).is_empty()
} }

View File

@ -277,7 +277,7 @@ impl<T: InvokeUiSession> Remote<T> {
} }
if !SERVER_CLIPBOARD_ENABLED.load(Ordering::SeqCst) if !SERVER_CLIPBOARD_ENABLED.load(Ordering::SeqCst)
|| !SERVER_KEYBOARD_ENABLED.load(Ordering::SeqCst) || !SERVER_KEYBOARD_ENABLED.load(Ordering::SeqCst)
|| lc.read().unwrap().disable_clipboard || lc.read().unwrap().disable_clipboard.v
{ {
continue; continue;
} }
@ -778,7 +778,7 @@ impl<T: InvokeUiSession> Remote<T> {
|| self.handler.is_port_forward() || self.handler.is_port_forward()
|| !SERVER_CLIPBOARD_ENABLED.load(Ordering::SeqCst) || !SERVER_CLIPBOARD_ENABLED.load(Ordering::SeqCst)
|| !SERVER_KEYBOARD_ENABLED.load(Ordering::SeqCst) || !SERVER_KEYBOARD_ENABLED.load(Ordering::SeqCst)
|| self.handler.lc.read().unwrap().disable_clipboard) || self.handler.lc.read().unwrap().disable_clipboard.v)
{ {
let txt = self.old_clipboard.lock().unwrap().clone(); let txt = self.old_clipboard.lock().unwrap().clone();
if !txt.is_empty() { if !txt.is_empty() {
@ -808,7 +808,7 @@ impl<T: InvokeUiSession> Remote<T> {
self.handler.set_cursor_position(cp); self.handler.set_cursor_position(cp);
} }
Some(message::Union::Clipboard(cb)) => { Some(message::Union::Clipboard(cb)) => {
if !self.handler.lc.read().unwrap().disable_clipboard { if !self.handler.lc.read().unwrap().disable_clipboard.v {
#[cfg(not(any(target_os = "android", target_os = "ios")))] #[cfg(not(any(target_os = "android", target_os = "ios")))]
update_clipboard(cb, Some(&self.old_clipboard)); update_clipboard(cb, Some(&self.old_clipboard));
#[cfg(any(target_os = "android", target_os = "ios"))] #[cfg(any(target_os = "android", target_os = "ios"))]
@ -1121,7 +1121,7 @@ impl<T: InvokeUiSession> Remote<T> {
self.handler.handle_test_delay(t, peer).await; self.handler.handle_test_delay(t, peer).await;
} }
Some(message::Union::AudioFrame(frame)) => { Some(message::Union::AudioFrame(frame)) => {
if !self.handler.lc.read().unwrap().disable_audio { if !self.handler.lc.read().unwrap().disable_audio.v {
self.audio_sender.send(MediaData::AudioFrame(frame)).ok(); self.audio_sender.send(MediaData::AudioFrame(frame)).ok();
} }
} }
@ -1204,7 +1204,7 @@ impl<T: InvokeUiSession> Remote<T> {
#[inline(always)] #[inline(always)]
fn update_privacy_mode(&mut self, on: bool) { fn update_privacy_mode(&mut self, on: bool) {
let mut config = self.handler.load_config(); let mut config = self.handler.load_config();
config.privacy_mode = on; config.privacy_mode.v = on;
self.handler.save_config(config); self.handler.save_config(config);
self.handler.update_privacy_mode(); self.handler.update_privacy_mode();
@ -1278,14 +1278,14 @@ impl<T: InvokeUiSession> Remote<T> {
#[cfg(windows)] #[cfg(windows)]
{ {
let enabled = SERVER_FILE_TRANSFER_ENABLED.load(Ordering::SeqCst) let enabled = SERVER_FILE_TRANSFER_ENABLED.load(Ordering::SeqCst)
&& self.handler.lc.read().unwrap().enable_file_transfer; && self.handler.lc.read().unwrap().enable_file_transfer.v;
ContextSend::enable(enabled); ContextSend::enable(enabled);
} }
} }
#[cfg(windows)] #[cfg(windows)]
fn handle_cliprdr_msg(&self, clip: hbb_common::message_proto::Cliprdr) { fn handle_cliprdr_msg(&self, clip: hbb_common::message_proto::Cliprdr) {
if !self.handler.lc.read().unwrap().disable_clipboard { if !self.handler.lc.read().unwrap().disable_clipboard.v {
#[cfg(feature = "flutter")] #[cfg(feature = "flutter")]
if let Some(hbb_common::message_proto::cliprdr::Union::FormatList(_)) = &clip.union { if let Some(hbb_common::message_proto::cliprdr::Union::FormatList(_)) = &clip.union {
if self.client_conn_id if self.client_conn_id

View File

@ -304,9 +304,13 @@ fn core_main_invoke_new_connection(mut args: std::env::Args) -> Option<Vec<Strin
switch_uuid = args.next(); switch_uuid = args.next();
} }
} }
let mut param_array = vec![];
if switch_uuid.is_some() {
let switch_uuid = switch_uuid.map_or("".to_string(), |p| format!("switch_uuid={}", p)); let switch_uuid = switch_uuid.map_or("".to_string(), |p| format!("switch_uuid={}", p));
let params = vec![switch_uuid].join("&"); param_array.push(switch_uuid);
}
let params = param_array.join("&");
let params_flag = if params.is_empty() { "" } else { "?" }; let params_flag = if params.is_empty() { "" } else { "?" };
#[allow(unused)] #[allow(unused)]
let uni_links = format!( let uni_links = format!(

View File

@ -791,6 +791,14 @@ pub fn main_default_video_save_directory() -> String {
default_video_save_directory() default_video_save_directory()
} }
pub fn main_set_user_default_option(key: String, value: String) {
set_user_default_option(key, value);
}
pub fn main_get_user_default_option(key: String) -> SyncReturn<String> {
SyncReturn(get_user_default_option(key))
}
pub fn session_add_port_forward( pub fn session_add_port_forward(
id: String, id: String,
local_port: i32, local_port: i32,

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "Sobre"), ("About", "Sobre"),
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", ""), ("Privacy Statement", ""),
("Mute", "Silenciar"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "Silenciar"),
("Audio Input", "Entrada d'àudio"), ("Audio Input", "Entrada d'àudio"),
("Enhancements", "Millores"), ("Enhancements", "Millores"),
("Hardware Codec", "Còdec de hardware"), ("Hardware Codec", "Còdec de hardware"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", "反转访问方向"), ("Switch Sides", "反转访问方向"),
("Please confirm if you want to share your desktop?", "请确认要让对方访问你的桌面?"), ("Please confirm if you want to share your desktop?", "请确认要让对方访问你的桌面?"),
("Closed as expected", "正常关闭"), ("Closed as expected", "正常关闭"),
("Display", "显示"),
("Default View Style", "默认显示方式"),
("Default Scroll Style", "默认滚动方式"),
("Default Image Quality", "默认图像质量"),
("Default Codec", "默认编解码"),
("Bitrate", "波特率"),
("FPS", "帧率"),
("Auto", "自动"),
("Other Default Options", "其它默认选项"),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", "Seiten wechseln"), ("Switch Sides", "Seiten wechseln"),
("Please confirm if you want to share your desktop?", "Bitte bestätigen Sie, ob Sie Ihren Desktop freigeben möchten."), ("Please confirm if you want to share your desktop?", "Bitte bestätigen Sie, ob Sie Ihren Desktop freigeben möchten."),
("Closed as expected", "Wie erwartet geschlossen"), ("Closed as expected", "Wie erwartet geschlossen"),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "Pri"), ("About", "Pri"),
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", ""), ("Privacy Statement", ""),
("Mute", "Muta"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "Muta"),
("Audio Input", "Aŭdia enigo"), ("Audio Input", "Aŭdia enigo"),
("Enhancements", ""), ("Enhancements", ""),
("Hardware Codec", ""), ("Hardware Codec", ""),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "Acerca de"), ("About", "Acerca de"),
("Slogan_tip", "Hecho con corazón en este mundo caótico!"), ("Slogan_tip", "Hecho con corazón en este mundo caótico!"),
("Privacy Statement", "Declaración de privacidad"), ("Privacy Statement", "Declaración de privacidad"),
("Mute", "Silenciar"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "Silenciar"),
("Audio Input", "Entrada de audio"), ("Audio Input", "Entrada de audio"),
("Enhancements", "Mejoras"), ("Enhancements", "Mejoras"),
("Hardware Codec", "Códec de hardware"), ("Hardware Codec", "Códec de hardware"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", "Intercambiar lados"), ("Switch Sides", "Intercambiar lados"),
("Please confirm if you want to share your desktop?", "Por favor, confirma si quieres compartir tu escritorio"), ("Please confirm if you want to share your desktop?", "Por favor, confirma si quieres compartir tu escritorio"),
("Closed as expected", "Cerrado como se esperaba"), ("Closed as expected", "Cerrado como se esperaba"),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "درباره"), ("About", "درباره"),
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", ""), ("Privacy Statement", ""),
("Mute", "بستن صدا"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "بستن صدا"),
("Audio Input", "ورودی صدا"), ("Audio Input", "ورودی صدا"),
("Enhancements", "بهبودها"), ("Enhancements", "بهبودها"),
("Hardware Codec", "کدک سخت افزاری"), ("Hardware Codec", "کدک سخت افزاری"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", "طرفین را عوض کنید"), ("Switch Sides", "طرفین را عوض کنید"),
("Please confirm if you want to share your desktop?", "لطفاً تأیید کنید که آیا می خواهید دسکتاپ خود را به اشتراک بگذارید؟"), ("Please confirm if you want to share your desktop?", "لطفاً تأیید کنید که آیا می خواهید دسکتاپ خود را به اشتراک بگذارید؟"),
("Closed as expected", "طبق انتظار بسته شد"), ("Closed as expected", "طبق انتظار بسته شد"),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "À propos de"), ("About", "À propos de"),
("Slogan_tip", "Fait avec cœur dans ce monde chaotique!"), ("Slogan_tip", "Fait avec cœur dans ce monde chaotique!"),
("Privacy Statement", "Déclaration de confidentialité"), ("Privacy Statement", "Déclaration de confidentialité"),
("Mute", "Muet"),
("Build Date", "Date de compilation"), ("Build Date", "Date de compilation"),
("Version", "Version"), ("Version", "Version"),
("Home", "Accueil"), ("Home", "Accueil"),
("Mute", "Muet"),
("Audio Input", "Entrée audio"), ("Audio Input", "Entrée audio"),
("Enhancements", "Améliorations"), ("Enhancements", "Améliorations"),
("Hardware Codec", "Transcodage matériel"), ("Hardware Codec", "Transcodage matériel"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", "Inverser la prise de contrôle"), ("Switch Sides", "Inverser la prise de contrôle"),
("Please confirm if you want to share your desktop?", "Veuillez confirmer le partager de votre bureau ?"), ("Please confirm if you want to share your desktop?", "Veuillez confirmer le partager de votre bureau ?"),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "Πληροφορίες"), ("About", "Πληροφορίες"),
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", ""), ("Privacy Statement", ""),
("Mute", "Σίγαση"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "Σίγαση"),
("Audio Input", "Είσοδος ήχου"), ("Audio Input", "Είσοδος ήχου"),
("Enhancements", "Βελτιώσεις"), ("Enhancements", "Βελτιώσεις"),
("Hardware Codec", "Κωδικοποιητής υλικού"), ("Hardware Codec", "Κωδικοποιητής υλικού"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "Tentang"), ("About", "Tentang"),
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", "Pernyataan Privasi"), ("Privacy Statement", "Pernyataan Privasi"),
("Mute", "Bisukan"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "Bisukan"),
("Audio Input", "Masukkan Audio"), ("Audio Input", "Masukkan Audio"),
("Enhancements", "Peningkatan"), ("Enhancements", "Peningkatan"),
("Hardware Codec", "Codec Perangkat Keras"), ("Hardware Codec", "Codec Perangkat Keras"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "Informazioni"), ("About", "Informazioni"),
("Slogan_tip", "Fatta con il cuore in questo mondo caotico!"), ("Slogan_tip", "Fatta con il cuore in questo mondo caotico!"),
("Privacy Statement", "Informativa sulla privacy"), ("Privacy Statement", "Informativa sulla privacy"),
("Mute", "Silenzia"),
("Build Date", "Data della build"), ("Build Date", "Data della build"),
("Version", "Versione"), ("Version", "Versione"),
("Home", "Home"), ("Home", "Home"),
("Mute", "Silenzia"),
("Audio Input", "Input audio"), ("Audio Input", "Input audio"),
("Enhancements", "Miglioramenti"), ("Enhancements", "Miglioramenti"),
("Hardware Codec", "Codifica Hardware"), ("Hardware Codec", "Codifica Hardware"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", "Cambia lato"), ("Switch Sides", "Cambia lato"),
("Please confirm if you want to share your desktop?", "Vuoi condividere il tuo desktop?"), ("Please confirm if you want to share your desktop?", "Vuoi condividere il tuo desktop?"),
("Closed as expected", "Chiuso come previsto"), ("Closed as expected", "Chiuso come previsto"),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "情報"), ("About", "情報"),
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", ""), ("Privacy Statement", ""),
("Mute", "ミュート"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "ミュート"),
("Audio Input", "音声入力デバイス"), ("Audio Input", "音声入力デバイス"),
("Enhancements", "追加機能"), ("Enhancements", "追加機能"),
("Hardware Codec", "ハードウェア コーデック"), ("Hardware Codec", "ハードウェア コーデック"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "정보"), ("About", "정보"),
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", ""), ("Privacy Statement", ""),
("Mute", "음소거"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "음소거"),
("Audio Input", "오디오 입력"), ("Audio Input", "오디오 입력"),
("Enhancements", ""), ("Enhancements", ""),
("Hardware Codec", "하드웨어 코덱"), ("Hardware Codec", "하드웨어 코덱"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "Туралы"), ("About", "Туралы"),
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", ""), ("Privacy Statement", ""),
("Mute", "Дыбыссыздандыру"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "Дыбыссыздандыру"),
("Audio Input", "Аудио Еңгізу"), ("Audio Input", "Аудио Еңгізу"),
("Enhancements", "Жақсартулар"), ("Enhancements", "Жақсартулар"),
("Hardware Codec", "Hardware Codec"), ("Hardware Codec", "Hardware Codec"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "O aplikacji"), ("About", "O aplikacji"),
("Slogan_tip", "Tworzone z miłością w tym pełnym chaosu świecie!"), ("Slogan_tip", "Tworzone z miłością w tym pełnym chaosu świecie!"),
("Privacy Statement", "Oświadczenie o ochronie prywatności"), ("Privacy Statement", "Oświadczenie o ochronie prywatności"),
("Mute", "Wycisz"),
("Build Date", "Zbudowano"), ("Build Date", "Zbudowano"),
("Version", "Wersja"), ("Version", "Wersja"),
("Home", "Pulpit"), ("Home", "Pulpit"),
("Mute", "Wycisz"),
("Audio Input", "Wejście audio"), ("Audio Input", "Wejście audio"),
("Enhancements", "Ulepszenia"), ("Enhancements", "Ulepszenia"),
("Hardware Codec", "Kodek sprzętowy"), ("Hardware Codec", "Kodek sprzętowy"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", "Zmień Strony"), ("Switch Sides", "Zmień Strony"),
("Please confirm if you want to share your desktop?", "Czy na pewno chcesz udostępnić swój ekran?"), ("Please confirm if you want to share your desktop?", "Czy na pewno chcesz udostępnić swój ekran?"),
("Closed as expected", "Zamknięto pomyślnie"), ("Closed as expected", "Zamknięto pomyślnie"),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "Sobre"), ("About", "Sobre"),
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", ""), ("Privacy Statement", ""),
("Mute", "Silenciar"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "Silenciar"),
("Audio Input", "Entrada de Áudio"), ("Audio Input", "Entrada de Áudio"),
("Enhancements", "Melhorias"), ("Enhancements", "Melhorias"),
("Hardware Codec", ""), ("Hardware Codec", ""),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "Sobre"), ("About", "Sobre"),
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", ""), ("Privacy Statement", ""),
("Mute", "Desativar som"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "Desativar som"),
("Audio Input", "Entrada de Áudio"), ("Audio Input", "Entrada de Áudio"),
("Enhancements", "Melhorias"), ("Enhancements", "Melhorias"),
("Hardware Codec", "Codec de hardware"), ("Hardware Codec", "Codec de hardware"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -42,6 +42,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", ""), ("Privacy Statement", ""),
("Mute", "Fără sunet"), ("Mute", "Fără sunet"),
("Build Date", ""),
("Version", ""),
("Home", ""),
("Audio Input", "Intrare audio"), ("Audio Input", "Intrare audio"),
("Enhancements", "Îmbunătățiri"), ("Enhancements", "Îmbunătățiri"),
("Hardware Codec", "Codec hardware"), ("Hardware Codec", "Codec hardware"),
@ -433,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "О программе"), ("About", "О программе"),
("Slogan_tip", "Сделано с душой в этом безумном мире!"), ("Slogan_tip", "Сделано с душой в этом безумном мире!"),
("Privacy Statement", "Заявление о конфиденциальности"), ("Privacy Statement", "Заявление о конфиденциальности"),
("Mute", "Отключить звук"),
("Build Date", "Дата сборки"), ("Build Date", "Дата сборки"),
("Version", "Версия"), ("Version", "Версия"),
("Home", "Главная"), ("Home", "Главная"),
("Mute", "Отключить звук"),
("Audio Input", "Аудиовход"), ("Audio Input", "Аудиовход"),
("Enhancements", "Улучшения"), ("Enhancements", "Улучшения"),
("Hardware Codec", "Аппаратный кодек"), ("Hardware Codec", "Аппаратный кодек"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", "Переключить стороны"), ("Switch Sides", "Переключить стороны"),
("Please confirm if you want to share your desktop?", "Подтверждаете, что хотите поделиться своим рабочим столом?"), ("Please confirm if you want to share your desktop?", "Подтверждаете, что хотите поделиться своим рабочим столом?"),
("Closed as expected", "Закрыто по ожиданию"), ("Closed as expected", "Закрыто по ожиданию"),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "O RustDesk"), ("About", "O RustDesk"),
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", ""), ("Privacy Statement", ""),
("Mute", "Stíšiť"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "Stíšiť"),
("Audio Input", "Zvukový vstup"), ("Audio Input", "Zvukový vstup"),
("Enhancements", ""), ("Enhancements", ""),
("Hardware Codec", ""), ("Hardware Codec", ""),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "O programu"), ("About", "O programu"),
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", ""), ("Privacy Statement", ""),
("Mute", "Izklopi zvok"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "Izklopi zvok"),
("Audio Input", "Avdio vhod"), ("Audio Input", "Avdio vhod"),
("Enhancements", "Izboljšave"), ("Enhancements", "Izboljšave"),
("Hardware Codec", "Strojni kodek"), ("Hardware Codec", "Strojni kodek"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "Rreth"), ("About", "Rreth"),
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", ""), ("Privacy Statement", ""),
("Mute", "Pa zë"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "Pa zë"),
("Audio Input", "Inputi zërit"), ("Audio Input", "Inputi zërit"),
("Enhancements", "Përmirësimet"), ("Enhancements", "Përmirësimet"),
("Hardware Codec", "Kodeku Harduerik"), ("Hardware Codec", "Kodeku Harduerik"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "O programu"), ("About", "O programu"),
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", ""), ("Privacy Statement", ""),
("Mute", "Utišaj"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "Utišaj"),
("Audio Input", "Audio ulaz"), ("Audio Input", "Audio ulaz"),
("Enhancements", "Proširenja"), ("Enhancements", "Proširenja"),
("Hardware Codec", "Hardverski kodek"), ("Hardware Codec", "Hardverski kodek"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "Om"), ("About", "Om"),
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", ""), ("Privacy Statement", ""),
("Mute", "Tyst"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "Tyst"),
("Audio Input", "Ljud input"), ("Audio Input", "Ljud input"),
("Enhancements", "Förbättringar"), ("Enhancements", "Förbättringar"),
("Hardware Codec", "Hårdvarucodec"), ("Hardware Codec", "Hårdvarucodec"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", ""), ("About", ""),
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", ""), ("Privacy Statement", ""),
("Mute", ""),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", ""),
("Audio Input", ""), ("Audio Input", ""),
("Enhancements", ""), ("Enhancements", ""),
("Hardware Codec", ""), ("Hardware Codec", ""),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "เกี่ยวกับ"), ("About", "เกี่ยวกับ"),
("Slogan_tip", "ทำด้วยใจ ในโลกใบนี้ที่ยุ่งเหยิง!"), ("Slogan_tip", "ทำด้วยใจ ในโลกใบนี้ที่ยุ่งเหยิง!"),
("Privacy Statement", "คำแถลงเกี่ยวกับความเป็นส่วนตัว"), ("Privacy Statement", "คำแถลงเกี่ยวกับความเป็นส่วนตัว"),
("Mute", "ปิดเสียง"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "ปิดเสียง"),
("Audio Input", "ออดิโออินพุท"), ("Audio Input", "ออดิโออินพุท"),
("Enhancements", "การปรับปรุง"), ("Enhancements", "การปรับปรุง"),
("Hardware Codec", "ฮาร์ดแวร์ codec"), ("Hardware Codec", "ฮาร์ดแวร์ codec"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "Hakkında"), ("About", "Hakkında"),
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", ""), ("Privacy Statement", ""),
("Mute", "Sustur"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "Sustur"),
("Audio Input", "Ses Girişi"), ("Audio Input", "Ses Girişi"),
("Enhancements", "Geliştirmeler"), ("Enhancements", "Geliştirmeler"),
("Hardware Codec", "Donanımsal Codec"), ("Hardware Codec", "Donanımsal Codec"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "關於"), ("About", "關於"),
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", ""), ("Privacy Statement", ""),
("Mute", "靜音"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "靜音"),
("Audio Input", "音訊輸入"), ("Audio Input", "音訊輸入"),
("Enhancements", "增強功能"), ("Enhancements", "增強功能"),
("Hardware Codec", "硬件編解碼"), ("Hardware Codec", "硬件編解碼"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", "正常關閉"), ("Closed as expected", "正常關閉"),
("Display", "顯示"),
("Default View Style", "默認顯示方式"),
("Default Scroll Style", "默認滾動方式"),
("Default Image Quality", "默認圖像質量"),
("Default Codec", "默認編解碼"),
("Bitrate", "波特率"),
("FPS", "幀率"),
("Auto", "自動"),
("Other Default Options", "其它默認選項"),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "Про RustDesk"), ("About", "Про RustDesk"),
("Slogan_tip", "Створено з душею в цьому хаотичному світі!"), ("Slogan_tip", "Створено з душею в цьому хаотичному світі!"),
("Privacy Statement", "Декларація про конфіденційність"), ("Privacy Statement", "Декларація про конфіденційність"),
("Mute", "Вимкнути звук"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "Вимкнути звук"),
("Audio Input", "Аудіовхід"), ("Audio Input", "Аудіовхід"),
("Enhancements", "Покращення"), ("Enhancements", "Покращення"),
("Hardware Codec", "Апаратний кодек"), ("Hardware Codec", "Апаратний кодек"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -41,10 +41,10 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "About"), ("About", "About"),
("Slogan_tip", ""), ("Slogan_tip", ""),
("Privacy Statement", ""), ("Privacy Statement", ""),
("Mute", "Tắt tiếng"),
("Build Date", ""), ("Build Date", ""),
("Version", ""), ("Version", ""),
("Home", ""), ("Home", ""),
("Mute", "Tắt tiếng"),
("Audio Input", "Đầu vào âm thanh"), ("Audio Input", "Đầu vào âm thanh"),
("Enhancements", "Các tiện itchs"), ("Enhancements", "Các tiện itchs"),
("Hardware Codec", "Codec phần cứng"), ("Hardware Codec", "Codec phần cứng"),
@ -436,5 +436,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Switch Sides", ""), ("Switch Sides", ""),
("Please confirm if you want to share your desktop?", ""), ("Please confirm if you want to share your desktop?", ""),
("Closed as expected", ""), ("Closed as expected", ""),
("Display", ""),
("Default View Style", ""),
("Default Scroll Style", ""),
("Default Image Quality", ""),
("Default Codec", ""),
("Bitrate", ""),
("FPS", ""),
("Auto", ""),
("Other Default Options", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -917,6 +917,18 @@ pub fn account_auth_result() -> String {
serde_json::to_string(&account::OidcSession::get_result()).unwrap_or_default() serde_json::to_string(&account::OidcSession::get_result()).unwrap_or_default()
} }
#[cfg(feature = "flutter")]
pub fn set_user_default_option(key: String, value: String) {
use hbb_common::config::UserDefaultConfig;
UserDefaultConfig::load().set(key, value);
}
#[cfg(feature = "flutter")]
pub fn get_user_default_option(key: String) -> String {
use hbb_common::config::UserDefaultConfig;
UserDefaultConfig::load().get(&key)
}
// notice: avoiding create ipc connection repeatedly, // notice: avoiding create ipc connection repeatedly,
// because windows named pipe has serious memory leak issue. // because windows named pipe has serious memory leak issue.
#[tokio::main(flavor = "current_thread")] #[tokio::main(flavor = "current_thread")]