diff --git a/.gitignore b/.gitignore index 4fa9d14..97aba37 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.DS_Store node_modules +dist diff --git a/dist/nvAux.html b/dist/nvAux.html deleted file mode 100644 index 0d6282b..0000000 --- a/dist/nvAux.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - nvAux - - - - -
- - - diff --git a/src/lib/OmniBar.svelte b/src/lib/OmniBar.svelte index 1f877fd..a85b390 100644 --- a/src/lib/OmniBar.svelte +++ b/src/lib/OmniBar.svelte @@ -46,6 +46,12 @@ const toggleMenu = () => { showMenu = !showMenu; }; + + const handleDeleteCollection = async () => { + const db$ = await db(); + // db$.notes.destroy(); + db$.notes.remove(); + }; @@ -70,7 +76,7 @@
  • -
  • Reset Database
  • +
  • {/if}
    @@ -131,6 +137,15 @@ color: #3e464d; } + ul li:first-child { + border-top-left-radius: 6px; + border-top-right-radius: 6px; + } + ul li:last-child { + border-bottom-left-radius: 6px; + border-bottom-right-radius: 6px; + } + li { height: 30px; display: flex; @@ -140,6 +155,10 @@ box-sizing: border-box; color: #adadad; } + li:hover { + background: #602661; + color: white; + } li.break { height: 1px; padding: 0; margin: 0; border-bottom: 1px solid rgba(255,255,255,0.05); } diff --git a/src/lib/ResizeHandle.svelte b/src/lib/ResizeHandle.svelte index dc4ab94..966031e 100644 --- a/src/lib/ResizeHandle.svelte +++ b/src/lib/ResizeHandle.svelte @@ -7,8 +7,6 @@ const startResize = () => (dragging = true); const stopResize = () => (dragging = false); - $:console.log('ddd', $noteListHeight) - const handleResize = () => { if (!dragging) return; $noteListHeight = $mousePosition.y >= 42 && $mousePosition.y - 42; diff --git a/src/lib/store.js b/src/lib/store.js index 3c31a10..764ebae 100644 --- a/src/lib/store.js +++ b/src/lib/store.js @@ -30,29 +30,32 @@ const _create = async () => { await db.addCollections({ notes: { schema } }); -// const date = new Date().getTime(); -// if (db.notes) { -// await db.notes.insert({ -// guid: uuidv4(), -// name: '🚀 Welcome to nvAux!', -// body: ` -// Welcome aboard! nvAux is your new personal command center, designed to capture your thoughts and ideas swiftly and securely. Inspired by the principles of OmniFocus and David Allen's 'Getting Things Done', nvAux is more than just a note-taking app—it's a productivity powerhouse. - -// Here's a quick rundown of what you can do with nvAux: - -// Omni-Modal Input: Type or draw your thoughts into existence. -// Offline-First: Your notes are always available, online or offline. -// Encrypted Data: Your privacy is our priority. All your notes are encrypted. -// Single HTML File: Carry nvAux in your pocket, on any device. -// Dark/Light Theme: Work in the environment you prefer. -// Dive into our User Guide to explore these features in detail, or check out our FAQs if you have any questions. Happy note-taking! - -// The nvAux Team -// `, -// createdAt: date, -// updatedAt: date -// }); -// }; + const notes = await db.notes.find().exec(); + + + if (notes.length === 0) { + const date = new Date().getTime(); + await db.notes.insert({ + guid: uuidv4(), + name: '🚀 Welcome to nvAux!', + body: ` +Welcome aboard! nvAux is your new personal command center, designed to capture your thoughts and ideas swiftly and securely. Inspired by the principles of OmniFocus and David Allen's 'Getting Things Done', nvAux is more than just a note-taking app—it's a productivity powerhouse. + +Here's a quick rundown of what you can do with nvAux: + +Omni-Modal Input: Type or draw your thoughts into existence. +Offline-First: Your notes are always available, online or offline. +Encrypted Data: Your privacy is our priority. All your notes are encrypted. +Single HTML File: Carry nvAux in your pocket, on any device. +Dark/Light Theme: Work in the environment you prefer. +Dive into our User Guide to explore these features in detail, or check out our FAQs if you have any questions. Happy note-taking! + +The nvAux Team + `, + createdAt: date, + updatedAt: date + }); + }; dbPromise = db; return db;