Hooks: add noctaliaPerformance hooks

This commit is contained in:
Ly-sec
2025-12-19 16:24:52 +01:00
parent 646ba19e79
commit 8c9a95b2f9
15 changed files with 219 additions and 2 deletions
+44
View File
@@ -121,6 +121,50 @@ ColumnLayout {
Layout.fillWidth: true
}
// Performance Mode Enabled Hook Section
NInputAction {
id: performanceModeEnabledHookInput
label: I18n.tr("settings.hooks.performance-mode-enabled.label")
description: I18n.tr("settings.hooks.performance-mode-enabled.description")
placeholderText: I18n.tr("settings.hooks.performance-mode-enabled.placeholder")
text: Settings.data.hooks.performanceModeEnabled
onEditingFinished: {
Settings.data.hooks.performanceModeEnabled = performanceModeEnabledHookInput.text;
}
onActionClicked: {
if (performanceModeEnabledHookInput.text) {
HooksService.executePerformanceModeEnabledHook();
}
}
Layout.fillWidth: true
}
NDivider {
Layout.fillWidth: true
}
// Performance Mode Disabled Hook Section
NInputAction {
id: performanceModeDisabledHookInput
label: I18n.tr("settings.hooks.performance-mode-disabled.label")
description: I18n.tr("settings.hooks.performance-mode-disabled.description")
placeholderText: I18n.tr("settings.hooks.performance-mode-disabled.placeholder")
text: Settings.data.hooks.performanceModeDisabled
onEditingFinished: {
Settings.data.hooks.performanceModeDisabled = performanceModeDisabledHookInput.text;
}
onActionClicked: {
if (performanceModeDisabledHookInput.text) {
HooksService.executePerformanceModeDisabledHook();
}
}
Layout.fillWidth: true
}
NDivider {
Layout.fillWidth: true
}
// Info section
ColumnLayout {
spacing: Style.marginM