aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/settings')
-rw-r--r--modern/src/settings/NotificationPage.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/modern/src/settings/NotificationPage.js b/modern/src/settings/NotificationPage.js
index a5a9d8d2..fdefedaf 100644
--- a/modern/src/settings/NotificationPage.js
+++ b/modern/src/settings/NotificationPage.js
@@ -52,7 +52,7 @@ const NotificationPage = () => {
}));
});
- const validate = () => item && item.type && item.notificators;
+ const validate = () => item && item.type && item.notificators && (!item.notificators?.includes('command') || item.commandId);
return (
<EditItemView
@@ -100,6 +100,15 @@ const NotificationPage = () => {
titleGetter={(it) => t(prefixString('notificator', it.type))}
label={t('notificationNotificators')}
/>
+ {item.notificators?.includes('command') && (
+ <SelectField
+ value={item.commandId || 0}
+ onChange={(event) => setItem({ ...item, commandId: Number(event.target.value) })}
+ endpoint="/api/commands"
+ titleGetter={(it) => it.description}
+ label={t('sharedSavedCommand')}
+ />
+ )}
<Button
variant="outlined"
color="primary"