| 1 | mod oauth; |
| 2 | |
| 3 | use { |
| 4 | oauth::command_get_consent_url::get_consent_url, oauth::command_get_profile::get_profile, |
| 5 | oauth::command_get_token::get_token, oauth::command_start_server::start_server, |
| 6 | }; |
| 7 | |
| 8 | #[macro_use] |
| 9 | extern crate dotenv_codegen; |
| 10 | |
| 11 | #[cfg_attr(mobile, tauri::mobile_entry_point)] |
| 12 | pub fn run() { |
| 13 | tauri::Builder::default() |
| 14 | .plugin( |
| 15 | tauri_plugin_log::Builder::new() |
| 16 | .level(tauri_plugin_log::log::LevelFilter::Info) |
| 17 | .build(), |
| 18 | ) |
| 19 | .plugin(tauri_plugin_store::Builder::new().build()) |
| 20 | .plugin(tauri_plugin_opener::init()) |
| 21 | .plugin(tauri_plugin_haptics::init()) |
| 22 | .plugin(tauri_plugin_oauth::init()) |
| 23 | .invoke_handler(tauri::generate_handler![ |
| 24 | start_server, |
| 25 | get_token, |
| 26 | get_profile, |
| 27 | get_consent_url, |
| 28 | ]) |
| 29 | .run(tauri::generate_context!()) |
| 30 | .expect("Error while running tauri application"); |
| 31 | } |