keep-awake-during-incoming-sessions (#14082)

* keep-awake-during-incoming-sessions

* Update flutter/lib/desktop/pages/desktop_setting_page.dart

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update flutter/lib/common.dart

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update flutter/lib/mobile/pages/settings_page.dart

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update common.dart

* wakelock

Signed-off-by: 21pages <sunboeasy@gmail.com>

* fix build

Signed-off-by: 21pages <sunboeasy@gmail.com>

* Update server_model.dart

---------

Signed-off-by: 21pages <sunboeasy@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
RustDesk
2026-01-21 16:25:57 +08:00
committed by GitHub
parent a6724b1c07
commit 21a7cef98a
60 changed files with 219 additions and 52 deletions

View File

@@ -268,6 +268,7 @@ class Enhancements: Reactor.Component {
<li #enable-abr><span>{svg_checkmark}</span>{translate("Adaptive bitrate")} (beta)</li>
<li #screen-recording>{translate("Recording")}</li>
{support_remove_wallpaper ? <li #allow-remove-wallpaper><span>{svg_checkmark}</span>{translate("Remove wallpaper during incoming sessions")}</li> : ""}
<li #keep-awake-during-incoming-sessions><span>{svg_checkmark}</span>{translate("keep-awake-during-incoming-sessions-label")}</li>
</menu>
</li>;
}
@@ -288,6 +289,13 @@ class Enhancements: Reactor.Component {
if (is_opt_fixed) {
el.state.disabled = true;
}
} else if (el.id == "keep-awake-during-incoming-sessions") {
var enabled = handler.get_option(el.id) != "N";
el.attributes.toggleClass("selected", enabled);
var is_opt_fixed = handler.is_option_fixed(el.id);
if (is_opt_fixed) {
el.state.disabled = true;
}
}
}
@@ -304,6 +312,8 @@ class Enhancements: Reactor.Component {
}
} else if (v.indexOf("allow-") == 0) {
handler.set_option(v, handler.get_option(v) == 'Y' ? default_option_no : 'Y');
} else if (v == 'keep-awake-during-incoming-sessions') {
handler.set_option(v, handler.get_option(v) != 'N' ? 'N' : default_option_yes);
} else if (v == 'screen-recording') {
var show_root_dir = is_win && handler.is_installed();
var user_dir = handler.video_save_directory(false);