feat: Aufgaben laden und validieren
tasks/<gruppe>/<name>/ wird eingelesen. Pflichtdateien, task.toml-Werte und ausführbares check.sh werden geprüft, fehlerhafte Aufgaben mit Grund gemeldet. Setup zeigt gültige Aufgaben und Fehler. cargo test: 13 Tests grün. Klicktests aufgabe2validierung.1-.2 noch manuell offen. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
mod config;
|
||||
mod tasks;
|
||||
|
||||
use config::Paths;
|
||||
use tauri::{Manager, State};
|
||||
@ -11,6 +12,11 @@ fn get_paths(paths: State<'_, AppPaths>) -> Paths {
|
||||
paths.0.clone()
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn load_tasks(paths: State<'_, AppPaths>) -> tasks::LoadReport {
|
||||
tasks::load_all(&paths.0.tasks_dir)
|
||||
}
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
@ -28,7 +34,7 @@ pub fn run() {
|
||||
app.manage(AppPaths(paths));
|
||||
Ok(())
|
||||
})
|
||||
.invoke_handler(tauri::generate_handler![get_paths])
|
||||
.invoke_handler(tauri::generate_handler![get_paths, load_tasks])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user