diff --git a/apps/desktop2/src/components/conversation.tsx b/apps/desktop2/src/components/conversation.tsx index 18d2f7a9..e8a01cc2 100644 --- a/apps/desktop2/src/components/conversation.tsx +++ b/apps/desktop2/src/components/conversation.tsx @@ -17,7 +17,7 @@ export const Conversation = memo(function Conversation({ diff --git a/apps/desktop2/src/components/note/content.tsx b/apps/desktop2/src/components/note/content.tsx index 4143a5cf..024ef1ff 100644 --- a/apps/desktop2/src/components/note/content.tsx +++ b/apps/desktop2/src/components/note/content.tsx @@ -97,7 +97,7 @@ export function NoteContent({ return (
{blurred ? ( -
+

The content is hidden because the author diff --git a/apps/desktop2/src/components/note/preview/videos.tsx b/apps/desktop2/src/components/note/preview/videos.tsx index 4642c7d7..3fde75ff 100644 --- a/apps/desktop2/src/components/note/preview/videos.tsx +++ b/apps/desktop2/src/components/note/preview/videos.tsx @@ -1,10 +1,9 @@ -import { Carousel, CarouselItem } from "@lume/ui"; - export function Videos({ urls }: { urls: string[] }) { - if (urls.length === 1) { - return ( -

+ return ( +
+ {urls.map((url) => ( -
- ); - } - - return ( - ( - - - - )} - /> + ))} +
); } diff --git a/apps/desktop2/src/components/quote.tsx b/apps/desktop2/src/components/quote.tsx index 728e96c9..e748b68b 100644 --- a/apps/desktop2/src/components/quote.tsx +++ b/apps/desktop2/src/components/quote.tsx @@ -15,7 +15,7 @@ export const Quote = memo(function Quote({ diff --git a/apps/desktop2/src/components/repost.tsx b/apps/desktop2/src/components/repost.tsx index 20dc81bf..9858c239 100644 --- a/apps/desktop2/src/components/repost.tsx +++ b/apps/desktop2/src/components/repost.tsx @@ -33,7 +33,7 @@ export const RepostNote = memo(function RepostNote({ return ( diff --git a/apps/desktop2/src/components/text.tsx b/apps/desktop2/src/components/text.tsx index 9c7dd5fd..e4902945 100644 --- a/apps/desktop2/src/components/text.tsx +++ b/apps/desktop2/src/components/text.tsx @@ -14,7 +14,7 @@ export const TextNote = memo(function TextNote({ diff --git a/apps/desktop2/src/routes/$account.tsx b/apps/desktop2/src/routes/$account.tsx index 51c108b8..57e266e9 100644 --- a/apps/desktop2/src/routes/$account.tsx +++ b/apps/desktop2/src/routes/$account.tsx @@ -5,7 +5,7 @@ import { PlusIcon, SearchIcon, } from "@lume/icons"; -import { LumeWindow, NostrAccount } from "@lume/system"; +import { LumeWindow, NostrAccount, NostrQuery } from "@lume/system"; import { cn } from "@lume/utils"; import { Outlet, createFileRoute } from "@tanstack/react-router"; import { Menu, MenuItem, PredefinedMenuItem } from "@tauri-apps/api/menu"; @@ -15,18 +15,19 @@ import { memo, useCallback, useState } from "react"; export const Route = createFileRoute("/$account")({ beforeLoad: async ({ params }) => { + const settings = await NostrQuery.getUserSettings(); const accounts = await NostrAccount.getAccounts(); const otherAccounts = accounts.filter( (account) => account !== params.account, ); - return { otherAccounts }; + return { otherAccounts, settings }; }, component: Screen, }); function Screen() { - const { platform } = Route.useRouteContext(); + const { settings, platform } = Route.useRouteContext(); const openLumeStore = async () => { await getCurrent().emit("columns", { @@ -80,7 +81,14 @@ function Screen() {
-
+
diff --git a/apps/desktop2/src/routes/bootstrap-relays.tsx b/apps/desktop2/src/routes/bootstrap-relays.tsx index 5e7efb84..021551f6 100644 --- a/apps/desktop2/src/routes/bootstrap-relays.tsx +++ b/apps/desktop2/src/routes/bootstrap-relays.tsx @@ -28,6 +28,13 @@ function Screen() { const onSubmit = async (data: { url: string; purpose: string }) => { try { + if (!data.url.startsWith("wss://") || !data.url.startsWith("ws://")) { + return await message("Relay must be starts with wss:// or ws://", { + title: "Bootstrap Relays", + kind: "info", + }); + } + const relay: Relay = { url: data.url, purpose: data.purpose }; setRelays((prev) => [...prev, relay]); reset(); @@ -50,12 +57,21 @@ function Screen() { }, [bootstrapRelays]); return ( -
-
-
-

Customize Bootstrap Relays

+
+
+
+
+

Customize Bootstrap Relays

-
+
+
+
{relays.map((relay) => (
- +
+ +
+
); } diff --git a/apps/desktop2/src/routes/create-group.tsx b/apps/desktop2/src/routes/create-group.tsx index f773ca59..ced17242 100644 --- a/apps/desktop2/src/routes/create-group.tsx +++ b/apps/desktop2/src/routes/create-group.tsx @@ -96,7 +96,7 @@ function Screen() { />
-
+
toggleUser(item)} - className="inline-flex items-center justify-between px-3 py-2 bg-white rounded-lg dark:bg-black/20 backdrop-blur-lg shadow-primary dark:ring-1 ring-neutral-800/50" + className="inline-flex items-center justify-between px-3 py-2 bg-white rounded-lg dark:bg-black/20 shadow-primary dark:ring-1 ring-neutral-800/50" > @@ -153,7 +153,7 @@ function Screen() { key={item} type="button" onClick={() => toggleUser(item)} - className="inline-flex items-center justify-between px-3 py-2 bg-white rounded-lg dark:bg-black/20 backdrop-blur-lg shadow-primary dark:ring-1 ring-neutral-800/50" + className="inline-flex items-center justify-between px-3 py-2 bg-white rounded-lg dark:bg-black/20 shadow-primary dark:ring-1 ring-neutral-800/50" > diff --git a/apps/desktop2/src/routes/create-newsfeed.f2f.tsx b/apps/desktop2/src/routes/create-newsfeed.f2f.tsx index 535b72fa..a5c45b79 100644 --- a/apps/desktop2/src/routes/create-newsfeed.f2f.tsx +++ b/apps/desktop2/src/routes/create-newsfeed.f2f.tsx @@ -49,7 +49,7 @@ function Screen() { }; return ( -
+

diff --git a/apps/desktop2/src/routes/create-newsfeed.users.tsx b/apps/desktop2/src/routes/create-newsfeed.users.tsx index 4a1440d2..cbbc747a 100644 --- a/apps/desktop2/src/routes/create-newsfeed.users.tsx +++ b/apps/desktop2/src/routes/create-newsfeed.users.tsx @@ -68,7 +68,7 @@ function Screen() { return (

-
+
@@ -88,7 +88,7 @@ function Screen() { users.profiles.map((item: { pubkey: string }) => (
diff --git a/apps/desktop2/src/routes/create-topic.tsx b/apps/desktop2/src/routes/create-topic.tsx index e88ea7b8..d1604ba0 100644 --- a/apps/desktop2/src/routes/create-topic.tsx +++ b/apps/desktop2/src/routes/create-topic.tsx @@ -75,14 +75,14 @@ function Screen() { Added: {topics.length}
-
+
{TOPICS.map((topic) => ( - -
-
- {activePageIndex + 1} / {pages.length} -
-
- ); -}; - -interface CarouselItemProps { - readonly isSnapPoint: boolean; - readonly children?: React.ReactNode; -} - -export const CarouselItem = ({ isSnapPoint, children }: CarouselItemProps) => { - return ( -
  • - {children} -
  • - ); -}; diff --git a/packages/ui/src/index.ts b/packages/ui/src/index.ts index a286d7a6..1ca7c729 100644 --- a/packages/ui/src/index.ts +++ b/packages/ui/src/index.ts @@ -1,4 +1,3 @@ export * from "./container"; export * from "./box"; export * from "./spinner"; -export * from "./carousel"; diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 0e2a7b0e..a5010ca4 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -43,6 +43,7 @@ pub struct Settings { display_zap_button: bool, display_repost_button: bool, display_media: bool, + vibrancy: bool, } impl Default for Settings { @@ -56,6 +57,7 @@ impl Default for Settings { display_zap_button: true, display_repost_button: true, display_media: true, + vibrancy: true, } } }