#[derive(Clone, Copy, PartialEq, Default)]
pub enum Pane {
#[default]
Watches,
Changes,
Reminders,
}
#[derive(Clone, PartialEq)]
pub enum Mode {
Normal,
Help,
Confirm(ConfirmAction),
Edit,
EditReminder,
Search,
ViewChange,
Wizard,
ReminderWizard,
Describe, Logs, NotifySetup, FilterList, FilterEdit, MemoryInspector, ProfileInspector, Health, }
#[derive(Clone, Copy, PartialEq)]
pub enum ConfirmAction {
Delete,
DeleteReminder,
Test,
ForceCheck,
}
#[derive(Clone, PartialEq)]
pub enum EditField {
Name,
Interval,
Engine,
Extraction,
Enabled,
Agent,
AgentInstructions,
UseProfile,
Filters,
Notify,
NotifyCustom,
}
#[derive(Clone, PartialEq, Debug)]
pub enum NotifyType {
Ntfy,
Gotify,
Slack,
Discord,
Telegram,
Pushover,
Command,
}
impl NotifyType {
pub fn next(&self) -> Self {
match self {
NotifyType::Ntfy => NotifyType::Gotify,
NotifyType::Gotify => NotifyType::Slack,
NotifyType::Slack => NotifyType::Discord,
NotifyType::Discord => NotifyType::Telegram,
NotifyType::Telegram => NotifyType::Pushover,
NotifyType::Pushover => NotifyType::Command,
NotifyType::Command => NotifyType::Ntfy,
}
}
pub fn label(&self) -> &'static str {
match self {
NotifyType::Ntfy => "ntfy",
NotifyType::Gotify => "Gotify",
NotifyType::Slack => "Slack",
NotifyType::Discord => "Discord",
NotifyType::Telegram => "Telegram",
NotifyType::Pushover => "Pushover",
NotifyType::Command => "Command",
}
}
pub fn placeholder(&self) -> &'static str {
match self {
NotifyType::Ntfy => "topic-name",
NotifyType::Gotify => "https://gotify.example.com|token",
NotifyType::Slack => "https://hooks.slack.com/...",
NotifyType::Discord => "https://discord.com/api/webhooks/...",
NotifyType::Telegram => "chat_id|bot_token",
NotifyType::Pushover => "user_key|api_token",
NotifyType::Command => "command to run",
}
}
}
#[derive(Clone, PartialEq)]
pub enum ReminderEditField {
Name,
TriggerTime,
Recurring,
Interval,
Enabled,
}
#[derive(Clone, PartialEq, Debug)]
pub enum FilterCondition {
Contains,
NotContains,
Matches,
SizeGt,
}
#[derive(Clone, PartialEq)]
pub enum FilterEditField {
Target,
Condition,
Value,
}
#[derive(Clone, PartialEq)]
pub enum MemorySection {
Counters,
LastValues,
Notes,
}
#[derive(Clone, PartialEq)]
pub enum ProfileSection {
Description,
Interests,
GlobalMemory,
}
#[derive(Clone, Copy, PartialEq, Default)]
pub enum DiffViewMode {
#[default]
Inline,
Unified,
}
#[derive(Clone, Debug, PartialEq)]
pub enum WizardStep {
Template,
Url,
Engine,
Name,
Extraction,
Interval,
Agent,
Review,
}
#[derive(Clone, Debug, PartialEq)]
pub enum ReminderWizardStep {
Name,
When,
Recurring,
Review,
}
pub use crate::watch::FilterTarget as FilterTargetType;