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 @@
-
-
-
-
- {#if !isEmptyObject($selectedNote)}
+
+ {#if isEmptyObject($selectedNote)}
+
+
No Note Selected
+
+ {:else}
- {:else}
-
-
No Note Selected
-
{/if}
@@ -49,14 +47,13 @@
color: #808080;
}
textarea {
- padding: 6px;
- background: #1a1a1a;
+ padding: 0 1rem;
+ background: #131313;
color: rgba(255, 255, 255, 0.831);
- font-size: 16px;
+ font-size: 14px;
+ font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif;
+ line-height: 1.3;
border-radius: none;
height: 100%;
}
- .placeholder {
- top: -20%;
- }
diff --git a/src/lib/NoteList.svelte b/src/lib/NoteList.svelte
index f6007e1..4c553c4 100644
--- a/src/lib/NoteList.svelte
+++ b/src/lib/NoteList.svelte
@@ -112,16 +112,18 @@
width: 100%;
overflow-y: auto;
overflow-x: hidden;
- list-style-type: none;
- border-bottom: none;
+ background-color: #181a1c;
}
li {
- padding: 4px 8px;
display: flex;
+ align-items: center;
font-size: 14px;
+ height: 35px;
+ padding: 10px;
justify-content: space-between;
font-family: Helvetica, sans-serif;
user-select: none;
+ box-sizing: border-box;
color: rgb(205, 205, 205);
}
li:nth-child(odd) {
diff --git a/src/lib/ResizeHandle.svelte b/src/lib/ResizeHandle.svelte
index fa50714..dc4ab94 100644
--- a/src/lib/ResizeHandle.svelte
+++ b/src/lib/ResizeHandle.svelte
@@ -7,9 +7,11 @@
const startResize = () => (dragging = true);
const stopResize = () => (dragging = false);
+ $:console.log('ddd', $noteListHeight)
+
const handleResize = () => {
if (!dragging) return;
- noteListHeight.set($mousePosition.y >= 55 && $mousePosition.y - 55);
+ $noteListHeight = $mousePosition.y >= 42 && $mousePosition.y - 42;
// TODO now check for page size and never allow the resize bar to go past the floor!
return;
};
@@ -25,15 +27,7 @@
-
-
diff --git a/src/lib/store.js b/src/lib/store.js
index 9f4150e..3c31a10 100644
--- a/src/lib/store.js
+++ b/src/lib/store.js
@@ -1,4 +1,5 @@
import { writable } from 'svelte/store';
+import { v4 as uuidv4 } from 'uuid';
import { addRxPlugin, createRxDatabase } from 'rxdb';
import { getRxStorageDexie } from 'rxdb/plugins/storage-dexie';
@@ -24,9 +25,35 @@ const _create = async () => {
const db = await createRxDatabase({
name: 'nvauxdb',
storage: getRxStorageDexie(),
- ignoreDuplicate: true
+ // ignoreDuplicate: true
});
+
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
+// });
+// };
+
dbPromise = db;
return db;
};
diff --git a/src/lib/style.css b/src/lib/style.css
index af3d91b..42203e4 100644
--- a/src/lib/style.css
+++ b/src/lib/style.css
@@ -12,7 +12,7 @@ a { color: inherit; text-decoration: inherit; }
button, input, optgroup, select, textarea { padding: 0; line-height: inherit; color: inherit; }
pre, code, kbd, samp { font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
-html, body { background-color: #262728; margin: 0; padding: 0; font-family: Verdana, Geneva, Tahoma, sans-serif; font-size: 0.9rem; height: 100%; width: 100%; overflow: hidden;}
+html, body { background-color: #151618; margin: 0; padding: 0; font-family: Verdana, Geneva, Tahoma, sans-serif; font-size: 0.9rem; height: 100%; width: 100%; overflow: hidden;}
.w-screen { width: 100vw; }
.h-screen { height: 100vh; }
.flex { display: flex; }
@@ -54,3 +54,5 @@ html, body { background-color: #262728; margin: 0; padding: 0; font-family: Verd
.bg-transparent { background-color: transparent; }
.overflow-hidden { overflow: hidden; }
.elipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 10px; }
+.row-resize { cursor: row-resize; }
+.h-\[10px\] { height: 10px; }
diff --git a/src/utils/isEmptyObject.js b/src/utils/isEmptyObject.js
index 9e07d0a..72bb880 100644
--- a/src/utils/isEmptyObject.js
+++ b/src/utils/isEmptyObject.js
@@ -1 +1,10 @@
-export const isEmptyObject = (obj) => obj && Object.keys(obj).length === 0 && obj.constructor === Object;
+// export const isEmptyObject = (/** @type {{ constructor?: any; }} */ obj) => obj && Object.keys(obj).length === 0 && obj.constructor === Object;
+
+export const isEmptyObject = (obj) => {
+ for (const prop in obj) {
+ if (Object.hasOwn(obj, prop)) {
+ return false;
+ }
+ }
+ return true;
+}