From e97b059137383f1c373811c1a6ca72b5f8e769a9 Mon Sep 17 00:00:00 2001 From: Benjamin Keating Date: Mon, 17 Jul 2023 16:53:26 -0500 Subject: [PATCH] save point --- .gitignore | 1 - dist/index.html | 68 ----------------------------------- src/lib/ImportNotesZip.svelte | 5 --- src/lib/NoteDetail.svelte | 27 +++++++------- src/lib/NoteList.svelte | 8 +++-- src/lib/ResizeHandle.svelte | 14 +++----- src/lib/store.js | 29 ++++++++++++++- src/lib/style.css | 4 ++- src/utils/isEmptyObject.js | 11 +++++- 9 files changed, 62 insertions(+), 105 deletions(-) delete mode 100644 dist/index.html diff --git a/.gitignore b/.gitignore index 97aba37..4fa9d14 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ *.DS_Store node_modules -dist diff --git a/dist/index.html b/dist/index.html deleted file mode 100644 index 942db3b..0000000 --- a/dist/index.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - nvAux - - - - -
- - - diff --git a/src/lib/ImportNotesZip.svelte b/src/lib/ImportNotesZip.svelte index 209a441..7049907 100644 --- a/src/lib/ImportNotesZip.svelte +++ b/src/lib/ImportNotesZip.svelte @@ -14,14 +14,9 @@ .then((zip) => { zip.forEach(async (relativePath, file) => { if (relativePath.startsWith('__MACOSX')) { return }; - - console.log('file @@@@@@@@@@@@@ ', file); - const date = file.date.getTime(); - file.async('string') .then(async (body) => { - console.log('body @@@@@@@@@@@@@ ', body); await db$.notes.insert({ guid: uuidv4(), name: file.name.split('/').pop().replace(/\.[^/.]+$/, ''), diff --git a/src/lib/NoteDetail.svelte b/src/lib/NoteDetail.svelte index 5bb4d15..dfa345a 100644 --- a/src/lib/NoteDetail.svelte +++ b/src/lib/NoteDetail.svelte @@ -3,7 +3,7 @@ import { onMount } from 'svelte'; import { RxDBUpdatePlugin } from 'rxdb/plugins/update'; - import { selectedNote, bodyText, noteListHeight } from './store'; + import { selectedNote, bodyText } from './store'; import { debounce } from '../utils/debounce'; import { isEmptyObject } from '../utils/isEmptyObject'; @@ -22,24 +22,22 @@ }, }); }; - - $: noteEditorHeightOffset = 80 + $noteListHeight; -
- {#if !isEmptyObject($selectedNote)} +
+ {#if isEmptyObject($selectedNote)} +
+

No Note Selected

+
+ {:else}