Add settings view with theme, categories, export, and backup

This commit is contained in:
2026-03-02 00:57:05 +02:00
parent 2fff781a53
commit ed5a5e231f
5 changed files with 849 additions and 9 deletions

View File

@@ -734,6 +734,21 @@ impl Database {
Ok(())
}
pub fn reset_all_data(&self) -> SqlResult<()> {
self.conn.execute_batch(
"DELETE FROM transactions;
DELETE FROM budgets;
DELETE FROM recurring_transactions;
DELETE FROM budget_notifications;
DELETE FROM categories;
DELETE FROM exchange_rate_cache;
DELETE FROM settings;"
)?;
self.seed_default_categories()?;
self.set_setting("schema_version", "1")?;
Ok(())
}
fn seed_default_categories(&self) -> SqlResult<()> {
let expense_categories = [
("Food & Dining", "\u{1f354}", "#e74c3c"),