propagated use of config home path to other systems. file loading now works using rust instead of js

This commit is contained in:
Iaphetes 2025-03-09 09:03:40 +01:00
parent 62918416ee
commit 11bd003298
11 changed files with 1007 additions and 1000 deletions

View file

@ -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) {
}