diff --git a/ROADMAP.md b/ROADMAP.md index fd32e558..04a667ba 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -4,6 +4,8 @@ - Split out Note pieces - Move global modals to child components? - Combine app/agent, rename app2 +- [ ] Improve topic suggestions and rendering +- [ ] Add topic search - [ ] Relays bounty - [ ] Ability to create custom feeds - [ ] Add global/following/network tabs to relay detail diff --git a/src/agent/db.ts b/src/agent/db.ts index d1f16dbc..87bc413d 100644 --- a/src/agent/db.ts +++ b/src/agent/db.ts @@ -5,7 +5,6 @@ import {partition, sortBy, prop, always, pluck, without, is} from "ramda" import {throttle} from "throttle-debounce" import {writable} from "svelte/store" import {ensurePlural, noop, createMap} from "hurdak/lib/hurdak" -import {log} from "src/util/logger" import {Tags} from "src/util/nostr" import user from "src/agent/user" @@ -185,13 +184,7 @@ export const watch = (names, f) => { return store } -export const dropAll = async () => { - for (const table of Object.values(registry)) { - await table.drop() - - log(`Successfully dropped table ${table.name}`) - } -} +export const dropAll = () => new Promise(resolve => loki.deleteDatabase(resolve)) // ---------------------------------------------------------------------------- // Domain-specific collections diff --git a/src/app2/shared/Note.svelte b/src/app2/shared/Note.svelte index a163a381..0e2c7b89 100644 --- a/src/app2/shared/Note.svelte +++ b/src/app2/shared/Note.svelte @@ -1,47 +1,23 @@ -{#if $person} -
- - {#if !showParent} -
- {/if} -
- - - -
-
-
- -
- - {displayPerson($person)} - {#if $person.verified_as} - - {/if} - -
-
- -
-
- - {timestamp} - -
-
-
- {#if findReplyId(note) && showParent} - - - View Parent - - {/if} - {#if findRootId(note) && findRootId(note) !== findReplyId(note) && showParent} - - - View Thread - - {/if} -
- {#if muted} -

- You have muted this note. -

- {:else} - - {/if} -
-
- - - -
-
- {#if pool.forceUrls.length === 0} - -
- {#each sortBy(identity, note.seen_on) as url, i} -
-
setFeedRelay?.({url})} /> -
- {/each} -
- -
- {#each sortBy(identity, note.seen_on) as url, i} - -
-
setFeedRelay?.({url})} /> -
-
{displayRelay({url})}
- - {/each} -
- {/if} -
- -
-
-
-
-
- -
- - - - {#if !reply?.isActive() && visibleNotes.length > 0 && !showEntire && depth > 0 && !muted} -
-
{ - collapsed = !collapsed - }}> - +
+ + {#if !showParent} +
+ {/if} +
+ + + +
+
+
+
- {#if collapsed} - - {:else} - - {/if} -
-
- {collapsed ? "Show replies" : "Hide replies"} -
-
-
-
- {/if} - - {#if !collapsed && visibleNotes.length > 0 && depth > 0 && !muted} -
-
-
- {#if !showEntire && note.replies.length > visibleNotes.length} - - {/if} - {#each visibleNotes as r (r.id)} - - {/each} -
-
- {/if} - - {#if showDetails} - { - showDetails = false - }}> - - {#if zaps.length > 0} -

Zapped By

-
- {#each zaps as zap} -
- - {formatSats(zap.invoiceAmount / 1000)} sats -
- {/each} -
- {/if} - {#if likes.length > 0} -

Liked By

-
- {#each likes as like} - - {/each} -
- {/if} -

Relays

-

This note was found on {quantify(note.seen_on.length, "relay")} below.

-
- {#each note.seen_on as url} - - {/each} -
-

Details

- - - -
-
- {/if} - - {#if zap} - - -
-

Send a zap

-

to {displayPerson($person)}

-
- {#if zap.confirmed} -
- -

Success! Zap confirmed.

-
- {:else if zap.invoice} - -

- Copy or scan using a lightning wallet to pay your zap. -

-
- - Waiting for confirmation... -
- {:else} -