mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Have CECEvent to actions configurable, further clean-ups
This commit is contained in:
@@ -192,6 +192,8 @@
|
||||
"conf_network_tok_intro": "Here you can create and delete tokens for API authentication. Created tokens will only be displayed once.",
|
||||
"conf_network_tok_lastuse": "Last use",
|
||||
"conf_network_tok_title": "Token Management",
|
||||
"conf_cec_events_heading_title": "CEC Events",
|
||||
"conf_cec_events_intro": "Settings related to diffent CEC (Consumer Electronics Control) protocol events Hyperion can handle",
|
||||
"conf_os_events_heading_title": "Operating System Events",
|
||||
"conf_os_events_intro": "Settings related to diffent Operating System events Hyperion can handle",
|
||||
"conf_webconfig_label_intro": "Webconfiguration settings. Edit wisely.",
|
||||
@@ -245,6 +247,8 @@
|
||||
"edt_append_pixel": "Pixel",
|
||||
"edt_append_s": "s",
|
||||
"edt_append_sdegree": "s/degree",
|
||||
"edt_conf_action_title": "Action",
|
||||
"edt_conf_action_expl": "Action to be applied",
|
||||
"edt_conf_bb_blurRemoveCnt_expl": "Number of pixels that get removed from the detected border to cut away blur.",
|
||||
"edt_conf_bb_blurRemoveCnt_title": "Blur pixel",
|
||||
"edt_conf_bb_borderFrameCnt_expl": "Number of frames before a consistent detected border is set.",
|
||||
@@ -260,6 +264,19 @@
|
||||
"edt_conf_bb_unknownFrameCnt_title": "Unknown frames",
|
||||
"edt_conf_bge_heading_title": "Background Effect/Color",
|
||||
"edt_conf_bobls_heading_title": "Boblight Server",
|
||||
"edt_conf_cec_actions_header_title": "Actions",
|
||||
"edt_conf_cec_actions_header_expl": "Define which action should take place on a recognised CEC event",
|
||||
"edt_conf_cec_actions_header_item_title": "Action",
|
||||
"edt_conf_cec_button_release_delay_ms_title": "Button release time",
|
||||
"edt_conf_cec_button_release_delay_ms_expl": "Remote button press release time",
|
||||
"edt_conf_cec_button_repeat_rate_ms_title": "Button repeat rate",
|
||||
"edt_conf_cec_button_repeat_rate_ms_expl": "Remote button press repeat rate",
|
||||
"edt_conf_cec_double_tap_timeout_ms_title": "Button delay before repeating",
|
||||
"edt_conf_cec_double_tap_timeout_ms_expl": "Remote button press delay before repeating",
|
||||
"edt_conf_cec_event_title": "CEC Event",
|
||||
"edt_conf_cec_event_expl": "CEC event that will trigger an action",
|
||||
"edt_conf_cec_events_heading_title": "Events",
|
||||
"edt_conf_cec_events_heading_expl": "Events explain",
|
||||
"edt_conf_color_accuracyLevel_expl": "Level how accurate dominat colors are evaluated. A higher level creates more accurate results, but also requries more processing power. Should to be combined with reduced pixel processing.",
|
||||
"edt_conf_color_accuracyLevel_title": "Accuracy level",
|
||||
"edt_conf_color_backlightColored_expl": "Add some color to your backlight.",
|
||||
@@ -322,6 +339,13 @@
|
||||
"edt_conf_enum_HORIZONTAL": "Horizontal",
|
||||
"edt_conf_enum_VERTICAL": "Vertical",
|
||||
"edt_conf_enum_BOTH": "Horizontal & Vertical",
|
||||
"edt_conf_enum_action_idle": "Idle",
|
||||
"edt_conf_enum_action_restart": "Restart",
|
||||
"edt_conf_enum_action_resume": "Resume",
|
||||
"edt_conf_enum_action_resumeIdle": "ResumeIdle",
|
||||
"edt_conf_enum_action_suspend": "Suspend",
|
||||
"edt_conf_enum_action_toggleIdle": "ToggleIdle",
|
||||
"edt_conf_enum_action_toggleSuspend": "ToggleSuspend",
|
||||
"edt_conf_enum_automatic": "Automatic",
|
||||
"edt_conf_enum_bbclassic": "Classic",
|
||||
"edt_conf_enum_bbdefault": "Default",
|
||||
@@ -330,6 +354,12 @@
|
||||
"edt_conf_enum_bgr": "BGR",
|
||||
"edt_conf_enum_bottom_up": "Bottom up",
|
||||
"edt_conf_enum_brg": "BRG",
|
||||
"edt_conf_enum_cec_key_f1_blue": "Blue button pressed",
|
||||
"edt_conf_enum_cec_key_f2_red": "Red button pressed",
|
||||
"edt_conf_enum_cec_key_f3_green": "Green button pressed",
|
||||
"edt_conf_enum_cec_key_f4_yellow": "Yellow button pressed",
|
||||
"edt_conf_enum_cec_opcode_set stream path": "TV on",
|
||||
"edt_conf_enum_cec_opcode_standby": "TV off",
|
||||
"edt_conf_enum_color": "Color",
|
||||
"edt_conf_enum_custom": "Custom",
|
||||
"edt_conf_enum_decay": "Decay",
|
||||
|
@@ -1,11 +1,10 @@
|
||||
$(document).ready(function () {
|
||||
performTranslation();
|
||||
|
||||
var CEC_ENABLED = (jQuery.inArray("cec", window.serverInfo.services) !== -1);
|
||||
|
||||
var conf_editor_osEvents = null;
|
||||
var conf_editor_cecEvents = null;
|
||||
const CEC_ENABLED = (jQuery.inArray("cec", window.serverInfo.services) !== -1);
|
||||
|
||||
let conf_editor_osEvents = null;
|
||||
let conf_editor_cecEvents = null;
|
||||
|
||||
if (window.showOptHelp) {
|
||||
//Operating System Events
|
||||
@@ -48,7 +47,9 @@ $(document).ready(function () {
|
||||
}, true, true);
|
||||
|
||||
conf_editor_cecEvents.on('change', function () {
|
||||
var cecEventsEnable = conf_editor_cecEvents.getEditor("root.cecEvents.enable").getValue();
|
||||
|
||||
const cecEventsEnable = conf_editor_cecEvents.getEditor("root.cecEvents.enable").getValue();
|
||||
|
||||
if (cecEventsEnable) {
|
||||
showInputOptionsForKey(conf_editor_cecEvents, "cecEvents", "enable", true);
|
||||
$('#cecEventsHelpPanelId').show();
|
||||
@@ -56,11 +57,16 @@ $(document).ready(function () {
|
||||
showInputOptionsForKey(conf_editor_cecEvents, "cecEvents", "enable", false);
|
||||
$('#cecEventsHelpPanelId').hide();
|
||||
}
|
||||
|
||||
conf_editor_cecEvents.validate().length || window.readOnlyMode ? $('#btn_submit_cec_events').prop('disabled', true) : $('#btn_submit_cec_events').prop('disabled', false);
|
||||
});
|
||||
|
||||
$('#btn_submit_cec_events').off().on('click', function () {
|
||||
requestWriteConfig(conf_editor_cecEvents.getValue());
|
||||
|
||||
const saveOptions = conf_editor_cecEvents.getValue();
|
||||
// Workaround, as otherwise actions array is empty
|
||||
saveOptions.cecEvents.actions = conf_editor_cecEvents.getEditor("root.cecEvents.actions").getValue();
|
||||
requestWriteConfig(saveOptions);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -71,7 +77,7 @@ $(document).ready(function () {
|
||||
createHint("intro", $.i18n('conf_cec_events_intro'), "editor_container_cec_events");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
removeOverlay();
|
||||
});
|
||||
|
||||
|
@@ -5,7 +5,6 @@ $(document).ready(function () {
|
||||
var screenGrabberAvailable = (window.serverInfo.grabbers.screen.available.length !== 0);
|
||||
var videoGrabberAvailable = (window.serverInfo.grabbers.video.available.length !== 0);
|
||||
const audioGrabberAvailable = (window.serverInfo.grabbers.audio.available.length !== 0);
|
||||
var CEC_ENABLED = (jQuery.inArray("cec", window.serverInfo.services) !== -1);
|
||||
|
||||
var conf_editor_video = null;
|
||||
var conf_editor_audio = null;
|
||||
@@ -369,11 +368,6 @@ $(document).ready(function () {
|
||||
|
||||
conf_editor_video.on('change', function () {
|
||||
|
||||
// Hide elements not supported by the backend
|
||||
if (window.serverInfo.cec.enabled === false || !CEC_ENABLED) {
|
||||
showInputOptionForItem(conf_editor_video, "grabberV4L2", "cecDetection", false);
|
||||
}
|
||||
|
||||
// Validate the current editor's content
|
||||
if (!conf_editor_video.validate().length) {
|
||||
var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
|
||||
|
Reference in New Issue
Block a user