Modul-System (Registry Backend+Frontend, generierte Tabs, Settings-Sektion); ToDo-Modul: persistente Liste mit Anlegen/Bearbeiten im Panel (todos_add/todos_update, Formular mit Abbrechen); alte Hook-Todoliste (OFFENE-PUNKTE.md) komplett entfernt
This commit is contained in:
+28
-13
@@ -21,7 +21,6 @@ use crate::domain::project::{
|
||||
DeletePreview, Project, TerminalConfig,
|
||||
};
|
||||
use crate::domain::settings;
|
||||
use crate::domain::todo::{set_todo_in, todo_state_in};
|
||||
use crate::domain::usage::{usage_stats_in, UsageRow};
|
||||
use crate::platform::KeychainStore;
|
||||
use crate::terminal;
|
||||
@@ -41,7 +40,6 @@ pub(crate) fn create_project_full(
|
||||
work_dir: Option<String>,
|
||||
create_work_dir: bool,
|
||||
terminal: TerminalConfig,
|
||||
todo: bool,
|
||||
) -> Result<String, String> {
|
||||
create_project_full_in(
|
||||
&Paths::real(),
|
||||
@@ -51,7 +49,6 @@ pub(crate) fn create_project_full(
|
||||
work_dir.as_deref(),
|
||||
create_work_dir,
|
||||
terminal,
|
||||
todo,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -111,16 +108,6 @@ pub(crate) fn project_work_dirs(project: String) -> Result<Vec<String>, String>
|
||||
project_work_dirs_in(&Paths::real(), &project)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub(crate) fn todo_state(project: String) -> Result<bool, String> {
|
||||
todo_state_in(&Paths::real(), &project)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub(crate) fn set_todo(project: String, enabled: bool) -> Result<(), String> {
|
||||
set_todo_in(&Paths::real(), &project, enabled)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub(crate) fn set_terminal_config(
|
||||
project: String,
|
||||
@@ -384,6 +371,34 @@ pub(crate) fn panel_archive_dir_cmd(project: String) -> Option<String> {
|
||||
project_archive_home(&project).map(|p| p.display().to_string())
|
||||
}
|
||||
|
||||
/// Modul-Registry für den Settings-Dialog (Checkbox-Gruppe „Module").
|
||||
#[tauri::command]
|
||||
pub(crate) fn module_registry(project: String) -> Result<Vec<crate::domain::modules::ModuleInfo>, String> {
|
||||
crate::domain::modules::module_infos_in(&Paths::real(), &project)
|
||||
}
|
||||
|
||||
/// Schaltet ein Modul im Projekt an/ab (Settings-Dialog, schreibt sofort).
|
||||
#[tauri::command]
|
||||
pub(crate) fn set_module(project: String, module: String, enabled: bool) -> Result<(), String> {
|
||||
crate::domain::modules::set_module_in(&Paths::real(), &project, &module, enabled)
|
||||
}
|
||||
|
||||
/// Aktive Module fürs Frontend: Registry-Enablement der Projekt-Config plus
|
||||
/// `requires_archive` — ohne konfiguriertes Archiv-Home fallen Archiv-Module
|
||||
/// weg, ihre Tabs erscheinen nicht.
|
||||
#[tauri::command]
|
||||
pub(crate) fn enabled_modules(project: String) -> Result<Vec<String>, String> {
|
||||
let paths = Paths::real();
|
||||
let has_archive = read_project_config_in(&paths, &project)?.archive_home.is_some();
|
||||
Ok(
|
||||
crate::domain::modules::active_in(&paths, &project)?
|
||||
.iter()
|
||||
.filter(|m| !m.requires_archive || has_archive)
|
||||
.map(|m| m.id.to_string())
|
||||
.collect(),
|
||||
)
|
||||
}
|
||||
|
||||
/// Setzt das Archiv-Home eines Projekts (Einstellungsdialog) — inklusive
|
||||
/// Permissions-Eintrag in der Projekt-settings.json.
|
||||
#[tauri::command]
|
||||
|
||||
Reference in New Issue
Block a user