feat: gestion desktop des vaults & dossiers — retrait par menu contextuel et ajout en configuration #159
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user