mirror of
https://gitlab.com/ArkHost/HelixNotes.git
synced 2026-07-24 07:45:57 +02:00
v1.2.8 - fix url links, tab indent, todo state, graph rework, collapsible sections, nav history, page breaks, folder/tag display
This commit is contained in:
@@ -38,10 +38,11 @@
|
||||
import { openNoteWindow } from '$lib/utils/window';
|
||||
import type { NoteEntry, TrashNotebookEntry, SortMode } from '$lib/types';
|
||||
|
||||
let { onNoteSelected = (_path: string, _content: string) => {}, onNoteMoved = () => {}, onBeforeNoteSwitch = () => {} }: {
|
||||
let { onNoteSelected = (_path: string, _content: string) => {}, onNoteMoved = () => {}, onBeforeNoteSwitch = () => {}, onNoteCreated = () => {} }: {
|
||||
onNoteSelected?: (path: string, content: string) => void;
|
||||
onNoteMoved?: () => void;
|
||||
onBeforeNoteSwitch?: () => void;
|
||||
onNoteCreated?: () => void;
|
||||
} = $props();
|
||||
|
||||
const modKey = navigator.platform.startsWith('Mac') ? '⌘' : 'Ctrl';
|
||||
@@ -230,6 +231,15 @@
|
||||
if (listContainer) listContainer.scrollTop = 0;
|
||||
});
|
||||
|
||||
// Invalidate quickaccess cache when starred notes change (e.g. from Editor star toggle)
|
||||
$effect(() => {
|
||||
$quickAccessPaths;
|
||||
noteCache.delete('quickaccess');
|
||||
if ($viewMode === 'quickaccess') {
|
||||
refresh();
|
||||
}
|
||||
});
|
||||
|
||||
// Track container height via ResizeObserver
|
||||
$effect(() => {
|
||||
if (!listContainer) return;
|
||||
@@ -369,6 +379,7 @@
|
||||
noteCache.clear();
|
||||
await refresh();
|
||||
await selectNote(entry);
|
||||
onNoteCreated();
|
||||
} catch (e) {
|
||||
console.error('Failed to create note:', e);
|
||||
}
|
||||
@@ -1412,6 +1423,19 @@
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.list-content::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
|
||||
.list-content::-webkit-scrollbar-thumb {
|
||||
background: var(--text-tertiary);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.list-content::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--text-secondary);
|
||||
}
|
||||
|
||||
.note-item {
|
||||
display: block;
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user