feat: sidebar de navigation mode dossier + permission set-title
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
mod core;
|
||||
mod watcher;
|
||||
|
||||
use std::sync::Mutex;
|
||||
|
||||
#[tauri::command]
|
||||
fn render_markdown(content: String) -> String {
|
||||
core::render_markdown(content)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn convert_file(path: String) -> Result<String, String> {
|
||||
core::convert_file(path)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn list_md_files(dir: String) -> Result<Vec<String>, String> {
|
||||
core::list_md_files(dir)
|
||||
}
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_fs::init())
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.manage(watcher::WatcherState(Mutex::new(None)))
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
render_markdown,
|
||||
convert_file,
|
||||
list_md_files,
|
||||
watcher::start_watch,
|
||||
watcher::stop_watch,
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("Erreur lors du démarrage de l'application Tauri");
|
||||
}
|
||||
Reference in New Issue
Block a user