feat: add desktop start and native reminders
- Notify at schedule start and optionally N minutes before\n- Add reminder lead setting and TOML persistence\n- Use Linux DBus native notifications with action handling\n- Focus the matching block when a notification is clicked\n- Keep overdue reminders and update validation docs/screenshots
This commit is contained in:
@@ -195,6 +195,10 @@ void AppSettings::load()
|
||||
m_snapMinutes = normalizedSnap(intValue(ui, "snap_minutes", 15));
|
||||
m_trayHintShown = boolValue(ui, "tray_hint_shown", false);
|
||||
}
|
||||
if (const toml::table* reminders = subTable(root, "reminders"))
|
||||
{
|
||||
m_reminderLeadMinutes = qBound(0, intValue(reminders, "lead_minutes", 10), 24 * 60);
|
||||
}
|
||||
if (const toml::table* window = subTable(root, "window"))
|
||||
{
|
||||
m_compactGeometry = QByteArray::fromBase64(stringValue(window, "compact_geometry").toLatin1());
|
||||
@@ -288,6 +292,10 @@ void AppSettings::save()
|
||||
ui.insert("tray_hint_shown", m_trayHintShown);
|
||||
root.insert("ui", std::move(ui));
|
||||
|
||||
toml::table reminders;
|
||||
reminders.insert("lead_minutes", m_reminderLeadMinutes);
|
||||
root.insert("reminders", std::move(reminders));
|
||||
|
||||
toml::table window;
|
||||
window.insert("compact_geometry", m_compactGeometry.toBase64().toStdString());
|
||||
window.insert("schedule_geometry", m_scheduleGeometry.toBase64().toStdString());
|
||||
@@ -395,6 +403,17 @@ void AppSettings::setSnapMinutes(int minutes)
|
||||
save();
|
||||
}
|
||||
|
||||
int AppSettings::reminderLeadMinutes() const
|
||||
{
|
||||
return m_reminderLeadMinutes;
|
||||
}
|
||||
|
||||
void AppSettings::setReminderLeadMinutes(int minutes)
|
||||
{
|
||||
m_reminderLeadMinutes = qBound(0, minutes, 24 * 60);
|
||||
save();
|
||||
}
|
||||
|
||||
bool AppSettings::trayHintShown() const
|
||||
{
|
||||
return m_trayHintShown;
|
||||
|
||||
Reference in New Issue
Block a user