refactor: move logic away from tauri commands
This commit is contained in:
@ -1,19 +1,19 @@
|
||||
mod cfg;
|
||||
mod types;
|
||||
mod model;
|
||||
mod cmd;
|
||||
mod pkg_remote;
|
||||
mod pkg_local;
|
||||
mod util;
|
||||
mod profile;
|
||||
|
||||
use tokio::{fs, try_join};
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
use types::{local, Package};
|
||||
|
||||
use model::Package;
|
||||
use tauri::Manager;
|
||||
use profile::Profile;
|
||||
|
||||
struct AppData {
|
||||
profile: Option<local::Profile>,
|
||||
profile: Option<Profile>,
|
||||
mods_local: Vec<Package>,
|
||||
mods_store: Vec<Package>,
|
||||
}
|
||||
@ -35,7 +35,7 @@ pub async fn run(args: Vec<String>) {
|
||||
|
||||
let app_data = AppData {
|
||||
profile: pkg_local::load_config(),
|
||||
mods_local: pkg_local::walk_packages(true).await,
|
||||
mods_local: pkg_local::walk_packages(true).await.expect("Unable to scan local packages"),
|
||||
mods_store: [].to_vec(),
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user