Vault picker: remove a vault from the Recent list (#93); fix Tasks view showing "All Notes" as the mobile header title

This commit is contained in:
Yuri Karamian
2026-06-11 20:48:20 +02:00
parent 784248f984
commit 2fea44bde6
5 changed files with 81 additions and 6 deletions
+11
View File
@@ -51,6 +51,17 @@ pub fn open_vault(app: AppHandle, state: State<'_, AppState>, path: String) -> R
Ok(())
}
#[tauri::command]
pub fn remove_vault(state: State<'_, AppState>, path: String) -> Result<(), String> {
let mut config = state.config.lock().map_err(|e| e.to_string())?;
config.vaults.retain(|v| v.path != path);
if config.active_vault.as_deref() == Some(path.as_str()) {
config.active_vault = None;
}
save_app_config(&config)?;
Ok(())
}
#[tauri::command]
pub fn get_app_config(state: State<'_, AppState>) -> Result<AppConfig, String> {
let config = state.config.lock().map_err(|e| e.to_string())?;
+1
View File
@@ -98,6 +98,7 @@ pub fn run() {
.manage(app_state)
.invoke_handler(tauri::generate_handler![
commands::open_vault,
commands::remove_vault,
commands::get_app_config,
commands::set_theme,
commands::set_accent_color,