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:
2026-11-06 19:06:06 +01:00
parent 3bd5197867
commit e16788a3cb
4 changed files with 346 additions and 3 deletions

View File

@ -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");
}