diff --git a/.env b/.env index 368e2326..3382a999 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ -VITE_DARK_THEME="accent:#FC560E,neutral-100:#F5F5F5,neutral-200:#E5E5E5,neutral-300:#D4D4D4,neutral-400:#A3A3A3,neutral-500:#737373,neutral-50:#FAFAFA,neutral-600:#525252,neutral-700:#404040,neutral-800:#262626,neutral-900:#171717,neutral-950:#0A0A0A,success:#12D2B0,tinted-100:#F1EAE7,tinted-200:#DED3CF,tinted-400:#B9A69E,tinted-500:#756A65,tinted-600:#5A524F,tinted-700:#3E3A38,tinted-800:#332f2d,warning:#FCAB0E" -VITE_LIGHT_THEME="accent:#FC560E,neutral-950:#FAFAFA,neutral-900:#FAFAFA,neutral-800:#F5F5F5,neutral-700:#D4D4D4,neutral-600:#A3A3A3,neutral-500:#737373,neutral-400:#525252,neutral-300:#404040,neutral-200:#262626,neutral-100:#171717,neutral-50:#0A0A0A,success:#12D2B0,tinted-800:#FFFFFF,tinted-700:#FAFAFA,tinted-600:#F5F5F5,tinted-500:#D4D4D4,tinted-400:#A3A3A3,tinted-200:#737373,tinted-100:#525252,warning:#FCAB0E" +VITE_DARK_THEME="accent:#FC560E,neutral-100:#F5F5F5,neutral-200:#E5E5E5,neutral-300:#D4D4D4,neutral-400:#A3A3A3,neutral-500:#737373,neutral-50:#FAFAFA,neutral-600:#525252,neutral-700:#404040,neutral-800:#262626,neutral-900:#171717,neutral-950:#0A0A0A,success:#12D2B0,tinted-100:#F1EAE7,tinted-200:#DED3CF,tinted-400:#B9A69E,tinted-500:#756A65,tinted-600:#5A524F,tinted-700:#3E3A38,tinted-800:#332f2d,warning:#FCAB0E,danger:#dc0c0c" +VITE_LIGHT_THEME="accent:#FC560E,neutral-950:#FAFAFA,neutral-900:#FAFAFA,neutral-800:#F5F5F5,neutral-700:#D4D4D4,neutral-600:#A3A3A3,neutral-500:#737373,neutral-400:#525252,neutral-300:#404040,neutral-200:#262626,neutral-100:#171717,neutral-50:#0A0A0A,success:#12D2B0,tinted-800:#FFFFFF,tinted-700:#FAFAFA,tinted-600:#F5F5F5,tinted-500:#D4D4D4,tinted-400:#A3A3A3,tinted-200:#737373,tinted-100:#525252,warning:#FCAB0E,danger:#dc0c0c" VITE_DVM_RELAYS=wss://relay.damus.io,wss://offchain.pub,wss://relay.f7z.io,wss://nos.lol,wss://relay.nostr.net,wss://relay.nostr.band,wss://bucket.coracle.social VITE_SEARCH_RELAYS=wss://relay.nostr.band,wss://nostr.wine,wss://search.nos.today VITE_DEFAULT_RELAYS=wss://relay.damus.io,wss://nos.lol diff --git a/src/app/App.svelte b/src/app/App.svelte index a20d1ebb..dc28067f 100644 --- a/src/app/App.svelte +++ b/src/app/App.svelte @@ -145,8 +145,8 @@ }) router.register("/feeds", import("src/app/views/FeedList.svelte")) - router.register("/feeds/create", import("src/app/views/FeedForm.svelte")) - router.register("/feeds/:address", import("src/app/views/FeedForm.svelte"), { + router.register("/feeds/create", import("src/app/views/FeedCreate.svelte")) + router.register("/feeds/:address", import("src/app/views/FeedEdit.svelte"), { serializers: { address: asNaddr("address"), }, diff --git a/src/app/MenuDesktop.svelte b/src/app/MenuDesktop.svelte index a04951a2..3a03a3de 100644 --- a/src/app/MenuDesktop.svelte +++ b/src/app/MenuDesktop.svelte @@ -14,7 +14,7 @@ import MenuDesktopSecondary from "src/app/MenuDesktopSecondary.svelte" import {feed, slowConnections} from "src/app/state" import {router} from "src/app/util/router" - import {readFeed, normalizeFeedDefinition} from "src/domain" + import {readFeed, displayFeed, normalizeFeedDefinition} from "src/domain" import { env, user, @@ -60,13 +60,13 @@ in:fly={{x: -100, duration: 200}} class="fixed bottom-0 left-72 top-0 w-60 bg-tinted-700 pt-24 transition-colors"> loadFeed(followsFeed)}> Follows loadFeed(networkFeed)}> Network @@ -74,16 +74,16 @@ {#each $userFeeds as event} {@const thisFeed = readFeed(event)} loadFeed(thisFeed.definition)}> - {thisFeed.name} + {displayFeed(thisFeed)} {/each} {#each $userLists as list} {@const definition = feedFromTags(Tags.fromEvent(list))} loadFeed(definition)}> {displayList(list)} diff --git a/src/app/MenuDesktopItem.svelte b/src/app/MenuDesktopItem.svelte index c844d100..6fd4f37b 100644 --- a/src/app/MenuDesktopItem.svelte +++ b/src/app/MenuDesktopItem.svelte @@ -7,10 +7,15 @@ export let path = null export let isAlt = false export let isActive = false + export let small = false - $: className = cx("relative staatliches h-12 block transition-all", $$props.class, { - "text-3xl text-accent": isActive, - "text-2xl text-tinted-400 hover:text-tinted-100": !isActive, + $: className = cx("relative staatliches block transition-all", $$props.class, { + "h-12": !small, + "h-10 text-lg": small, + "text-3xl": !small && isActive, + "text-2xl": !small && !isActive, + "text-accent": isActive, + "text-tinted-400 hover:text-tinted-100": !isActive, "hover:bg-tinted-800": !isActive && !isAlt, "hover:bg-tinted-700": !isActive && isAlt, }) @@ -22,7 +27,9 @@ {#if isActive}
+ class="relative h-px w-full bg-accent" + class:top-4={!small} + class:top-3={small} /> {/if}
diff --git a/src/app/shared/DVMField.svelte b/src/app/shared/DVMField.svelte index b5e634d8..6d2d2075 100644 --- a/src/app/shared/DVMField.svelte +++ b/src/app/shared/DVMField.svelte @@ -63,7 +63,6 @@ onChange={relays => onChange({...dvmItem, relays})}> {displayRelayUrl(item)} -

