mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Add Suspend/Resume support (#1535)
* Add Suspend/Resume support * Support Suspend/Resume/Restart via API, UI and Systray * Support screen lock/unlock scenario * Handle idle scenario * Align with fix for #1368 * Update Windows build * Refactor SuspendHandler to maintain state * Do not start BG-Effect, if system goes into suspend mode * Correct Idle and Resume interaction
This commit is contained in:
@@ -318,6 +318,21 @@ function requestSysInfo()
|
||||
sendToHyperion("sysinfo");
|
||||
}
|
||||
|
||||
function requestSystemSuspend()
|
||||
{
|
||||
sendToHyperion("system","suspend");
|
||||
}
|
||||
|
||||
function requestSystemResume()
|
||||
{
|
||||
sendToHyperion("system","resume");
|
||||
}
|
||||
|
||||
function requestSystemRestart()
|
||||
{
|
||||
sendToHyperion("system","restart");
|
||||
}
|
||||
|
||||
function requestServerConfigSchema()
|
||||
{
|
||||
sendToHyperion("config","getschema");
|
||||
|
@@ -75,6 +75,21 @@ $(document).ready(function () {
|
||||
changePassword();
|
||||
});
|
||||
|
||||
//Suspend Hyperion
|
||||
$('#btn_systemSuspend').off().on('click', function () {
|
||||
requestSystemSuspend();
|
||||
});
|
||||
|
||||
//Resume Hyperion
|
||||
$('#btn_systemResume').off().on('click', function () {
|
||||
requestSystemResume();
|
||||
});
|
||||
|
||||
//Restart Hyperion
|
||||
$('#btn_systemRestart').off().on('click', function () {
|
||||
requestSystemRestart();
|
||||
});
|
||||
|
||||
//Lock Ui
|
||||
$('#btn_lock_ui').off().on('click', function () {
|
||||
removeStorage('loginToken');
|
||||
|
Reference in New Issue
Block a user