Merge branch 'worktree-agent-af8a7475a38f6de50' into integrate/notify-marked
This commit is contained in:
@@ -4,15 +4,25 @@ import '../../core/api_gateway.dart';
|
||||
|
||||
/// One server-side ntfy notification choice, in the server's wire key.
|
||||
class NtfySetting {
|
||||
const NtfySetting(this.key, this.label);
|
||||
const NtfySetting(this.key, this.label, {this.subtitle});
|
||||
|
||||
final String key;
|
||||
final String label;
|
||||
|
||||
/// Optional one-line explanation shown under [label].
|
||||
final String? subtitle;
|
||||
}
|
||||
|
||||
/// The server's global notification choices, in display order.
|
||||
///
|
||||
/// `run_finished` (server default off) makes every run end notify; without it
|
||||
/// only runs started with "Notify me" announce their success or failure.
|
||||
const ntfySettings = <NtfySetting>[
|
||||
NtfySetting('run_finished', 'Run finished'),
|
||||
NtfySetting(
|
||||
'run_finished',
|
||||
'Notify when any run ends',
|
||||
subtitle: 'Otherwise only runs started with Notify me',
|
||||
),
|
||||
NtfySetting('chat_needs_you', 'Chat needs your answer or approval'),
|
||||
NtfySetting('chat_reply_finished', 'Chat reply finished'),
|
||||
];
|
||||
|
||||
@@ -140,6 +140,7 @@ class _SettingsNtfySectionState extends State<SettingsNtfySection> {
|
||||
return CupertinoListTile(
|
||||
key: ntfySettingKey(setting.key),
|
||||
title: Text(setting.label),
|
||||
subtitle: setting.subtitle == null ? null : Text(setting.subtitle!),
|
||||
// iOS settings rows toggle with a switch; an unchecked checkbox is
|
||||
// nearly invisible on the grouped row.
|
||||
trailing: CupertinoSwitch(value: value, onChanged: onChanged),
|
||||
@@ -149,6 +150,7 @@ class _SettingsNtfySectionState extends State<SettingsNtfySection> {
|
||||
return CheckboxListTile(
|
||||
key: ntfySettingKey(setting.key),
|
||||
title: Text(setting.label),
|
||||
subtitle: setting.subtitle == null ? null : Text(setting.subtitle!),
|
||||
value: value,
|
||||
onChanged: onChanged == null ? null : (next) => onChanged(next!),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user