feat: gestion desktop des vaults & dossiers — retrait par menu contextuel et ajout en configuration #159
CI / lint (push) Successful in 3m2s
CI / security (push) Successful in 2m2s
CI / test (push) Successful in 4m42s
CI / build (push) Successful in 1m52s
CI / e2e (push) Successful in 15m54s

This commit is contained in:
2026-10-02 21:04:17 -04:00
parent bab272bb5c
commit d2734dc8ce
22 changed files with 331 additions and 18 deletions
+10
View File
@@ -8,6 +8,7 @@ import { GraphViewManager } from './graph.js';
import { DashboardConflictsWidget } from './dashboard.js';
import { t, tr } from './i18n.js';
import { toggleThemeMode } from './themes.js';
import { isTauriEnv, removeRoot } from './desktop.js';
// ---------------------------------------------------------------------------
// Right Sidebar Manager
// ---------------------------------------------------------------------------
@@ -1806,6 +1807,15 @@ export const ContextMenuManager = {
this._addItem('file-plus', 'Nouveau fichier', () => this._createFile(), isReadonly);
this._addSeparator();
this._addItem('brain', '🧠 BooksLM', () => { import('./bookslm.js').then(m => m.default.open(this._targetVault, '')); }, false);
// #159 — retrait d'un vault ou dossier racine : desktop uniquement,
// déregistration seule (aucun fichier supprimé), confirmation exigée.
if (isTauriEnv()) {
this._addSeparator();
this._addItem('folder-minus', t('desktop.remove_root'), () => {
const name = this._targetVault;
if (name) removeRoot(name, t('desktop.remove_root_confirm', { name: name }));
}, false);
}
} else if (type === 'directory') {
this._addItem('folder-plus', 'Nouveau sous-dossier', () => this._createDirectory(), isReadonly);
this._addItem('file-plus', 'Nouveau fichier ici', () => this._createFile(), isReadonly);