mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-02 04:31:29 +03:00
refactor cliprdr, not tested on windows yet
This commit is contained in:
@@ -41,6 +41,7 @@ class Body: Reactor.Component
|
||||
<div class={!c.keyboard ? "disabled" : ""} title={translate('Allow using keyboard and mouse')}><icon .keyboard /></div>
|
||||
<div class={!c.clipboard ? "disabled" : ""} title={translate('Allow using clipboard')}><icon .clipboard /></div>
|
||||
<div class={!c.audio ? "disabled" : ""} title={translate('Allow hearing sound')}><icon .audio /></div>
|
||||
<div class={!c.file ? "disabled" : ""} title={translate('Allow file transfer')}><icon .file /></div>
|
||||
</div>}
|
||||
{c.port_forward ? <div>Port Forwarding: {c.port_forward}</div> : ""}
|
||||
<div style="size:*"/>
|
||||
@@ -94,6 +95,15 @@ class Body: Reactor.Component
|
||||
});
|
||||
}
|
||||
|
||||
event click $(icon.file) {
|
||||
var { cid, connection } = this;
|
||||
checkClickTime(function() {
|
||||
connection.file = !connection.file;
|
||||
body.update();
|
||||
handler.switch_permission(cid, "file", connection.file);
|
||||
});
|
||||
}
|
||||
|
||||
event click $(button#accept) {
|
||||
var { cid, connection } = this;
|
||||
checkClickTime(function() {
|
||||
@@ -243,7 +253,7 @@ function bring_to_top(idx=-1) {
|
||||
}
|
||||
}
|
||||
|
||||
handler.addConnection = function(id, is_file_transfer, port_forward, peer_id, name, authorized, keyboard, clipboard, audio) {
|
||||
handler.addConnection = function(id, is_file_transfer, port_forward, peer_id, name, authorized, keyboard, clipboard, audio, file) {
|
||||
var conn;
|
||||
connections.map(function(c) {
|
||||
if (c.id == id) conn = c;
|
||||
@@ -259,7 +269,7 @@ handler.addConnection = function(id, is_file_transfer, port_forward, peer_id, na
|
||||
port_forward: port_forward,
|
||||
name: name, authorized: authorized, time: new Date(),
|
||||
keyboard: keyboard, clipboard: clipboard, msgs: [], unreaded: 0,
|
||||
audio: audio,
|
||||
audio: audio, file: file
|
||||
});
|
||||
body.cur = connections.length - 1;
|
||||
bring_to_top();
|
||||
@@ -396,7 +406,7 @@ function adjustHeader() {
|
||||
|
||||
view.on("size", adjustHeader);
|
||||
|
||||
// handler.addConnection(0, false, 0, "", "test1", true, false, false, false);
|
||||
// handler.addConnection(1, false, 0, "", "test2--------", true, false, false, false);
|
||||
// handler.addConnection(2, false, 0, "", "test3", true, false, false, false);
|
||||
handler.addConnection(0, false, 0, "", "test1", true, false, false, true, true);
|
||||
// handler.addConnection(1, false, 0, "", "test2--------", true, false, false, false, false);
|
||||
// handler.addConnection(2, false, 0, "", "test3", true, false, false, false, false);
|
||||
// handler.newMessage(0, 'h');
|
||||
|
||||
Reference in New Issue
Block a user