diff --git a/.env b/.env index eb763200..68b5faff 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ VITE_THEME_DARK=transparent:transparent,black:#0f0f0e,white:#FFFFFF,accent:#EB5E28,accent-light:#FB652C,gray-1:#FFFFFF,gray-2:#FAF6F1,gray-3:#F2EBE1,gray-4:#E9E0D3,gray-5:#B3AA98,gray-6:#565249,gray-7:#393530,gray-8:#252422,danger:#ff0000,warning:#ebd112,success:#37ab51,input:#FAF6F1,input-hover:#F2EBE1 -VITE_THEME_LIGHT=transparent:transparent,black:#0f0f0e,white:#FFFFFF,accent:#EB5E28,accent-light:#FB652C,gray-8:#FFFFFF,gray-7:#FAF6F1,gray-6:#F2EBE1,gray-5:#E9E0D3,gray-4:#B3AA98,gray-3:#565249,gray-2:#393530,gray-1:#252422,danger:#ff0000,warning:#ebd112,success:#37ab51,input:#FAF6F1,input-hover:#F2EBE1 +VITE_THEME_LIGHT=transparent:transparent,black:#0f0f0e,white:#FFFFFF,accent:#EB5E28,accent-light:#FB652C,gray-8:#FFFFFF,gray-7:#FAF6F1,gray-6:#F2EBE1,gray-5:#B3AA98,gray-4:#B3AA98,gray-3:#565249,gray-2:#393530,gray-1:#252422,danger:#ff0000,warning:#ebd112,success:#37ab51,input:#FAF6F1,input-hover:#F2EBE1 VITE_DUFFLEPUD_URL=https://dufflepud.onrender.com diff --git a/ROADMAP.md b/ROADMAP.md index 0a32cc9e..2bf20232 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -1,10 +1,11 @@ # Current -- [ ] Claim relays bounty - [ ] Add real search, it's a big hurdle for first-timers/anons - [ ] Remember message/chat status +- [ ] Fix note nesting - [ ] Image classification - https://github.com/bhky/opennsfw2 +- [ ] Claim relays bounty # Core @@ -71,6 +72,7 @@ - [ ] Share button for notes, shows qr code and nevent - [ ] open web+nostr links like snort - [ ] Pinned posts ala snort +- [ ] Scroll to top button that appears after scrolling a bit - [ ] Likes list on note detail. Maybe a sidebar or header for note detail page? - [ ] Add keyword mutes - [ ] Show options on note detail for retrieving replies diff --git a/src/app/shared/Note.svelte b/src/app/shared/Note.svelte index 5e489aaf..2d6c6185 100644 --- a/src/app/shared/Note.svelte +++ b/src/app/shared/Note.svelte @@ -2,6 +2,7 @@ import {nip19} from "nostr-tools" import {find, last} from "ramda" import {onMount} from "svelte" + import {get} from "svelte/store" import {quantify} from "hurdak/lib/hurdak" import {findRootId, findReplyId, displayPerson} from "src/util/nostr" import {formatTimestamp} from "src/util/misc" @@ -55,24 +56,34 @@ return showContext ? true : !r.isContext }) + // If we're already in a note detail modal, don't infinitely nest. But if we're in + // some other modal, make it possible to go back. + const goToNote = data => { + if (modal.getCurrent()?.type === "note/detail") { + modal.replace({type: "note/detail", ...data}) + } else { + modal.push({type: "note/detail", ...data}) + } + } + const onClick = e => { const target = e.target as HTMLElement if (interactive && !["I"].includes(target.tagName) && !target.closest("a")) { - modal.push({type: "note/detail", note}) + goToNote({note}) } } const goToParent = async () => { const relays = getRelaysForEventParent(note) - modal.push({type: "note/detail", note: {id: findReplyId(note)}, relays}) + goToNote({note: {id: findReplyId(note)}, relays}) } const goToRoot = async () => { const relays = getRelaysForEventParent(note) - modal.push({type: "note/detail", note: {id: findRootId(note)}, relays}) + goToNote({note: {id: findRootId(note)}, relays}) } const setBorderHeight = () => { diff --git a/src/app/shared/NoteActions.svelte b/src/app/shared/NoteActions.svelte index 34561d16..b3f03468 100644 --- a/src/app/shared/NoteActions.svelte +++ b/src/app/shared/NoteActions.svelte @@ -176,19 +176,19 @@ } -