propagated use of config home path to other systems. file loading now works using rust instead of js
This commit is contained in:
parent
62918416ee
commit
11bd003298
11 changed files with 1007 additions and 1000 deletions
|
|
@ -6,13 +6,17 @@ use std::{
|
|||
|
||||
use sqlx::{migrate::MigrateDatabase, Sqlite, SqlitePool};
|
||||
use tauri::{ipc::RuntimeCapability, App, AssetResolver, Manager, Url};
|
||||
use crate::get_basepath;
|
||||
async fn populate_file_db(db: &SqlitePool) {}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn initialize_database(
|
||||
app_handle: tauri::AppHandle,
|
||||
basepath: String,
|
||||
pathtemplate: String,
|
||||
) {
|
||||
|
||||
if let Some(basepath) = get_basepath(app_handle.clone()) {
|
||||
let db_path = Path::new("Documents")
|
||||
.join(Path::new("Knowledgebase"))
|
||||
.join("db.sqlite");
|
||||
|
|
@ -61,7 +65,10 @@ pub async fn initialize_database(
|
|||
.execute(&db)
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn store_diff(diff: String) {}
|
||||
async fn store_diff(diff: String) {
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue