feat(connection): add reusable tunnel profiles
This commit is contained in:
1 parent
4dcee1aca0
commit
977e7f78ca
34 files changed
+1335
-22
No files matched your search
@@ -43,6 +43,7 @@ pub mod table_export;
|
||||
pub mod table_import;
|
||||
pub mod text_export;
|
||||
pub mod transfer;
|
||||
pub mod tunnel_profiles;
|
||||
pub mod update;
|
||||
pub mod xlsx_export;
|
||||
pub mod zookeeper_cmd;
|
||||
@@ -0,0 +1,19 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use dbx_core::models::connection::TransportLayerConfig;
|
||||
use tauri::State;
|
||||
|
||||
use super::connection::AppState;
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn load_tunnel_profiles(state: State<'_, Arc<AppState>>) -> Result<Vec<TransportLayerConfig>, String> {
|
||||
state.storage.load_tunnel_profiles().await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn save_tunnel_profiles(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
profiles: Vec<TransportLayerConfig>,
|
||||
) -> Result<(), String> {
|
||||
state.storage.save_tunnel_profiles(&profiles).await
|
||||
}
|
||||
Reference in new issue
Block a user