From fe4652abc15300a42c488955698aed1864478fe4 Mon Sep 17 00:00:00 2001 From: Felvesthe <23108389+Felvesthe@users.noreply.github.com> Date: Fri, 9 May 2025 15:27:55 +0200 Subject: [PATCH] Exclude "Lock" option in context menu for folders Signed-off-by: Felvesthe <23108389+Felvesthe@users.noreply.github.com> --- src/main.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.ts b/src/main.ts index 4e2dd17..767d2c7 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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