removed middleman functions
This commit is contained in:
parent
d663995454
commit
fcb1aec337
|
|
@ -173,7 +173,7 @@ function noteApp() {
|
||||||
// Ctrl/Cmd + Alt + N for new note
|
// Ctrl/Cmd + Alt + N for new note
|
||||||
if ((e.ctrlKey || e.metaKey) && e.altKey && e.key === 'n') {
|
if ((e.ctrlKey || e.metaKey) && e.altKey && e.key === 'n') {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.createNewNote();
|
this.createNote();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ctrl/Cmd + Z for undo
|
// 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
|
// Rename a folder
|
||||||
async renameFolder(folderPath, currentName) {
|
async renameFolder(folderPath, currentName) {
|
||||||
const newName = prompt(`Rename folder "${currentName}" to:`, 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
|
// Auto-save with debounce
|
||||||
autoSave() {
|
autoSave() {
|
||||||
if (this.saveTimeout) {
|
if (this.saveTimeout) {
|
||||||
|
|
|
||||||
|
|
@ -972,7 +972,7 @@
|
||||||
<h2 class="text-2xl font-bold mb-2" style="color: var(--text-primary);" x-text="appName"></h2>
|
<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>
|
<p class="mb-6" style="color: var(--text-secondary);" x-text="appTagline"></p>
|
||||||
<button
|
<button
|
||||||
@click="createNewNote()"
|
@click="createNote()"
|
||||||
class="px-6 py-3 text-sm font-medium text-white rounded-lg"
|
class="px-6 py-3 text-sm font-medium text-white rounded-lg"
|
||||||
style="background-color: var(--accent-primary);"
|
style="background-color: var(--accent-primary);"
|
||||||
onmouseover="this.style.backgroundColor='var(--accent-hover)'"
|
onmouseover="this.style.backgroundColor='var(--accent-hover)'"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue