diff --git a/.env b/.env index 4ab145fc..eb763200 100644 --- a/.env +++ b/.env @@ -1,4 +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_DUFFLEPUD_URL=https://dufflepud.onrender.com -VITE_SHOW_DEBUG_ROUTE=false diff --git a/ROADMAP.md b/ROADMAP.md index 16f1f3d2..2af1e90b 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -1,14 +1,7 @@ # Current -- [ ] Topics - - [x] Improve topic suggestions and rendering - - [x] Add topic search, keep cache of topics - - [x] Ability to create custom feeds - - [x] Bookmark icon opens "create feed" dialog with form pre-filled - - [ ] Replace some modals instead of pushing - - [ ] Test anonymous with lists - - [ ] Test hardcoded relay, currently you get asked to pick a relay if not logged in - - [ ] Claim relays bounty +- [ ] Claim relays bounty +- [ ] Add real search, it's a big hurdle for first-timers/anons - [ ] Fix notifications - [ ] Queue context requests to avoid having too many concurrent subscriptions - [ ] Advanced search diff --git a/src/agent/user.ts b/src/agent/user.ts index df742b59..70fb3096 100644 --- a/src/agent/user.ts +++ b/src/agent/user.ts @@ -41,7 +41,7 @@ const profile = synced("agent/user/profile", { }) const settings = derived(profile, prop("settings")) -const petnames = derived(profile, prop("petnames")) +const petnames = derived(profile, prop("petnames")) as Readable>> const relays = derived(profile, prop("relays")) as Readable> const mutes = derived(profile, prop("mutes")) as Readable> const lists = derived(profile, prop("lists")) as Readable> diff --git a/src/app/EnsureData.svelte b/src/app/EnsureData.svelte index 8dcc7a32..583f194e 100644 --- a/src/app/EnsureData.svelte +++ b/src/app/EnsureData.svelte @@ -8,8 +8,9 @@ import PersonSearch from "src/app/shared/PersonSearch.svelte" import {getPersonWithFallback} from "src/agent/db" import user from "src/agent/user" + import pool from "src/agent/pool" - export let enforceRelays = true + export let enforceRelays = pool.forceUrls.length === 0 export let enforcePeople = true const {petnamePubkeys, relays} = user @@ -29,18 +30,24 @@ {#if $relays.length > 0}

Your Relays

{/if} - {#each $relays as relay (relay.url)} - - {:else} -
-
- - You aren't yet connected to any relays. +
+ {#each $relays as relay (relay.url)} + + {:else} +
+
+ + You aren't yet connected to any relays. +
+
Search below to find one to join.
-
Search below to find one to join.
+ {/each} +
+ +
+
- {/each} - + {:else if needsRelays()} @@ -72,7 +79,7 @@
Search below to find some interesting people.
{/each} - + {:else if needsPeople()} @@ -83,7 +90,7 @@ You aren't yet following anyone.
- Click here to find some interesting people. + Click here to find some interesting people.
diff --git a/src/app/SideNav.svelte b/src/app/SideNav.svelte index 335c4311..53992a82 100644 --- a/src/app/SideNav.svelte +++ b/src/app/SideNav.svelte @@ -121,13 +121,6 @@ {/if} - {#if import.meta.env.VITE_SHOW_DEBUG_ROUTE === "true"} -
  • - - Debug - -
  • - {/if} {#if $installPrompt}
  • addToList("p", person.pubkey), - label: "Add to list", - icon: "scroll", - }) + if ($canPublish) { + actions.push({ + onClick: () => addToList("p", person.pubkey), + label: "Add to list", + icon: "scroll", + }) + } actions.push({onClick: share, label: "Share", icon: "share-nodes"}) diff --git a/src/app/shared/PersonCircle.svelte b/src/app/shared/PersonCircle.svelte index 6a39654e..a105fe3b 100644 --- a/src/app/shared/PersonCircle.svelte +++ b/src/app/shared/PersonCircle.svelte @@ -19,7 +19,7 @@ class={cx( $$props.class, `relative overflow-hidden w-${size} h-${size} inline-block shrink-0 rounded-full border border-solid - border-white bg-cover bg-center` + border-gray-1 bg-cover bg-center` )} style="--logo-color: {primary}; --logo-bg-color: {secondary}; background-color: var(--logo-bg-color);"> import {last, nth} from "ramda" import {fly} from "svelte/transition" - import {noEvent} from "src/util/html" import {displayPerson} from "src/util/nostr" import Anchor from "src/partials/Anchor.svelte" import PersonCircle from "src/app/shared/PersonCircle.svelte" @@ -10,9 +9,10 @@ import user from "src/agent/user" import {routes} from "src/app/state" - export let person + const {petnames} = user - export let hasPetname = pubkey => user.getPetnames().map(nth(1)).includes(pubkey) + export let person + export let hasPetname = null export let removePetname = ({pubkey}) => user.removePetname(pubkey) @@ -21,35 +21,41 @@ user.addPetname(pubkey, url, displayPerson(person)) } + + $: isFollowing = hasPetname + ? hasPetname(person.pubkey) + : $petnames.map(nth(1)).includes(person.pubkey) - - -
    -
    - diff --git a/src/app/shared/PersonSearch.svelte b/src/app/shared/PersonSearch.svelte index 4c30af02..264f12a8 100644 --- a/src/app/shared/PersonSearch.svelte +++ b/src/app/shared/PersonSearch.svelte @@ -1,4 +1,5 @@ diff --git a/src/app/views/Feeds.svelte b/src/app/views/Feeds.svelte index 7eb16e23..29b69454 100644 --- a/src/app/views/Feeds.svelte +++ b/src/app/views/Feeds.svelte @@ -1,8 +1,9 @@ diff --git a/src/partials/Anchor.svelte b/src/partials/Anchor.svelte index c006b352..528728f7 100644 --- a/src/partials/Anchor.svelte +++ b/src/partials/Anchor.svelte @@ -1,5 +1,7 @@ - + diff --git a/src/partials/ImageCircle.svelte b/src/partials/ImageCircle.svelte index 17d8d6c4..4387b552 100644 --- a/src/partials/ImageCircle.svelte +++ b/src/partials/ImageCircle.svelte @@ -9,7 +9,7 @@ class={cx( $$props.class, `overflow-hidden w-${size} h-${size} inline-block shrink-0 rounded-full border border-solid - border-white bg-cover bg-center` + border-gray-1 bg-cover bg-center` )} style="background-image: url({src}); {$$props.style || ''}"> diff --git a/src/partials/Modal.svelte b/src/partials/Modal.svelte index 427c34ce..6dfb95c5 100644 --- a/src/partials/Modal.svelte +++ b/src/partials/Modal.svelte @@ -24,7 +24,7 @@ }} />