polish block input

This commit is contained in:
rustdesk 2022-01-15 18:27:15 +08:00
parent 647721a37e
commit 35816d4fbb
6 changed files with 22 additions and 7 deletions

View File

@ -173,7 +173,8 @@ message KeyEvent {
uint32 chr = 4;
uint32 unicode = 5;
string seq = 6;
} repeated ControlKey modifiers = 8;
};
repeated ControlKey modifiers = 8;
}
message CursorData {

View File

@ -788,7 +788,9 @@ impl LoginConfigHandler {
self.config.store(&self.id);
return None;
}
self.save_config(config);
if !name.contains("block-input") {
self.save_config(config);
}
let mut misc = Misc::new();
misc.set_option(option);
let mut msg_out = Message::new();

View File

@ -79,6 +79,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Finished", "完成"),
("Custom Image Quality", "设置画面质量"),
("Privacy mode", "隐私模式"),
("Block user input", "阻止用户输入"),
("Unblock user input", "取消阻止用户输入"),
("Adjust Window", "调节窗口"),
("Original", "原始比例"),
("Shrink", "收缩"),

View File

@ -79,6 +79,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Finished", "Terminé"),
("Custom Image Quality", "Définir la qualité d'image"),
("Privacy mode", "Mode privé"),
("Block user input", "Bloquer la saisie de l'utilisateur"),
("Unblock user input", "Débloquer l'entrée de l'utilisateur"),
("Adjust Window", "Ajuster la fenêtre"),
("Original", "Ratio d'origine"),
("Shrink", "Rétréci"),

View File

@ -79,6 +79,8 @@ lazy_static::lazy_static! {
("Finished", "Terminato"),
("Custom Image Quality", "Qualità immagine personalizzata"),
("Privacy mode", "Modalità privacy"),
("Block user input", "Blocca l'input dell'utente"),
("Unblock user input", "Sbloccare l'input dell'utente"),
("Adjust Window", "Adatta la finestra"),
("Original", "Originale"),
("Shrink", "Restringi"),

View File

@ -130,7 +130,6 @@ class Header: Reactor.Component {
{audio_enabled ? <li #disable-audio .toggle-option><span>{svg_checkmark}</span>{translate('Mute')}</li> : ""}
{keyboard_enabled && clipboard_enabled ? <li #disable-clipboard .toggle-option><span>{svg_checkmark}</span>{translate('Disable clipboard')}</li> : ""}
{keyboard_enabled ? <li #lock-after-session-end .toggle-option><span>{svg_checkmark}</span>{translate('Lock after session end')}</li> : ""}
{pi.platform == "Windows" ? <li #block-input>Block user input </li> : ""}
{pi.platform == "Windows" ? <li #privacy-mode .toggle-option><span>{svg_checkmark}</span>{translate('Privacy mode')}</li> : ""}
</menu>
</popup>;
@ -145,7 +144,7 @@ class Header: Reactor.Component {
{keyboard_enabled && (pi.platform == "Linux" || pi.sas_enabled) ? <li #ctrl-alt-del>{translate('Insert')} Ctrl + Alt + Del</li> : ""}
<div .separator />
{keyboard_enabled ? <li #lock-screen>{translate('Insert Lock')}</li> : ""}
{false && pi.platform == "Windows" ? <li #block-input>Block user input </li> : ""}
{keyboard_enabled && pi.platform == "Windows" ? <li #block-input>{translate("Block user input")}</li> : ""}
{handler.support_refresh() ? <li #refresh>{translate('Refresh')}</li> : ""}
</menu>
</popup>;
@ -247,11 +246,11 @@ class Header: Reactor.Component {
if (!input_blocked) {
handler.toggle_option("block-input");
input_blocked = true;
$(#block-input).text = "Unblock user input";
$(#block-input).text = translate("Unblock user input");
} else {
handler.toggle_option("unblock-input");
input_blocked = false;
$(#block-input).text = "Block user input";
$(#block-input).text = translate("Block user input");
}
}
@ -303,7 +302,14 @@ function toggleMenuState() {
for (var id in ["show-remote-cursor", "disable-audio", "disable-clipboard", "lock-after-session-end", "privacy-mode"]) {
var el = self.select('#' + id);
if (el) {
el.attributes.toggleClass("selected", handler.get_toggle_option(id));
var value = handler.get_toggle_option(id);
el.attributes.toggleClass("selected", value);
if (id == "privacy-mode") {
var el = $(li#block-input);
if (el) {
el.state.disabled = value;
}
}
}
}
}