From b93d4ce3fc2633351b7829db1b396d65fcf296a5 Mon Sep 17 00:00:00 2001 From: jkh0kr Date: Fri, 20 Sep 2024 16:16:20 +0900 Subject: [PATCH 1/3] Update ko.rs (#9411) Add Korean language --- src/lang/ko.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lang/ko.rs b/src/lang/ko.rs index 417073d05e1d..9d9c29f9af2a 100644 --- a/src/lang/ko.rs +++ b/src/lang/ko.rs @@ -641,11 +641,11 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Platform", "플랫폼"), ("Days remaining", "일 남음"), ("enable-trusted-devices-tip", "신뢰할 수 있는 기기에서 2FA 검증 건너뛰기"), - ("Parent directory", ""), - ("Resume", ""), - ("Invalid file name", ""), - ("one-way-file-transfer-tip", ""), - ("Authentication Required", ""), - ("Authenticate", ""), + ("Parent directory", "상위 디렉토리"), + ("Resume", "재개"), + ("Invalid file name", "잘못된 파일 이름"), + ("one-way-file-transfer-tip", "단방향 파일 전송은 제어되는 쪽에서 활성화됩니다."), + ("Authentication Required", "인증 필요함"), + ("Authenticate", "인증"), ].iter().cloned().collect(); } From 2e314bf032938fb57a82a8bed3285b490da5b9c9 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Fri, 20 Sep 2024 17:38:29 +0800 Subject: [PATCH 2/3] disable init clipboard sync by default --- libs/hbb_common/src/config.rs | 14 ++++++++++++-- src/client/io_loop.rs | 15 ++++++--------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/libs/hbb_common/src/config.rs b/libs/hbb_common/src/config.rs index 0e91ecf42c3f..f0f7ec7317ec 100644 --- a/libs/hbb_common/src/config.rs +++ b/libs/hbb_common/src/config.rs @@ -296,6 +296,8 @@ pub struct PeerConfig { pub keyboard_mode: String, #[serde(flatten)] pub view_only: ViewOnly, + #[serde(flatten)] + pub sync_init_clipboard: SyncInitClipboard, // Mouse wheel or touchpad scroll mode #[serde( default = "PeerConfig::default_reverse_mouse_wheel", @@ -373,6 +375,7 @@ impl Default for PeerConfig { ui_flutter: Default::default(), info: Default::default(), transfer: Default::default(), + sync_init_clipboard: Default::default(), } } } @@ -1462,6 +1465,13 @@ serde_field_bool!( "ViewOnly::default_view_only" ); +serde_field_bool!( + SyncInitClipboard, + "sync-init-clipboard", + default_sync_init_clipboard, + "SyncInitClipboard::default_sync_init_clipboard" +); + #[derive(Debug, Default, Serialize, Deserialize, Clone)] pub struct LocalConfig { #[serde(default, deserialize_with = "deserialize_string")] @@ -2156,6 +2166,7 @@ pub mod keys { pub const OPTION_CUSTOM_IMAGE_QUALITY: &str = "custom_image_quality"; pub const OPTION_CUSTOM_FPS: &str = "custom-fps"; pub const OPTION_CODEC_PREFERENCE: &str = "codec-preference"; + pub const OPTION_SYNC_INIT_CLIPBOARD: &str = "sync-init-clipboard"; pub const OPTION_THEME: &str = "theme"; pub const OPTION_LANGUAGE: &str = "lang"; pub const OPTION_REMOTE_MENUBAR_DRAG_LEFT: &str = "remote-menubar-drag-left"; @@ -2219,7 +2230,6 @@ pub mod keys { pub const OPTION_DEFAULT_CONNECT_PASSWORD: &str = "default-connect-password"; pub const OPTION_HIDE_TRAY: &str = "hide-tray"; pub const OPTION_ONE_WAY_CLIPBOARD_REDIRECTION: &str = "one-way-clipboard-redirection"; - pub const OPTION_ENABLE_CLIPBOARD_INIT_SYNC: &str = "enable-clipboard-init-sync"; pub const OPTION_ALLOW_LOGON_SCREEN_PASSWORD: &str = "allow-logon-screen-password"; pub const OPTION_ONE_WAY_FILE_TRANSFER: &str = "one-way-file-transfer"; @@ -2280,6 +2290,7 @@ pub mod keys { OPTION_CUSTOM_IMAGE_QUALITY, OPTION_CUSTOM_FPS, OPTION_CODEC_PREFERENCE, + OPTION_SYNC_INIT_CLIPBOARD, ]; // DEFAULT_LOCAL_SETTINGS, OVERWRITE_LOCAL_SETTINGS pub const KEYS_LOCAL_SETTINGS: &[&str] = &[ @@ -2367,7 +2378,6 @@ pub mod keys { OPTION_DEFAULT_CONNECT_PASSWORD, OPTION_HIDE_TRAY, OPTION_ONE_WAY_CLIPBOARD_REDIRECTION, - OPTION_ENABLE_CLIPBOARD_INIT_SYNC, OPTION_ALLOW_LOGON_SCREEN_PASSWORD, OPTION_ONE_WAY_FILE_TRANSFER, ]; diff --git a/src/client/io_loop.rs b/src/client/io_loop.rs index c23c967b5809..84d8a897cf58 100644 --- a/src/client/io_loop.rs +++ b/src/client/io_loop.rs @@ -1196,15 +1196,12 @@ impl Remote { } #[cfg(not(any(target_os = "android", target_os = "ios")))] - if let Some(msg_out) = crate::clipboard::get_current_clipboard_msg( - &peer_version, - &peer_platform, - crate::clipboard::ClipboardSide::Client, - ) { - if crate::get_builtin_option( - config::keys::OPTION_ENABLE_CLIPBOARD_INIT_SYNC, - ) != "N" - { + if self.handler.lc.read().unwrap().sync_init_clipboard.v { + if let Some(msg_out) = crate::clipboard::get_current_clipboard_msg( + &peer_version, + &peer_platform, + crate::clipboard::ClipboardSide::Client, + ) { let sender = self.sender.clone(); let permission_config = self.handler.get_permission_config(); tokio::spawn(async move { From a516f01feb982202b95bc291e4cbd593eb5bd0be Mon Sep 17 00:00:00 2001 From: Dmytro <67293930+Nollasko@users.noreply.github.com> Date: Fri, 20 Sep 2024 16:38:16 +0300 Subject: [PATCH 3/3] Update uk.rs (#9416) --- src/lang/uk.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/lang/uk.rs b/src/lang/uk.rs index aa34887be371..41634facc398 100644 --- a/src/lang/uk.rs +++ b/src/lang/uk.rs @@ -246,7 +246,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Paste", "Вставити"), ("Paste here?", "Вставити сюди?"), ("Are you sure to close the connection?", "Ви впевнені, що хочете завершити підключення?"), - ("Download new version", "Завантажити нову версію"), + ("Download new version", "Завантажте нову версію"), ("Touch mode", "Сенсорний режим"), ("Mouse mode", "Режим миші"), ("One-Finger Tap", "Дотик одним пальцем"), @@ -636,16 +636,16 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Requires at least {} characters", "Потрібно щонайменше {} символів"), ("Wrong PIN", "Неправильний PIN-код"), ("Set PIN", "Встановити PIN-код"), - ("Enable trusted devices", ""), - ("Manage trusted devices", ""), - ("Platform", ""), - ("Days remaining", ""), - ("enable-trusted-devices-tip", ""), - ("Parent directory", ""), - ("Resume", ""), - ("Invalid file name", ""), - ("one-way-file-transfer-tip", ""), - ("Authentication Required", ""), - ("Authenticate", ""), + ("Enable trusted devices", "Увімкнути довірені пристрої"), + ("Manage trusted devices", "Керувати довіреними пристроями"), + ("Platform", "Платформа"), + ("Days remaining", "Залишилося днів"), + ("enable-trusted-devices-tip", "Дозволити довіреним пристроям пропускати двофакторну автентифікацію?"), + ("Parent directory", "Батьківський каталог"), + ("Resume", "Продовжити"), + ("Invalid file name", "Неправильне ім'я файлу"), + ("one-way-file-transfer-tip", "На керованій стороні ввімкнено одностороннє передавання файлів."), + ("Authentication Required", "Потрібна автентифікація"), + ("Authenticate", "Автентифікувати"), ].iter().cloned().collect(); }