From 64a97c249a18d9d0bbee6e68e84dadc36c6a7327 Mon Sep 17 00:00:00 2001 From: Gamosoft Date: Thu, 11 Dec 2025 18:11:25 +0100 Subject: [PATCH 1/6] shortcut to add table --- documentation/FEATURES.md | 1 + frontend/app.js | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/documentation/FEATURES.md b/documentation/FEATURES.md index 78887d6..f9959c1 100644 --- a/documentation/FEATURES.md +++ b/documentation/FEATURES.md @@ -275,6 +275,7 @@ date: {{date}} | `Ctrl+B` | `Cmd+B` | Bold | `**text**` | | `Ctrl+I` | `Cmd+I` | Italic | `*text*` | | `Ctrl+K` | `Cmd+K` | Insert link | `[text](url)` | +| `Ctrl+Alt+T` | `Cmd+Option+T` | Insert table | 3x3 table placeholder | ## 🚀 Performance diff --git a/frontend/app.js b/frontend/app.js index 92cb3a4..9ae9bc2 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -461,6 +461,12 @@ function noteApp() { e.preventDefault(); this.insertLink(); } + + // Ctrl/Cmd + Alt + T for table + if ((e.ctrlKey || e.metaKey) && e.altKey && e.key === 't') { + e.preventDefault(); + this.insertTable(); + } } }); } @@ -2548,6 +2554,39 @@ function noteApp() { this.autoSave(); }, + // Insert a markdown table placeholder + insertTable() { + const editor = document.getElementById('note-editor'); + if (!editor) return; + + const cursorPos = editor.selectionStart; + + // Basic 3x3 table placeholder + const table = `| Header 1 | Header 2 | Header 3 | +|----------|----------|----------| +| Cell 1 | Cell 2 | Cell 3 | +| Cell 4 | Cell 5 | Cell 6 | +`; + + // Add newline before if not at start of line + const textBefore = this.noteContent.substring(0, cursorPos); + const needsNewlineBefore = textBefore.length > 0 && !textBefore.endsWith('\n'); + const prefix = needsNewlineBefore ? '\n\n' : ''; + + // Insert the table + this.noteContent = textBefore + prefix + table + this.noteContent.substring(cursorPos); + + // Position cursor at first header for easy editing + this.$nextTick(() => { + const newPos = cursorPos + prefix.length + 2; // After "| " + editor.setSelectionRange(newPos, newPos + 8); // Select "Header 1" + editor.focus(); + }); + + // Trigger autosave + this.autoSave(); + }, + // Save current note async saveNote() { if (!this.currentNote) return; From 34a721ce60385ddd2c9636125498ce7c81bd4350 Mon Sep 17 00:00:00 2001 From: Gamosoft Date: Fri, 12 Dec 2025 10:38:39 +0100 Subject: [PATCH 2/6] added cropped logo --- docs/logo-cropped.svg | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 docs/logo-cropped.svg diff --git a/docs/logo-cropped.svg b/docs/logo-cropped.svg new file mode 100644 index 0000000..1f0f458 --- /dev/null +++ b/docs/logo-cropped.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From a66a7fc7bfe59096eb3c11f635917b79fea0942b Mon Sep 17 00:00:00 2001 From: Gamosoft Date: Fri, 12 Dec 2025 15:34:45 +0100 Subject: [PATCH 3/6] added 512px icon --- docs/logo-512.svg | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 docs/logo-512.svg diff --git a/docs/logo-512.svg b/docs/logo-512.svg new file mode 100644 index 0000000..d970569 --- /dev/null +++ b/docs/logo-512.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + From e0022951ce3da7c95247e730a83b4194e84373bc Mon Sep 17 00:00:00 2001 From: Gamosoft Date: Fri, 12 Dec 2025 16:32:29 +0100 Subject: [PATCH 4/6] added copy to clipboard button --- documentation/FEATURES.md | 1 + frontend/app.js | 34 ++++++++++++++++++++++++++++++++++ frontend/index.html | 14 +++++++++++++- 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/documentation/FEATURES.md b/documentation/FEATURES.md index f9959c1..a1ff48f 100644 --- a/documentation/FEATURES.md +++ b/documentation/FEATURES.md @@ -49,6 +49,7 @@ - **Browser history** - Back/forward buttons navigate between notes - **Shareable links** - Bookmark or share direct links to notes with highlighted terms - **Refresh safe** - Page reload keeps you on the same note with search context +- **Copy link button** - One-click copy of note URL to clipboard ## 🎨 Customization diff --git a/frontend/app.js b/frontend/app.js index 9ae9bc2..41ecda1 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -4014,6 +4014,40 @@ function noteApp() { } }, + // Copy current note link to clipboard + async copyNoteLink() { + if (!this.currentNote) { + alert('No note selected'); + return; + } + + // Build the full URL + const pathWithoutExtension = this.currentNote.replace('.md', ''); + const encodedPath = pathWithoutExtension.split('/').map(segment => encodeURIComponent(segment)).join('/'); + const url = `${window.location.origin}/${encodedPath}`; + + try { + await navigator.clipboard.writeText(url); + + // Brief visual feedback (change button text temporarily) + const btn = event.target.closest('button'); + const originalHTML = btn.innerHTML; + btn.innerHTML = '✓'; + setTimeout(() => { + btn.innerHTML = originalHTML; + }, 1500); + } catch (error) { + // Fallback for older browsers + const textArea = document.createElement('textarea'); + textArea.value = url; + document.body.appendChild(textArea); + textArea.select(); + document.execCommand('copy'); + document.body.removeChild(textArea); + alert('Link copied to clipboard!'); + } + }, + // Homepage folder navigation methods goToHomepageFolder(folderPath) { this.showGraph = false; // Close graph when navigating diff --git a/frontend/index.html b/frontend/index.html index 527e5ff..ba71ace 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1852,12 +1852,24 @@ + + + From 7ad159a77ea6cf0eb88a5f149585c81d6c34b864 Mon Sep 17 00:00:00 2001 From: Gamosoft Date: Fri, 12 Dec 2025 16:42:14 +0100 Subject: [PATCH 5/6] smaller buttons --- frontend/app.js | 21 +++++++---------- frontend/index.html | 55 ++++++++++++++++++++++++++++----------------- 2 files changed, 43 insertions(+), 33 deletions(-) diff --git a/frontend/app.js b/frontend/app.js index 41ecda1..3b7a0a4 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -55,6 +55,7 @@ function noteApp() { totalMatches: 0, // Total number of matches in the note isSaving: false, lastSaved: false, + linkCopied: false, saveTimeout: null, // Theme state @@ -4016,10 +4017,7 @@ function noteApp() { // Copy current note link to clipboard async copyNoteLink() { - if (!this.currentNote) { - alert('No note selected'); - return; - } + if (!this.currentNote) return; // Build the full URL const pathWithoutExtension = this.currentNote.replace('.md', ''); @@ -4028,14 +4026,6 @@ function noteApp() { try { await navigator.clipboard.writeText(url); - - // Brief visual feedback (change button text temporarily) - const btn = event.target.closest('button'); - const originalHTML = btn.innerHTML; - btn.innerHTML = '✓'; - setTimeout(() => { - btn.innerHTML = originalHTML; - }, 1500); } catch (error) { // Fallback for older browsers const textArea = document.createElement('textarea'); @@ -4044,8 +4034,13 @@ function noteApp() { textArea.select(); document.execCommand('copy'); document.body.removeChild(textArea); - alert('Link copied to clipboard!'); } + + // Show brief "Copied!" feedback + this.linkCopied = true; + setTimeout(() => { + this.linkCopied = false; + }, 1500); }, // Homepage folder navigation methods diff --git a/frontend/index.html b/frontend/index.html index ba71ace..b39387b 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1848,28 +1848,43 @@ - - - - - + +
+ + From 6bb87d21d7233b9b6a08931fb8b43077f61a3ac5 Mon Sep 17 00:00:00 2001 From: Gamosoft Date: Fri, 12 Dec 2025 16:44:11 +0100 Subject: [PATCH 6/6] added hover on view toolbar buttons --- frontend/index.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/index.html b/frontend/index.html index b39387b..663b764 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1829,6 +1829,8 @@ @click="viewMode = 'edit'" class="px-2 md:px-3 py-1 text-xs md:text-sm rounded transition" :style="viewMode === 'edit' ? 'background-color: var(--accent-primary); color: white;' : 'color: var(--text-secondary);'" + @mouseenter="if (viewMode !== 'edit') $el.style.backgroundColor = 'var(--bg-secondary)'" + @mouseleave="if (viewMode !== 'edit') $el.style.backgroundColor = 'transparent'" > Edit @@ -1836,6 +1838,8 @@ @click="viewMode = 'split'" class="mobile-hide-split px-2 md:px-3 py-1 text-xs md:text-sm rounded transition" :style="viewMode === 'split' ? 'background-color: var(--accent-primary); color: white;' : 'color: var(--text-secondary);'" + @mouseenter="if (viewMode !== 'split') $el.style.backgroundColor = 'var(--bg-secondary)'" + @mouseleave="if (viewMode !== 'split') $el.style.backgroundColor = 'transparent'" > Split @@ -1843,6 +1847,8 @@ @click="viewMode = 'preview'" class="px-2 md:px-3 py-1 text-xs md:text-sm rounded transition" :style="viewMode === 'preview' ? 'background-color: var(--accent-primary); color: white;' : 'color: var(--text-secondary);'" + @mouseenter="if (viewMode !== 'preview') $el.style.backgroundColor = 'var(--bg-secondary)'" + @mouseleave="if (viewMode !== 'preview') $el.style.backgroundColor = 'transparent'" > Preview