Skip to content

Commit 3d3b951

Browse files
committed
handle file download
1 parent 3a09141 commit 3d3b951

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

html5/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@
170170
>Upload file</a
171171
>
172172
</li>
173+
<li id="download_menu_entry">
174+
<a
175+
href="#"
176+
data-icon="cloud_download"
177+
onclick="download_file(event); return false"
178+
>Download file</a
179+
>
180+
</li>
173181
<li id="shutdown_menu_entry">
174182
<a
175183
href="#"
@@ -474,6 +482,12 @@ <h2>Xpra Bug Report</h2>
474482
$("#upload").click();
475483
}
476484

485+
function download_file(event) {
486+
$(".menu-content").slideUp();
487+
const command = ["xpra", "send-file"]
488+
client.send(["start-command", "Client-Download-File", command, true, true]);
489+
}
490+
477491
function cleanup_dialogs() {
478492
$(".menu-content").slideUp();
479493
$("#about").hide();

html5/js/Client.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2714,6 +2714,7 @@ class XpraClient {
27142714
(!hello["file-transfer"] && (!hello["file"] || !hello["file"]["enabled"]))
27152715
) {
27162716
$("#upload_menu_entry").hide();
2717+
$("#download_menu_entry").hide();
27172718
}
27182719

27192720
this.server_is_desktop = Boolean(hello["desktop"]);

0 commit comments

Comments
 (0)