From 6ee080966147e593855cceb148d26184d6e8520d Mon Sep 17 00:00:00 2001 From: Danny Morabito Date: Fri, 29 Nov 2024 14:09:41 +0100 Subject: [PATCH] clean up code and ui - IconButton component - make FoldersListSidebar a separate component from the index page - make move letter to folder better looking - clean up code on index page --- src/components/FoldersListSidebar.svelte | 93 ++++++++++++++++++++ src/components/IconButton.svelte | 30 +++++++ src/components/MailboxFolderItems.svelte | 14 +-- src/routes/+layout.svelte | 5 +- src/routes/+page.svelte | 105 +++-------------------- static/nostr-lock.svg | 59 +++++++++++++ 6 files changed, 204 insertions(+), 102 deletions(-) create mode 100644 src/components/FoldersListSidebar.svelte create mode 100644 src/components/IconButton.svelte create mode 100644 static/nostr-lock.svg diff --git a/src/components/FoldersListSidebar.svelte b/src/components/FoldersListSidebar.svelte new file mode 100644 index 0000000..f383e2c --- /dev/null +++ b/src/components/FoldersListSidebar.svelte @@ -0,0 +1,93 @@ + + + +
+

Create Folder

+
+

Please enter a name for the new folder:

+ +
+ + +
+ + +
+
+
+ + + + \ No newline at end of file diff --git a/src/components/IconButton.svelte b/src/components/IconButton.svelte new file mode 100644 index 0000000..960e31a --- /dev/null +++ b/src/components/IconButton.svelte @@ -0,0 +1,30 @@ + + + + + \ No newline at end of file diff --git a/src/components/MailboxFolderItems.svelte b/src/components/MailboxFolderItems.svelte index 7af8a0c..70ea2c9 100644 --- a/src/components/MailboxFolderItems.svelte +++ b/src/components/MailboxFolderItems.svelte @@ -7,6 +7,7 @@ import Select from './Select.svelte'; import type { Letter } from '$lib/letter'; import { slide } from 'svelte/transition'; + import IconButton from './IconButton.svelte'; let { letters, @@ -117,7 +118,10 @@
- {letter.subject} + {#if !letter.emailAddress} + + {/if} + {letter.subject}
{#if letter.stamps}
@@ -152,7 +156,9 @@ -

Move Letters to Folder

+
+

Move Letters to Folder

+

Select a folder to move the selected letters to:

- -
- - -
- -
+ sidebarOpen = !sidebarOpen} text="Sidebar" />
- +
{#if letters.length === 0} @@ -157,41 +101,12 @@
\ No newline at end of file diff --git a/static/nostr-lock.svg b/static/nostr-lock.svg new file mode 100644 index 0000000..617132e --- /dev/null +++ b/static/nostr-lock.svg @@ -0,0 +1,59 @@ + + + + + + + + +