Select which relays requests to this DVM should be sent to.

{#each dvmItem.tags || [] as [type, value], i (i + key)}
diff --git a/src/app/shared/FeedCard.svelte b/src/app/shared/FeedCard.svelte new file mode 100644 index 00000000..58f42e6d --- /dev/null +++ b/src/app/shared/FeedCard.svelte @@ -0,0 +1,32 @@ + + + + +
+ + + + {displayFeed(feed)} + + + +
+ {#if feed.description} +

{feed.description}

+ {/if} + +
+
diff --git a/src/app/shared/FeedControls.svelte b/src/app/shared/FeedControls.svelte index 23986e4e..128be82a 100644 --- a/src/app/shared/FeedControls.svelte +++ b/src/app/shared/FeedControls.svelte @@ -1,32 +1,21 @@ + + - {#if !hideType} - - - -
- {#if option === FormType.People} - - People - {:else if option === FormType.Topics} - - - - Topics - {:else if option === FormType.Relays} - - Relays - {:else if option === FormType.DVMs} - - DVMs - {/if} -
-
-
-
- onFormTypeChange(FormType.Advanced)} - >Advanced mode -
-
- {/if} - {#if formType === FormType.People} - - {:else if formType === FormType.Topics} - - {:else if formType === FormType.Relays} - - {:else if formType === FormType.DVMs} - - {:else if formType === FormType.Advanced} - - {/if} + + + Choose a feed type + +
+ {#if option === FormType.People} + + People + {:else if option === FormType.Topics} + + + + Topics + {:else if option === FormType.Relays} + + Relays + {:else if option === FormType.DVMs} + + DVMs + {:else if option === FormType.Advanced} + + + + Advanced + {/if} +
+
+
+
+ + {#if formType === FormType.Advanced} + + {:else} + + {/if} +
diff --git a/src/app/shared/FeedForm.svelte b/src/app/shared/FeedForm.svelte new file mode 100644 index 00000000..5cef2d2f --- /dev/null +++ b/src/app/shared/FeedForm.svelte @@ -0,0 +1,96 @@ + + + +{#if isEdit} + +

You are currently editing your {displayFeed(feed)} feed.

+ + Create a new feed instead + +
+{:else if saveIsOpen} + + + + + +