From cd4ecd7821098f0f3b1f392b27658db00e56faff Mon Sep 17 00:00:00 2001 From: Felvesthe <23108389+Felvesthe@users.noreply.github.com> Date: Tue, 2 Dec 2025 00:00:26 +0100 Subject: [PATCH] Change Title Case to Sentence case to match Obsidian's plugin guidelines Signed-off-by: Felvesthe <23108389+Felvesthe@users.noreply.github.com> --- src/main.ts | 16 ++++++++-------- src/settings.ts | 2 +- src/ui/statusBar.ts | 2 +- src/ui/strictUnlockModal.ts | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main.ts b/src/main.ts index e311dbf..09f0779 100644 --- a/src/main.ts +++ b/src/main.ts @@ -44,7 +44,7 @@ export default class NoteLockerPlugin extends Plugin { // hotkey this.addCommand({ id: 'toggle-note-lock', - name: 'Toggle Lock for current note', + name: 'Toggle lock for current note', checkCallback: (checking: boolean) => { const file = this.app.workspace.getActiveFile(); if (file && file.extension === 'md') { @@ -65,7 +65,7 @@ export default class NoteLockerPlugin extends Plugin { this.addCommand({ id: 'switch-to-edit-mode-intercept', - name: 'Switch to Edit Mode (Strict Lock Check)', + name: 'Switch to edit mode (strict lock check)', hotkeys: [{ modifiers: ["Mod"], key: "e" }], checkCallback: (checking: boolean) => { const file = this.app.workspace.getActiveFile(); @@ -201,7 +201,7 @@ export default class NoteLockerPlugin extends Plugin { new StrictUnlockModal( this.app, () => this.toggleBulkLock(validItems, false), - "Strictly Locked Items", + "Strictly locked items", "At least one of the selected items is strictly locked." ).open(); } else { @@ -223,7 +223,7 @@ export default class NoteLockerPlugin extends Plugin { if (allUnlocked || allLocked) { menu.addItem((item) => item - .setTitle(`Strict Lock ${validItems.length} items`) + .setTitle(`Strict lock ${validItems.length} items`) .setIcon("lock") .onClick(() => this.toggleBulkStrictLock(validItems, true)) ); @@ -310,14 +310,14 @@ export default class NoteLockerPlugin extends Plugin { if (!isStrictLocked) { menu.addItem((item) => item - .setTitle("Strict Lock") + .setTitle("Strict lock") .setIcon("lock") .onClick(() => this.toggleStrictLock(path)) ); } else { menu.addItem((item) => item - .setTitle("Strict Unlock") + .setTitle("Strict unlock") .setIcon("unlock") .onClick(() => { new StrictUnlockModal(this.app, () => { @@ -417,7 +417,7 @@ export default class NoteLockerPlugin extends Plugin { await this.saveSettings(); - new Notice(`${isStrictLocked ? '🔓 Strictly Unlocked' : '🔒 Strictly Locked'}: ${notePath}`); + new Notice(`${isStrictLocked ? '🔓 Strictly unlocked' : '🔒 Strictly locked'}: ${notePath}`); this.updateAllNoteInstances(notePath); this.statusBarUI.updateStatusBarButton(); @@ -542,7 +542,7 @@ export default class NoteLockerPlugin extends Plugin { if (!lockBtn) { lockBtn = document.createElement('div'); lockBtn.addClass('view-action', 'clickable-icon', 'note-locker-strict-btn'); - lockBtn.setAttribute('aria-label', 'Strictly Locked'); + lockBtn.setAttribute('aria-label', 'Strictly locked'); lockBtn.innerHTML = ''; lockBtn.addEventListener('click', () => { diff --git a/src/settings.ts b/src/settings.ts index 9c1c592..8d94f89 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -95,7 +95,7 @@ export class NoteLockerSettingTab extends PluginSettingTab { }); hotkeyInfo.style.fontStyle = 'italic'; - containerEl.createEl('h3', { text: 'Locked Notes & Folders Statistics' }); + containerEl.createEl('h3', { text: 'Locked notes & folders statistics' }); const lockedNotesCount = this.plugin.settings.lockedNotes.size; const lockedFoldersCount = this.plugin.settings.lockedFolders.size; const strictLockedNotesCount = this.plugin.settings.strictLockedNotes.size; diff --git a/src/ui/statusBar.ts b/src/ui/statusBar.ts index 1097ec2..422097c 100644 --- a/src/ui/statusBar.ts +++ b/src/ui/statusBar.ts @@ -58,7 +58,7 @@ export class StatusBarUI { if (isStrictLocked) { setIcon(iconSpan, 'lock'); iconSpan.setText('🔓'); - this.statusBarItemEl.createSpan({ text: ' Strictly Locked' }); + this.statusBarItemEl.createSpan({ text: ' Strictly locked' }); this.statusBarItemEl.setAttribute('aria-label', 'Strictly locked. Click to unlock.'); } else { setIcon(iconSpan, isLocked ? 'lock' : 'unlock'); diff --git a/src/ui/strictUnlockModal.ts b/src/ui/strictUnlockModal.ts index 84ff96a..b10b363 100644 --- a/src/ui/strictUnlockModal.ts +++ b/src/ui/strictUnlockModal.ts @@ -8,7 +8,7 @@ export class StrictUnlockModal extends Modal { constructor( app: App, onUnlock: () => void, - title: string = "Strictly Locked Note", + title: string = "Strictly locked note", message: string = "This note is strictly locked to prevent accidental editing.") { super(app); this.onUnlock = onUnlock;