Initial commit: Outlook-competitor desktop mail client
Tauri v2 (Rust backend, React/TypeScript frontend). IMAP/POP3/SMTP core, Google OAuth (mail/calendar/contacts sync), CalDAV, local calendar with recurrence, rules engine, contacts, tasks, unified inbox, context menus, drag & drop, snooze, templates, and more.
This commit is contained in:
@@ -0,0 +1,137 @@
|
||||
mod accounts;
|
||||
mod caldav;
|
||||
mod commands;
|
||||
mod db;
|
||||
mod error;
|
||||
mod gcal;
|
||||
mod gcontacts;
|
||||
mod ics;
|
||||
mod idle;
|
||||
mod imap_client;
|
||||
mod mailutil;
|
||||
mod mbox;
|
||||
mod models;
|
||||
mod oauth;
|
||||
mod pop3_client;
|
||||
mod recurrence;
|
||||
mod reminders;
|
||||
mod smtp_client;
|
||||
mod vcard;
|
||||
|
||||
use db::Db;
|
||||
use idle::UnseenState;
|
||||
use tauri::Manager;
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.plugin(tauri_plugin_notification::init())
|
||||
.setup(|app| {
|
||||
if cfg!(debug_assertions) {
|
||||
app.handle().plugin(
|
||||
tauri_plugin_log::Builder::default()
|
||||
.level(log::LevelFilter::Info)
|
||||
.build(),
|
||||
)?;
|
||||
}
|
||||
let data_dir = app.path().app_data_dir()?;
|
||||
let db = Db::open(&data_dir)?;
|
||||
app.manage(db);
|
||||
app.manage(UnseenState::new());
|
||||
app.manage(idle::NotificationSettings::new());
|
||||
app.manage(commands::PendingSends::new());
|
||||
idle::spawn_watchers(app.handle().clone());
|
||||
reminders::spawn_poller(app.handle().clone());
|
||||
commands::rehydrate_scheduled_sends(app.handle());
|
||||
Ok(())
|
||||
})
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
commands::add_account,
|
||||
commands::list_accounts,
|
||||
commands::delete_account,
|
||||
commands::update_account,
|
||||
commands::list_folders,
|
||||
commands::create_folder,
|
||||
commands::rename_folder,
|
||||
commands::delete_folder,
|
||||
commands::mark_folder_read,
|
||||
commands::apply_rules_to_folder,
|
||||
commands::sync_messages,
|
||||
commands::list_cached_messages,
|
||||
commands::get_message,
|
||||
commands::send_message,
|
||||
commands::send_message_at,
|
||||
commands::cancel_scheduled_send,
|
||||
commands::mark_read,
|
||||
commands::delete_message,
|
||||
commands::search_messages,
|
||||
commands::search_all_messages,
|
||||
commands::set_message_category,
|
||||
commands::toggle_flag,
|
||||
commands::move_message,
|
||||
commands::list_contacts,
|
||||
commands::search_contacts,
|
||||
commands::add_contact,
|
||||
commands::update_contact,
|
||||
commands::delete_contact,
|
||||
commands::toggle_contact_favorite,
|
||||
commands::export_contacts_vcard,
|
||||
commands::import_contacts_vcard,
|
||||
commands::export_message_eml,
|
||||
commands::export_folder_mbox,
|
||||
commands::export_full_backup,
|
||||
commands::import_eml_file,
|
||||
commands::import_mbox_file,
|
||||
commands::save_draft,
|
||||
commands::load_draft,
|
||||
commands::google_oauth_add_account,
|
||||
commands::list_rules,
|
||||
commands::create_rule,
|
||||
commands::set_rule_enabled,
|
||||
commands::delete_rule,
|
||||
commands::list_events,
|
||||
commands::create_event,
|
||||
commands::update_event,
|
||||
commands::delete_event,
|
||||
commands::import_ics_file,
|
||||
commands::import_ics_text,
|
||||
commands::reply_to_invite,
|
||||
commands::preview_invite,
|
||||
commands::get_vacation_settings,
|
||||
commands::save_vacation_settings,
|
||||
commands::snooze_message,
|
||||
commands::unsnooze_message,
|
||||
commands::list_snoozed_messages,
|
||||
commands::list_templates,
|
||||
commands::create_template,
|
||||
commands::update_template,
|
||||
commands::delete_template,
|
||||
commands::search_messages_advanced,
|
||||
commands::update_event_occurrence,
|
||||
commands::delete_event_occurrence,
|
||||
commands::list_caldav_accounts,
|
||||
commands::add_caldav_account,
|
||||
commands::delete_caldav_account,
|
||||
commands::sync_caldav_calendar,
|
||||
commands::export_events_ics,
|
||||
commands::get_event,
|
||||
commands::list_upcoming_reminders,
|
||||
commands::sync_google_calendar,
|
||||
commands::sync_google_contacts,
|
||||
commands::reconnect_google_account,
|
||||
commands::set_desktop_notifications_enabled,
|
||||
commands::list_tasks,
|
||||
commands::create_task,
|
||||
commands::update_task,
|
||||
commands::delete_task,
|
||||
commands::set_task_completed,
|
||||
commands::create_task_from_message,
|
||||
commands::list_contact_groups,
|
||||
commands::create_contact_group,
|
||||
commands::update_contact_group,
|
||||
commands::delete_contact_group,
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
Reference in New Issue
Block a user