mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-27 23:21:06 +03:00
feat: take screenshot (#11591)
* feat: take screenshot Signed-off-by: fufesou <linlong1266@gmail.com> * screenshot, vram temp switch capturer Signed-off-by: fufesou <linlong1266@gmail.com> * fix: misspelling Signed-off-by: fufesou <linlong1266@gmail.com> * screenshot, taking Signed-off-by: fufesou <linlong1266@gmail.com> * screenshot, rgba stride Signed-off-by: fufesou <linlong1266@gmail.com> * Bumps 1.4.0 Signed-off-by: fufesou <linlong1266@gmail.com> --------- Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -230,6 +230,7 @@ class Header: Reactor.Component {
|
||||
{restart_enabled && (pi.platform == "Linux" || pi.platform == "Windows" || pi.platform == "Mac OS") ? <li #restart_remote_device>{translate('Restart remote device')}</li> : ""}
|
||||
{keyboard_enabled ? <li #lock-screen>{translate('Insert Lock')}</li> : ""}
|
||||
{keyboard_enabled && pi.platform == "Windows" && pi.sas_enabled ? <li #block-input>{translate("Block user input")}</li> : ""}
|
||||
{handler.is_screenshot_supported() ? <li #take-screenshot>{translate('Take screenshot')}</li> : "" }
|
||||
<li #refresh>{translate('Refresh')}</li>
|
||||
</menu>
|
||||
</popup>;
|
||||
@@ -376,6 +377,10 @@ class Header: Reactor.Component {
|
||||
event click $(#lock-screen) {
|
||||
handler.lock_screen();
|
||||
}
|
||||
|
||||
event click $(#take-screenshot) {
|
||||
handler.take_screenshot(pi.current_display, "");
|
||||
}
|
||||
|
||||
event click $(#refresh) {
|
||||
// 0 is just a dummy value. It will be ignored by the handler.
|
||||
@@ -546,6 +551,26 @@ handler.setCurrentDisplay = function(v) {
|
||||
}
|
||||
}
|
||||
|
||||
handler.screenshot = function(msg) {
|
||||
if (msg) {
|
||||
msgbox(
|
||||
"custom-nocancel-nook-hasclose-error",
|
||||
translate("Take screenshot"),
|
||||
msg,
|
||||
"",
|
||||
function() {}
|
||||
);
|
||||
} else {
|
||||
msgbox(
|
||||
"custom-take-screenshot-nocancel-nook",
|
||||
translate("Take screenshot"),
|
||||
translate("screenshot-action-tip"),
|
||||
"",
|
||||
function() {}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function updatePrivacyMode() {
|
||||
var el = $(li#privacy-mode);
|
||||
if (el) {
|
||||
|
||||
Reference in New Issue
Block a user