Exclude "Lock" option in context menu for folders

Signed-off-by: Felvesthe <23108389+Felvesthe@users.noreply.github.com>
This commit is contained in:
Felvesthe 2025-05-09 15:27:55 +02:00
parent 38c5a0e500
commit fe4652abc1

View file

@ -102,6 +102,9 @@ export default class NoteLockerPlugin extends Plugin {
}
private addLockMenuItem(menu: Menu, filePath: string) {
const isNote = filePath.endsWith('.md');
if (!isNote) return;
const isLocked = this.settings.lockedNotes.has(filePath);
menu.addItem((item) =>
item