Initial commit: LoFlum FTP/SFTP client
Tauri 2 + Rust + Svelte 5. SFTP via ssh2, FTP via suppaftp. Transfer queue with async worker, SQLite site storage, keychain.
This commit is contained in:
parent
0f182ab76f
commit
79855585bd
60 changed files with 14532 additions and 18 deletions
47
src-tauri/src/lib.rs
Normal file
47
src-tauri/src/lib.rs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
pub mod commands;
|
||||
pub mod domain;
|
||||
pub mod fs;
|
||||
pub mod protocols;
|
||||
pub mod storage;
|
||||
pub mod transfer;
|
||||
|
||||
use std::sync::Arc;
|
||||
use tauri::Manager;
|
||||
use crate::transfer::manager::TransferManager;
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
commands::fs::list_local,
|
||||
commands::fs::list_remote,
|
||||
commands::fs::remote_mkdir,
|
||||
commands::fs::remote_rename,
|
||||
commands::fs::remote_delete,
|
||||
commands::connection::connect,
|
||||
commands::connection::disconnect,
|
||||
commands::transfer::upload,
|
||||
commands::transfer::download,
|
||||
commands::transfer::get_queue,
|
||||
commands::transfer::pause_task,
|
||||
commands::transfer::cancel_task,
|
||||
commands::sites::get_sites,
|
||||
commands::sites::save_site,
|
||||
commands::sites::delete_site,
|
||||
])
|
||||
.setup(|app| {
|
||||
let registry = Arc::new(crate::fs::remote::RemoteRegistry::default());
|
||||
let manager = TransferManager::new(registry.clone(), app.handle().clone());
|
||||
|
||||
app.manage(registry);
|
||||
app.manage(manager);
|
||||
|
||||
storage::db::init(app.handle())?;
|
||||
Ok(())
|
||||
})
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running loflum");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue