mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-27 23:21:06 +03:00
@@ -57,6 +57,7 @@ class Body: Reactor.Component
|
||||
<div class={!c.restart ? "disabled" : ""} title={translate('Allow remote restart')}><icon .restart /></div>
|
||||
</div> <div .permissions style="margin-top:8px;" >
|
||||
<div class={!c.recording ? "disabled" : ""} title={translate('Allow recording session')}><icon .recording /></div>
|
||||
<div class={!c.block_input ? "disabled" : ""} title={translate('Allow block input')} style={is_win ? "" : "display:none;"}><icon .block_input /></div>
|
||||
</div></div>
|
||||
}
|
||||
{c.port_forward ? <div>Port Forwarding: {c.port_forward}</div> : ""}
|
||||
@@ -143,6 +144,15 @@ class Body: Reactor.Component
|
||||
});
|
||||
}
|
||||
|
||||
event click $(icon.block_input) {
|
||||
var { cid, connection } = this;
|
||||
checkClickTime(function() {
|
||||
connection.block_input = !connection.block_input;
|
||||
body.update();
|
||||
handler.switch_permission(cid, "block_input", connection.block_input);
|
||||
});
|
||||
}
|
||||
|
||||
event click $(button#accept) {
|
||||
var { cid, connection } = this;
|
||||
checkClickTime(function() {
|
||||
@@ -346,7 +356,7 @@ function bring_to_top(idx=-1) {
|
||||
}
|
||||
}
|
||||
|
||||
handler.addConnection = function(id, is_file_transfer, port_forward, peer_id, name, authorized, keyboard, clipboard, audio, file, restart, recording) {
|
||||
handler.addConnection = function(id, is_file_transfer, port_forward, peer_id, name, authorized, keyboard, clipboard, audio, file, restart, recording, block_input) {
|
||||
stdout.println("new connection #" + id + ": " + peer_id);
|
||||
var conn;
|
||||
connections.map(function(c) {
|
||||
@@ -368,6 +378,7 @@ handler.addConnection = function(id, is_file_transfer, port_forward, peer_id, na
|
||||
name: name, authorized: authorized, time: new Date(), now: new Date(),
|
||||
keyboard: keyboard, clipboard: clipboard, msgs: [], unreaded: 0,
|
||||
audio: audio, file: file, restart: restart, recording: recording,
|
||||
block_input:block_input,
|
||||
disconnected: false
|
||||
};
|
||||
if (idx < 0) {
|
||||
|
||||
Reference in New Issue
Block a user