* Refactor to fix #1671

* Add GUI/NonGUI mode to info page

* Do not show lock config, if in non-UI mode

* Updae Changelog

* Correct includes

* Remove unused variable

* use ninja generator under macos

---------

Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com>
This commit is contained in:
LordGrey
2024-01-03 19:43:46 +01:00
committed by GitHub
parent 3f2375deaf
commit cdd59ffc87
6 changed files with 184 additions and 120 deletions

View File

@@ -1,6 +1,7 @@
$(document).ready(function () {
performTranslation();
let isGuiMode = window.sysInfo.hyperion.isGuiMode;
const CEC_ENABLED = (jQuery.inArray("cec", window.serverInfo.services) !== -1);
let conf_editor_osEvents = null;
@@ -76,6 +77,12 @@ $(document).ready(function () {
osEvents: window.schema.osEvents
}, true, true);
conf_editor_osEvents.on('ready', function () {
if (!isGuiMode) {
showInputOptionsForKey(conf_editor_osEvents, "osEvents", "suspendEnable", false);
}
});
conf_editor_osEvents.on('change', function () {
conf_editor_osEvents.validate().length || window.readOnlyMode ? $('#btn_submit_os_events').prop('disabled', true) : $('#btn_submit_os_events').prop('disabled', false);
});

View File

@@ -1224,6 +1224,7 @@ function getSystemInfo() {
info += '- Avail Services: ' + window.serverInfo.services + '\n';
info += '- Config path: ' + shy.rootPath + '\n';
info += '- Database: ' + (shy.readOnlyMode ? "ready-only" : "read/write") + '\n';
info += '- Mode: ' + (shy.isGuiMode ? "GUI" : "Non-GUI") + '\n';
info += '\n';