removed middleman functions

This commit is contained in:
Gamosoft 2025-11-17 14:24:40 +01:00
parent d663995454
commit fcb1aec337
2 changed files with 2 additions and 21 deletions

View File

@ -173,7 +173,7 @@ function noteApp() {
// Ctrl/Cmd + Alt + N for new note
if ((e.ctrlKey || e.metaKey) && e.altKey && e.key === 'n') {
e.preventDefault();
this.createNewNote();
this.createNote();
}
// Ctrl/Cmd + Z for undo
@ -1280,20 +1280,6 @@ function noteApp() {
}
},
// =====================================================
// LEGACY WRAPPER FUNCTIONS (for backward compatibility)
// =====================================================
// Create a new note (calls unified function)
async createNewNote() {
await this.createNote('');
},
// Create a new folder (calls unified function)
async createNewFolder(parentPath = '') {
await this.createFolder(parentPath);
},
// Rename a folder
async renameFolder(folderPath, currentName) {
const newName = prompt(`Rename folder "${currentName}" to:`, currentName);
@ -1379,11 +1365,6 @@ function noteApp() {
}
},
// Create note in specific folder (calls unified function)
async createNoteInFolder(folderPath) {
await this.createNote(folderPath);
},
// Auto-save with debounce
autoSave() {
if (this.saveTimeout) {

View File

@ -972,7 +972,7 @@
<h2 class="text-2xl font-bold mb-2" style="color: var(--text-primary);" x-text="appName"></h2>
<p class="mb-6" style="color: var(--text-secondary);" x-text="appTagline"></p>
<button
@click="createNewNote()"
@click="createNote()"
class="px-6 py-3 text-sm font-medium text-white rounded-lg"
style="background-color: var(--accent-primary);"
onmouseover="this.style.backgroundColor='var(--accent-hover)'"