From ca0e0417317477020cb7146f6291f7bc691a8c0e Mon Sep 17 00:00:00 2001 From: reya Date: Sat, 2 Mar 2024 15:21:28 +0700 Subject: [PATCH] feat: improve --- apps/desktop2/package.json | 14 +- apps/desktop2/src/components/accounts.tsx | 118 +- apps/desktop2/src/components/suggest.tsx | 56 + apps/desktop2/src/routes/$account.tsx | 42 +- .../src/routes/$account/home.lazy.tsx | 133 ++ apps/desktop2/src/routes/$account/home.tsx | 66 - .../src/routes/$account/home/global.lazy.tsx | 92 -- .../src/routes/$account/home/local.lazy.tsx | 89 -- .../src/routes/auth/create/self.lazy.tsx | 2 +- apps/desktop2/src/routes/auth/import.lazy.tsx | 2 +- apps/desktop2/src/routes/backup.lazy.tsx | 20 + .../src/routes/events/$eventId.lazy.tsx | 2 +- apps/desktop2/src/routes/index.tsx | 31 +- apps/desktop2/src/routes/login.tsx | 14 + .../src/routes/settings/index.lazy.tsx | 9 + apps/web/package.json | 2 +- packages/ark/package.json | 7 +- packages/ark/src/ark.ts | 11 + packages/icons/package.json | 2 +- packages/icons/src/bell.tsx | 30 +- packages/icons/src/bellFilled.tsx | 29 +- packages/icons/src/composeFilled.tsx | 27 +- packages/icons/src/home.tsx | 11 +- packages/icons/src/homeFilled.tsx | 11 +- packages/icons/src/horizontalDots.tsx | 27 +- packages/icons/src/link.tsx | 13 +- packages/icons/src/plus.tsx | 22 +- packages/icons/src/reply.tsx | 29 +- packages/icons/src/repost.tsx | 27 +- packages/icons/src/settings.tsx | 43 +- packages/icons/src/space.tsx | 18 +- packages/icons/src/spaceFilled.tsx | 13 +- packages/icons/src/zap.tsx | 26 +- packages/lume-column-antenas/package.json | 6 +- packages/lume-column-default/package.json | 6 +- packages/lume-column-foryou/package.json | 6 +- packages/lume-column-global/package.json | 6 +- packages/lume-column-group/package.json | 6 +- packages/lume-column-hashtag/package.json | 6 +- packages/lume-column-thread/package.json | 6 +- packages/lume-column-timeline/package.json | 6 +- .../lume-column-trending-notes/package.json | 6 +- packages/lume-column-user/package.json | 6 +- packages/lume-column-waifu/package.json | 4 +- packages/ui/package.json | 11 +- packages/ui/src/account/active.tsx | 81 -- packages/ui/src/account/logoutDialog.tsx | 76 -- packages/ui/src/box.tsx | 9 +- packages/ui/src/emptyFeed.tsx | 50 +- packages/ui/src/note/buttons/reply.tsx | 6 +- packages/ui/src/note/mentions/note.tsx | 2 +- packages/ui/src/note/preview/image.tsx | 7 +- packages/utils/index.ts | 1 - packages/utils/package.json | 5 +- packages/utils/src/state.ts | 27 - pnpm-lock.yaml | 1151 ++++++++--------- src-tauri/Cargo.lock | 441 +++---- src-tauri/gen/schemas/acl-manifests.json | 1 + src-tauri/gen/schemas/capabilities.json | 2 +- src-tauri/gen/schemas/desktop-schema.json | 2 +- src-tauri/gen/schemas/macOS-schema.json | 2 +- src-tauri/locales/en.json | 8 +- 62 files changed, 1353 insertions(+), 1631 deletions(-) create mode 100644 apps/desktop2/src/components/suggest.tsx create mode 100644 apps/desktop2/src/routes/$account/home.lazy.tsx delete mode 100644 apps/desktop2/src/routes/$account/home.tsx delete mode 100644 apps/desktop2/src/routes/$account/home/global.lazy.tsx delete mode 100644 apps/desktop2/src/routes/$account/home/local.lazy.tsx create mode 100644 apps/desktop2/src/routes/backup.lazy.tsx create mode 100644 apps/desktop2/src/routes/login.tsx create mode 100644 apps/desktop2/src/routes/settings/index.lazy.tsx delete mode 100644 packages/ui/src/account/active.tsx delete mode 100644 packages/ui/src/account/logoutDialog.tsx delete mode 100644 packages/utils/src/state.ts create mode 100644 src-tauri/gen/schemas/acl-manifests.json diff --git a/apps/desktop2/package.json b/apps/desktop2/package.json index 60d244e7..71ba191b 100644 --- a/apps/desktop2/package.json +++ b/apps/desktop2/package.json @@ -15,10 +15,12 @@ "@lume/utils": "workspace:^", "@radix-ui/react-checkbox": "^1.0.4", "@radix-ui/react-collapsible": "^1.0.3", + "@radix-ui/react-dropdown-menu": "^2.0.6", + "@radix-ui/react-popover": "^1.0.7", "@tanstack/query-sync-storage-persister": "^5.24.1", - "@tanstack/react-query": "^5.22.2", - "@tanstack/react-query-persist-client": "^5.22.2", - "@tanstack/react-router": "^1.16.6", + "@tanstack/react-query": "^5.24.1", + "@tanstack/react-query-persist-client": "^5.24.1", + "@tanstack/react-router": "^1.17.4", "i18next": "^23.10.0", "i18next-resources-to-backend": "^1.2.0", "nostr-tools": "^2.3.1", @@ -27,16 +29,16 @@ "react-i18next": "^14.0.5", "slate": "^0.101.5", "slate-react": "^0.101.6", - "sonner": "^1.4.1", + "sonner": "^1.4.2", "virtua": "^0.27.5" }, "devDependencies": { "@lume/tailwindcss": "workspace:^", "@lume/tsconfig": "workspace:^", "@lume/types": "workspace:^", - "@tanstack/router-devtools": "^1.16.6", + "@tanstack/router-devtools": "^1.17.4", "@tanstack/router-vite-plugin": "^1.16.5", - "@types/react": "^18.2.58", + "@types/react": "^18.2.60", "@types/react-dom": "^18.2.19", "@vitejs/plugin-react-swc": "^3.6.0", "autoprefixer": "^10.4.17", diff --git a/apps/desktop2/src/components/accounts.tsx b/apps/desktop2/src/components/accounts.tsx index 5e748d54..dbf134fd 100644 --- a/apps/desktop2/src/components/accounts.tsx +++ b/apps/desktop2/src/components/accounts.tsx @@ -1,9 +1,12 @@ import { useArk } from "@lume/ark"; -import { PlusIcon } from "@lume/icons"; import { Account } from "@lume/types"; import { User } from "@lume/ui"; -import { Link, useNavigate, useParams } from "@tanstack/react-router"; +import { useNavigate, useParams, useSearch } from "@tanstack/react-router"; import { useEffect, useState } from "react"; +import * as Popover from "@radix-ui/react-popover"; +import { Link } from "@tanstack/react-router"; +import { useTranslation } from "react-i18next"; +import * as DropdownMenu from "@radix-ui/react-dropdown-menu"; export function Accounts() { const ark = useArk(); @@ -22,12 +25,6 @@ export function Accounts() { return (
- - - {accounts ? accounts.map((account) => // @ts-ignore, useless @@ -48,15 +45,14 @@ function Inactive({ pubkey }: { pubkey: string }) { const changeAccount = async (npub: string) => { const select = await ark.load_selected_account(npub); - if (select) - navigate({ to: "/$account/home/local", params: { account: npub } }); + if (select) navigate({ to: "/$account/home", params: { account: npub } }); }; return ( @@ -64,11 +60,99 @@ function Inactive({ pubkey }: { pubkey: string }) { } function Active({ pubkey }: { pubkey: string }) { + const [open, setOpen] = useState(true); + // @ts-ignore, magic !!! + const { guest } = useSearch({ strict: false }); + const { t } = useTranslation(); + + if (guest) { + return ( + + + + + + +
+

You're using guest account

+

+ You can continue by claim and backup this account, or you can + import your own account key. +

+
+
+ + Claim & Backup + + + {t("welcome.login")} + +
+ +
+
+
+ ); + } + return ( - - - - - + + + + + + + + + + + + Add account +
+ ⌘+Shift+N +
+
+ + Profile +
+ ⌘+Shift+P +
+
+ + Settings +
+ ⌘+Shift+S +
+
+ + Logout +
+ ⌘+Shift+L +
+
+ +
+
+
); } diff --git a/apps/desktop2/src/components/suggest.tsx b/apps/desktop2/src/components/suggest.tsx new file mode 100644 index 00000000..2844fa4d --- /dev/null +++ b/apps/desktop2/src/components/suggest.tsx @@ -0,0 +1,56 @@ +import { LoaderIcon } from "@lume/icons"; +import { useQuery } from "@tanstack/react-query"; +import { useTranslation } from "react-i18next"; +import { User } from "@lume/ui"; + +export function Suggest() { + const { t } = useTranslation(); + const { isLoading, isError, data } = useQuery({ + queryKey: ["trending-users"], + queryFn: async ({ signal }: { signal: AbortSignal }) => { + const res = await fetch("https://api.nostr.band/v0/trending/profiles", { + signal, + }); + if (!res.ok) { + throw new Error("Failed to fetch trending users from nostr.band API."); + } + return res.json(); + }, + }); + + return ( +
+
+ Suggested Follows +
+ {isLoading ? ( +
+ +
+ ) : isError ? ( +
+ {t("suggestion.error")} +
+ ) : ( + data?.profiles.map((item: { pubkey: string }) => ( +
+ + +
+
+
+ + +
+ +
+ +
+
+
+
+ )) + )} +
+ ); +} diff --git a/apps/desktop2/src/routes/$account.tsx b/apps/desktop2/src/routes/$account.tsx index 98bd5c48..546d0a3d 100644 --- a/apps/desktop2/src/routes/$account.tsx +++ b/apps/desktop2/src/routes/$account.tsx @@ -1,17 +1,19 @@ import { BellFilledIcon, BellIcon, - EditIcon, + ComposeFilledIcon, HomeFilledIcon, HomeIcon, + HorizontalDotsIcon, SpaceFilledIcon, SpaceIcon, } from "@lume/icons"; -import { Link, useParams } from "@tanstack/react-router"; +import { Link } from "@tanstack/react-router"; import { Outlet, createFileRoute } from "@tanstack/react-router"; import { cn } from "@lume/utils"; import { Accounts } from "@/components/accounts"; import { useArk } from "@lume/ark"; +import { Box } from "@lume/ui"; export const Route = createFileRoute("/$account")({ component: App, @@ -36,37 +38,37 @@ function App() {
-
-
- -
-
+ + + ); } function Navigation() { // @ts-ignore, useless - const { account } = useParams({ strict: false }); + const { account } = Route.useParams(); return (
- + {({ isActive }) => (
{isActive ? ( @@ -82,8 +84,10 @@ function Navigation() { {({ isActive }) => (
{isActive ? ( @@ -99,8 +103,10 @@ function Navigation() { {({ isActive }) => (
{isActive ? ( diff --git a/apps/desktop2/src/routes/$account/home.lazy.tsx b/apps/desktop2/src/routes/$account/home.lazy.tsx new file mode 100644 index 00000000..a2995d2c --- /dev/null +++ b/apps/desktop2/src/routes/$account/home.lazy.tsx @@ -0,0 +1,133 @@ +import { RepostNote } from "@/components/repost"; +import { Suggest } from "@/components/suggest"; +import { TextNote } from "@/components/text"; +import { useArk } from "@lume/ark"; +import { + LoaderIcon, + ArrowRightCircleIcon, + RefreshIcon, + InfoIcon, +} from "@lume/icons"; +import { Event, Kind } from "@lume/types"; +import { EmptyFeed } from "@lume/ui"; +import { FETCH_LIMIT } from "@lume/utils"; +import { useInfiniteQuery } from "@tanstack/react-query"; +import { createLazyFileRoute } from "@tanstack/react-router"; +import { Virtualizer } from "virtua"; + +export const Route = createLazyFileRoute("/$account/home")({ + component: Home, +}); + +function Home() { + const ark = useArk(); + const currentDate = new Date().toLocaleString("default", { + weekday: "long", + month: "long", + day: "numeric", + }); + + const { account } = Route.useParams(); + const { + data, + hasNextPage, + isLoading, + isRefetching, + isFetchingNextPage, + fetchNextPage, + refetch, + } = useInfiniteQuery({ + queryKey: ["local_newsfeed", account], + initialPageParam: 0, + queryFn: async ({ pageParam }: { pageParam: number }) => { + const events = await ark.get_events( + "local", + FETCH_LIMIT, + pageParam, + true, + ); + return events; + }, + getNextPageParam: (lastPage) => { + const lastEvent = lastPage?.at(-1); + if (!lastEvent) return; + return lastEvent.created_at - 1; + }, + select: (data) => data?.pages.flatMap((page) => page), + refetchOnWindowFocus: false, + }); + + const renderItem = (event: Event) => { + if (!event) return; + switch (event.kind) { + case Kind.Repost: + return ; + default: + return ; + } + }; + + return ( +
+
+

+ {currentDate} +

+
+ +
+
+
+
+ {isLoading || isRefetching ? ( +
+ +
+ ) : !data.length ? ( +
+
+ +

+ Empty newsfeed. Or you can go to{" "} + + Discover + +

+
+ +
+ ) : ( + + {data.map((item) => renderItem(item))} + + )} +
+ {hasNextPage ? ( + + ) : null} +
+
+
+
+ ); +} diff --git a/apps/desktop2/src/routes/$account/home.tsx b/apps/desktop2/src/routes/$account/home.tsx deleted file mode 100644 index c9904711..00000000 --- a/apps/desktop2/src/routes/$account/home.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import { cn } from "@lume/utils"; -import { - Outlet, - Link, - createFileRoute, - useParams, -} from "@tanstack/react-router"; - -export const Route = createFileRoute("/$account/home")({ - component: Home, -}); - -function Home() { - // @ts-ignore, useless - const { account } = useParams({ strict: false }); - - return ( -
-
-
-
- - {({ isActive }) => ( -
- Local -
- )} - - - {({ isActive }) => ( -
- Global -
- )} - -
-
-
- -
-
-
- ); -} diff --git a/apps/desktop2/src/routes/$account/home/global.lazy.tsx b/apps/desktop2/src/routes/$account/home/global.lazy.tsx deleted file mode 100644 index b5c67a72..00000000 --- a/apps/desktop2/src/routes/$account/home/global.lazy.tsx +++ /dev/null @@ -1,92 +0,0 @@ -import { useArk } from "@lume/ark"; -import { ArrowRightCircleIcon, LoaderIcon, SearchIcon } from "@lume/icons"; -import { Event, Kind } from "@lume/types"; -import { EmptyFeed } from "@lume/ui"; -import { FETCH_LIMIT } from "@lume/utils"; -import { useInfiniteQuery } from "@tanstack/react-query"; -import { createLazyFileRoute } from "@tanstack/react-router"; -import { Virtualizer } from "virtua"; -import { TextNote } from "./-components/text"; -import { RepostNote } from "./-components/repost"; - -export const Route = createLazyFileRoute("/$account/home/global")({ - component: GlobalTimeline, -}); - -function GlobalTimeline() { - const ark = useArk(); - const { data, hasNextPage, isLoading, isFetchingNextPage, fetchNextPage } = - useInfiniteQuery({ - queryKey: ["events", "global"], - initialPageParam: 0, - queryFn: async ({ pageParam }: { pageParam: number }) => { - const events = await ark.get_events( - "global", - FETCH_LIMIT, - pageParam, - true, - ); - return events; - }, - getNextPageParam: (lastPage) => { - const lastEvent = lastPage.at(-1); - if (!lastEvent) return; - return lastEvent.created_at - 1; - }, - select: (data) => data?.pages.flatMap((page) => page), - refetchOnWindowFocus: false, - }); - - const renderItem = (event: Event) => { - switch (event.kind) { - case Kind.Repost: - return ; - default: - return ; - } - }; - - return ( -
- {isLoading ? ( -
- -
- ) : !data.length ? ( - - ) : ( - - {data.map((item) => renderItem(item))} - - )} -
- {hasNextPage ? ( - - ) : null} -
-
- ); -} diff --git a/apps/desktop2/src/routes/$account/home/local.lazy.tsx b/apps/desktop2/src/routes/$account/home/local.lazy.tsx deleted file mode 100644 index 02b099f3..00000000 --- a/apps/desktop2/src/routes/$account/home/local.lazy.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import { useArk } from "@lume/ark"; -import { ArrowRightCircleIcon, ArrowRightIcon, LoaderIcon } from "@lume/icons"; -import { Event, Kind } from "@lume/types"; -import { EmptyFeed } from "@lume/ui"; -import { FETCH_LIMIT } from "@lume/utils"; -import { useInfiniteQuery } from "@tanstack/react-query"; -import { createLazyFileRoute } from "@tanstack/react-router"; -import { Virtualizer } from "virtua"; -import { TextNote } from "@/components/text"; -import { RepostNote } from "@/components/repost"; - -export const Route = createLazyFileRoute("/$account/home/local")({ - component: LocalTimeline, -}); - -function LocalTimeline() { - const ark = useArk(); - - const { account } = Route.useParams(); - const { data, hasNextPage, isLoading, isFetchingNextPage, fetchNextPage } = - useInfiniteQuery({ - queryKey: ["local_newsfeed", account], - initialPageParam: 0, - queryFn: async ({ pageParam }: { pageParam: number }) => { - const events = await ark.get_events( - "local", - FETCH_LIMIT, - pageParam, - true, - ); - return events; - }, - getNextPageParam: (lastPage) => { - const lastEvent = lastPage?.at(-1); - if (!lastEvent) return; - return lastEvent.created_at - 1; - }, - select: (data) => data?.pages.flatMap((page) => page), - refetchOnWindowFocus: false, - }); - - const renderItem = (event: Event) => { - if (!event) return; - switch (event.kind) { - case Kind.Repost: - return ; - default: - return ; - } - }; - - return ( -
- {isLoading ? ( -
- -

Loading...

-
- ) : !data.length ? ( -
- -
- ) : ( - - {data.map((item) => renderItem(item))} - - )} -
- {hasNextPage ? ( - - ) : null} -
-
- ); -} diff --git a/apps/desktop2/src/routes/auth/create/self.lazy.tsx b/apps/desktop2/src/routes/auth/create/self.lazy.tsx index 547045f1..8549ed6a 100644 --- a/apps/desktop2/src/routes/auth/create/self.lazy.tsx +++ b/apps/desktop2/src/routes/auth/create/self.lazy.tsx @@ -26,7 +26,7 @@ function Create() { try { await ark.save_account(keys); navigate({ - to: "/$account/home/local", + to: "/$account/home", params: { account: keys.npub }, search: { onboarding: true }, replace: true, diff --git a/apps/desktop2/src/routes/auth/import.lazy.tsx b/apps/desktop2/src/routes/auth/import.lazy.tsx index 3de95d31..08f361e5 100644 --- a/apps/desktop2/src/routes/auth/import.lazy.tsx +++ b/apps/desktop2/src/routes/auth/import.lazy.tsx @@ -32,7 +32,7 @@ function Import() { nsec: key, }); navigate({ - to: "/$account/home/local", + to: "/$account/home", params: { account: npub }, search: { onboarding: true }, replace: true, diff --git a/apps/desktop2/src/routes/backup.lazy.tsx b/apps/desktop2/src/routes/backup.lazy.tsx new file mode 100644 index 00000000..31cdd902 --- /dev/null +++ b/apps/desktop2/src/routes/backup.lazy.tsx @@ -0,0 +1,20 @@ +import { createLazyFileRoute } from "@tanstack/react-router"; +import { useTranslation } from "react-i18next"; + +export const Route = createLazyFileRoute("/backup")({ + component: Screen, +}); + +function Screen() { + const { t } = useTranslation(); + + return ( +
+
+
+

{t("backup.title")}

+
+
+
+ ); +} diff --git a/apps/desktop2/src/routes/events/$eventId.lazy.tsx b/apps/desktop2/src/routes/events/$eventId.lazy.tsx index d62554c0..e26b9377 100644 --- a/apps/desktop2/src/routes/events/$eventId.lazy.tsx +++ b/apps/desktop2/src/routes/events/$eventId.lazy.tsx @@ -31,7 +31,7 @@ function Event() { return ( - + {data ? : null} diff --git a/apps/desktop2/src/routes/index.tsx b/apps/desktop2/src/routes/index.tsx index b3d9c5e2..760b708a 100644 --- a/apps/desktop2/src/routes/index.tsx +++ b/apps/desktop2/src/routes/index.tsx @@ -11,13 +11,14 @@ export const Route = createFileRoute("/")({ const accounts = await ark.get_all_accounts(); switch (accounts.length) { - // Empty account + // Guest account case 0: + const guest = await ark.create_guest_account(); throw redirect({ - to: "/landing", - search: { - redirect: location.href, - }, + to: "/$account/home", + params: { account: guest }, + search: { guest: true }, + replace: true, }); // Only 1 account, skip account selection screen case 1: @@ -25,11 +26,9 @@ export const Route = createFileRoute("/")({ const loadAccount = await ark.load_selected_account(account); if (loadAccount) { throw redirect({ - to: "/$account/home/local", + to: "/$account/home", params: { account }, - search: { - redirect: location.href, - }, + replace: true, }); } // Account selection @@ -51,24 +50,24 @@ function Screen() { const loadAccount = await ark.load_selected_account(npub); if (loadAccount) { navigate({ - to: "/$account/home/local", + to: "/$account/home", params: { account: npub }, replace: true, }); } }; - const weekday = new Date().toLocaleString("default", { weekday: "long" }); - const day = new Date().getDate(); - const month = new Date() - .toLocaleString("default", { month: "long" }) - .toString(); + const currentDate = new Date().toLocaleString("default", { + weekday: "long", + month: "long", + day: "numeric", + }); return (
-

{`${weekday}, ${month} ${day}`}

+

{currentDate}

Welcome back!

diff --git a/apps/desktop2/src/routes/login.tsx b/apps/desktop2/src/routes/login.tsx new file mode 100644 index 00000000..4bc1d153 --- /dev/null +++ b/apps/desktop2/src/routes/login.tsx @@ -0,0 +1,14 @@ +import { Outlet, createFileRoute } from "@tanstack/react-router"; + +export const Route = createFileRoute("/login")({ + component: Screen, +}); + +function Screen() { + return ( +
+

Login

+ +
+ ); +} diff --git a/apps/desktop2/src/routes/settings/index.lazy.tsx b/apps/desktop2/src/routes/settings/index.lazy.tsx new file mode 100644 index 00000000..1ac6a83c --- /dev/null +++ b/apps/desktop2/src/routes/settings/index.lazy.tsx @@ -0,0 +1,9 @@ +import { createLazyFileRoute } from "@tanstack/react-router"; + +export const Route = createLazyFileRoute("/settings/")({ + component: Screen, +}); + +function Screen() { + return
Settings
; +} diff --git a/apps/web/package.json b/apps/web/package.json index b9929571..6e813cc0 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -13,7 +13,7 @@ "@astrojs/check": "^0.4.1", "@astrojs/tailwind": "^5.1.0", "@fontsource/geist-mono": "^5.0.1", - "astro": "^4.4.4", + "astro": "^4.4.6", "astro-seo-meta": "^4.1.0", "astro-seo-schema": "^4.0.0", "schema-dts": "^1.1.2", diff --git a/packages/ark/package.json b/packages/ark/package.json index c12a0b73..ee896a2f 100644 --- a/packages/ark/package.json +++ b/packages/ark/package.json @@ -14,9 +14,8 @@ "@radix-ui/react-hover-card": "^1.0.7", "@radix-ui/react-popover": "^1.0.7", "@radix-ui/react-tooltip": "^1.0.7", - "@tanstack/react-query": "^5.22.2", + "@tanstack/react-query": "^5.24.1", "get-urls": "^12.1.0", - "jotai": "^2.6.5", "media-chrome": "^2.2.5", "minidenticons": "^4.2.0", "nanoid": "^5.0.6", @@ -26,7 +25,7 @@ "react-currency-input-field": "^3.8.0", "react-i18next": "^14.0.5", "react-string-replace": "^1.1.1", - "sonner": "^1.4.1", + "sonner": "^1.4.2", "string-strip-html": "^13.4.6", "virtua": "^0.27.5" }, @@ -34,7 +33,7 @@ "@lume/tailwindcss": "workspace:^", "@lume/tsconfig": "workspace:^", "@lume/types": "workspace:^", - "@types/react": "^18.2.58", + "@types/react": "^18.2.60", "tailwindcss": "^3.4.1", "typescript": "^5.3.3" } diff --git a/packages/ark/src/ark.ts b/packages/ark/src/ark.ts index c9f9d803..af64ad67 100644 --- a/packages/ark/src/ark.ts +++ b/packages/ark/src/ark.ts @@ -50,6 +50,17 @@ export class Ark { } } + public async create_guest_account() { + try { + const keys = await this.create_keys(); + await this.save_account(keys); + + return keys.npub; + } catch (e) { + console.error(e); + } + } + public async create_keys() { try { const cmd: Keys = await invoke("create_keys"); diff --git a/packages/icons/package.json b/packages/icons/package.json index 1c5f3ea0..a9e6ea40 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -8,7 +8,7 @@ }, "devDependencies": { "@lume/tsconfig": "workspace:*", - "@types/react": "^18.2.58", + "@types/react": "^18.2.60", "typescript": "^5.3.3" } } \ No newline at end of file diff --git a/packages/icons/src/bell.tsx b/packages/icons/src/bell.tsx index 48126612..67f1b50d 100644 --- a/packages/icons/src/bell.tsx +++ b/packages/icons/src/bell.tsx @@ -1,24 +1,16 @@ import { SVGProps } from "react"; export function BellIcon( - props: JSX.IntrinsicAttributes & SVGProps, + props: JSX.IntrinsicAttributes & SVGProps, ) { - return ( - - - - ); + return ( + + + + ); } diff --git a/packages/icons/src/bellFilled.tsx b/packages/icons/src/bellFilled.tsx index d1eb55d8..8b069d50 100644 --- a/packages/icons/src/bellFilled.tsx +++ b/packages/icons/src/bellFilled.tsx @@ -1,23 +1,16 @@ import { SVGProps } from "react"; export function BellFilledIcon( - props: JSX.IntrinsicAttributes & SVGProps, + props: JSX.IntrinsicAttributes & SVGProps, ) { - return ( - - - - ); + return ( + + + + ); } diff --git a/packages/icons/src/composeFilled.tsx b/packages/icons/src/composeFilled.tsx index 90a17840..ec87db20 100644 --- a/packages/icons/src/composeFilled.tsx +++ b/packages/icons/src/composeFilled.tsx @@ -1,21 +1,16 @@ import { SVGProps } from "react"; export function ComposeFilledIcon( - props: JSX.IntrinsicAttributes & SVGProps, + props: JSX.IntrinsicAttributes & SVGProps, ) { - return ( - - - - ); + return ( + + + + ); } diff --git a/packages/icons/src/home.tsx b/packages/icons/src/home.tsx index 1e002f50..c7f2390b 100644 --- a/packages/icons/src/home.tsx +++ b/packages/icons/src/home.tsx @@ -1,19 +1,12 @@ export function HomeIcon(props: JSX.IntrinsicElements["svg"]) { return ( - + ); diff --git a/packages/icons/src/homeFilled.tsx b/packages/icons/src/homeFilled.tsx index 44f36206..3468dcc4 100644 --- a/packages/icons/src/homeFilled.tsx +++ b/packages/icons/src/homeFilled.tsx @@ -1,16 +1,9 @@ export function HomeFilledIcon(props: JSX.IntrinsicElements["svg"]) { return ( - + ); diff --git a/packages/icons/src/horizontalDots.tsx b/packages/icons/src/horizontalDots.tsx index 1e62dad2..6475277e 100644 --- a/packages/icons/src/horizontalDots.tsx +++ b/packages/icons/src/horizontalDots.tsx @@ -1,18 +1,13 @@ export function HorizontalDotsIcon(props: JSX.IntrinsicElements["svg"]) { - return ( - - - - ); + return ( + + + + ); } diff --git a/packages/icons/src/link.tsx b/packages/icons/src/link.tsx index 6667aa06..87ec9c23 100644 --- a/packages/icons/src/link.tsx +++ b/packages/icons/src/link.tsx @@ -4,21 +4,14 @@ export function LinkIcon( props: JSX.IntrinsicAttributes & SVGProps, ) { return ( - + + d="M9 6H7.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C4 7.52 4 8.08 4 9.2v7.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C5.52 20 6.08 20 7.2 20h7.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C18 18.48 18 17.92 18 16.8V15M14 4h6m0 0v6m0-6-9 9" + /> ); } diff --git a/packages/icons/src/plus.tsx b/packages/icons/src/plus.tsx index cb1c5c56..f54d371b 100644 --- a/packages/icons/src/plus.tsx +++ b/packages/icons/src/plus.tsx @@ -1,18 +1,12 @@ -export function PlusIcon(props: JSX.IntrinsicElements['svg']) { +export function PlusIcon(props: JSX.IntrinsicElements["svg"]) { return ( - - + + ); } diff --git a/packages/icons/src/reply.tsx b/packages/icons/src/reply.tsx index 19029885..3c397914 100644 --- a/packages/icons/src/reply.tsx +++ b/packages/icons/src/reply.tsx @@ -1,20 +1,13 @@ export function ReplyIcon(props: JSX.IntrinsicElements["svg"]) { - return ( - - - - ); + return ( + + + + ); } diff --git a/packages/icons/src/repost.tsx b/packages/icons/src/repost.tsx index 0bb7d3da..c41afa98 100644 --- a/packages/icons/src/repost.tsx +++ b/packages/icons/src/repost.tsx @@ -1,18 +1,13 @@ export function RepostIcon(props: JSX.IntrinsicElements["svg"]) { - return ( - - - - ); + return ( + + + + ); } diff --git a/packages/icons/src/settings.tsx b/packages/icons/src/settings.tsx index 569ea943..02f98a47 100644 --- a/packages/icons/src/settings.tsx +++ b/packages/icons/src/settings.tsx @@ -1,31 +1,22 @@ import { SVGProps } from "react"; export function SettingsIcon( - props: JSX.IntrinsicAttributes & SVGProps, + props: JSX.IntrinsicAttributes & SVGProps, ) { - return ( - - - - - ); + return ( + + + + + ); } diff --git a/packages/icons/src/space.tsx b/packages/icons/src/space.tsx index c792ea59..5b51049b 100644 --- a/packages/icons/src/space.tsx +++ b/packages/icons/src/space.tsx @@ -4,21 +4,11 @@ export function SpaceIcon( props: JSX.IntrinsicAttributes & SVGProps, ) { return ( - + + fill="currentColor" + d="m5.092 19.782.454-.891-.454.891Zm-.874-.874.891-.454-.891.454Zm15.564 0-.891-.454.891.454Zm-.874.874-.454-.891.454.891Zm.874-14.69-.891.454.891-.454Zm-.874-.874-.454.891.454-.891Zm-14.69.874-.891-.454.891.454Zm.874-.874-.454-.891.454.891ZM13 4V3h-2v1h2Zm-2 16v1h2v-1h-2Zm8-12.8v9.6h2V7.2h-2ZM16.8 19H7.2v2h9.6v-2ZM5 16.8V7.2H3v9.6h2ZM7.2 5h9.6V3H7.2v2Zm0 14c-.577 0-.949 0-1.232-.024-.272-.022-.373-.06-.422-.085l-.908 1.782c.378.193.772.264 1.167.296.384.032.851.031 1.395.031v-2ZM3 16.8c0 .543 0 1.011.03 1.395.033.395.104.789.297 1.167l1.782-.908c-.025-.05-.063-.15-.085-.422C5 17.75 5 17.377 5 16.8H3Zm2.546 2.091a1 1 0 0 1-.437-.437l-1.782.908a3 3 0 0 0 1.311 1.311l.908-1.782ZM19 16.8c0 .576 0 .949-.024 1.232-.022.272-.06.372-.085.422l1.782.908c.193-.378.264-.772.296-1.167.032-.384.031-.852.031-1.395h-2ZM16.8 21c.544 0 1.011 0 1.395-.03.395-.033.789-.104 1.167-.297l-.908-1.782c-.05.025-.15.063-.422.085C17.75 19 17.377 19 16.8 19v2Zm2.091-2.546a1 1 0 0 1-.437.437l.908 1.782a3 3 0 0 0 1.311-1.311l-1.782-.908ZM21 7.2c0-.544 0-1.011-.03-1.395-.033-.395-.104-.789-.297-1.167l-1.782.908c.025.05.063.15.085.422C19 6.25 19 6.623 19 7.2h2ZM16.8 5c.577 0 .949 0 1.232.024.272.022.372.06.422.085l.908-1.782c-.378-.193-.772-.264-1.167-.296C17.811 2.999 17.344 3 16.8 3v2Zm3.873-.362a3 3 0 0 0-1.311-1.311l-.908 1.782a1 1 0 0 1 .437.437l1.782-.908ZM5 7.2c0-.577 0-.949.024-1.232.022-.272.06-.373.085-.422l-1.782-.908c-.193.378-.264.772-.296 1.167C2.999 6.189 3 6.656 3 7.2h2ZM7.2 3c-.544 0-1.011 0-1.395.03-.395.033-.789.104-1.167.297l.908 1.782c.05-.025.15-.063.422-.085C6.25 5 6.623 5 7.2 5V3ZM5.109 5.546a1 1 0 0 1 .437-.437l-.908-1.782a3 3 0 0 0-1.311 1.311l1.782.908ZM11 4v16h2V4h-2Z" + /> ); } diff --git a/packages/icons/src/spaceFilled.tsx b/packages/icons/src/spaceFilled.tsx index 55bfb549..6f4ce3e2 100644 --- a/packages/icons/src/spaceFilled.tsx +++ b/packages/icons/src/spaceFilled.tsx @@ -4,18 +4,11 @@ export function SpaceFilledIcon( props: JSX.IntrinsicAttributes & SVGProps, ) { return ( - + + d="M7.161 3H11v18H7.161c-.527 0-.981 0-1.356-.03-.395-.033-.789-.104-1.167-.297a3 3 0 0 1-1.311-1.311c-.193-.378-.264-.772-.296-1.167A17.9 17.9 0 0 1 3 16.839V7.16c0-.527 0-.981.03-1.356.033-.395.104-.789.297-1.167a3 3 0 0 1 1.311-1.311c.378-.193.772-.264 1.167-.296C6.18 3 6.635 3 7.161 3ZM13 21h3.839c.527 0 .982 0 1.356-.03.395-.033.789-.104 1.167-.297a3 3 0 0 0 1.311-1.311c.193-.378.264-.772.296-1.167.031-.375.031-.83.031-1.356V7.16c0-.527 0-.981-.03-1.356-.033-.395-.104-.789-.297-1.167a3 3 0 0 0-1.311-1.311c-.378-.193-.772-.264-1.167-.296A17.9 17.9 0 0 0 16.839 3H13v18Z" + /> ); } diff --git a/packages/icons/src/zap.tsx b/packages/icons/src/zap.tsx index 28634c96..c3fe1e5c 100644 --- a/packages/icons/src/zap.tsx +++ b/packages/icons/src/zap.tsx @@ -1,18 +1,12 @@ export function ZapIcon(props: JSX.IntrinsicElements["svg"]) { - return ( - - - - ); + return ( + + + + ); } diff --git a/packages/lume-column-antenas/package.json b/packages/lume-column-antenas/package.json index 98b11a5e..8c1ad890 100644 --- a/packages/lume-column-antenas/package.json +++ b/packages/lume-column-antenas/package.json @@ -8,16 +8,16 @@ "@lume/icons": "workspace:^", "@lume/ui": "workspace:^", "@lume/utils": "workspace:^", - "@tanstack/react-query": "^5.22.2", + "@tanstack/react-query": "^5.24.1", "react": "^18.2.0", - "sonner": "^1.4.1", + "sonner": "^1.4.2", "virtua": "^0.27.5" }, "devDependencies": { "@lume/tailwindcss": "workspace:^", "@lume/tsconfig": "workspace:^", "@lume/types": "workspace:^", - "@types/react": "^18.2.58", + "@types/react": "^18.2.60", "tailwindcss": "^3.4.1", "typescript": "^5.3.3" } diff --git a/packages/lume-column-default/package.json b/packages/lume-column-default/package.json index d4fd9cd0..f639f4b3 100644 --- a/packages/lume-column-default/package.json +++ b/packages/lume-column-default/package.json @@ -8,16 +8,16 @@ "@lume/icons": "workspace:^", "@lume/ui": "workspace:^", "@lume/utils": "workspace:^", - "@tanstack/react-query": "^5.22.2", + "@tanstack/react-query": "^5.24.1", "react": "^18.2.0", - "sonner": "^1.4.1", + "sonner": "^1.4.2", "virtua": "^0.27.5" }, "devDependencies": { "@lume/tailwindcss": "workspace:^", "@lume/tsconfig": "workspace:^", "@lume/types": "workspace:^", - "@types/react": "^18.2.58", + "@types/react": "^18.2.60", "tailwindcss": "^3.4.1", "typescript": "^5.3.3" } diff --git a/packages/lume-column-foryou/package.json b/packages/lume-column-foryou/package.json index cc5b4424..d485f9b3 100644 --- a/packages/lume-column-foryou/package.json +++ b/packages/lume-column-foryou/package.json @@ -8,16 +8,16 @@ "@lume/icons": "workspace:^", "@lume/ui": "workspace:^", "@lume/utils": "workspace:^", - "@tanstack/react-query": "^5.22.2", + "@tanstack/react-query": "^5.24.1", "react": "^18.2.0", - "sonner": "^1.4.1", + "sonner": "^1.4.2", "virtua": "^0.27.5" }, "devDependencies": { "@lume/tailwindcss": "workspace:^", "@lume/tsconfig": "workspace:^", "@lume/types": "workspace:^", - "@types/react": "^18.2.58", + "@types/react": "^18.2.60", "tailwindcss": "^3.4.1", "typescript": "^5.3.3" } diff --git a/packages/lume-column-global/package.json b/packages/lume-column-global/package.json index 399cc73b..f32f537a 100644 --- a/packages/lume-column-global/package.json +++ b/packages/lume-column-global/package.json @@ -8,16 +8,16 @@ "@lume/icons": "workspace:^", "@lume/ui": "workspace:^", "@lume/utils": "workspace:^", - "@tanstack/react-query": "^5.22.2", + "@tanstack/react-query": "^5.24.1", "react": "^18.2.0", - "sonner": "^1.4.1", + "sonner": "^1.4.2", "virtua": "^0.27.5" }, "devDependencies": { "@lume/tailwindcss": "workspace:^", "@lume/tsconfig": "workspace:^", "@lume/types": "workspace:^", - "@types/react": "^18.2.58", + "@types/react": "^18.2.60", "tailwindcss": "^3.4.1", "typescript": "^5.3.3" } diff --git a/packages/lume-column-group/package.json b/packages/lume-column-group/package.json index cfbacfed..0a219b1f 100644 --- a/packages/lume-column-group/package.json +++ b/packages/lume-column-group/package.json @@ -8,16 +8,16 @@ "@lume/icons": "workspace:^", "@lume/ui": "workspace:^", "@lume/utils": "workspace:^", - "@tanstack/react-query": "^5.22.2", + "@tanstack/react-query": "^5.24.1", "react": "^18.2.0", - "sonner": "^1.4.1", + "sonner": "^1.4.2", "virtua": "^0.27.5" }, "devDependencies": { "@lume/tailwindcss": "workspace:^", "@lume/tsconfig": "workspace:^", "@lume/types": "workspace:^", - "@types/react": "^18.2.58", + "@types/react": "^18.2.60", "tailwindcss": "^3.4.1", "typescript": "^5.3.3" } diff --git a/packages/lume-column-hashtag/package.json b/packages/lume-column-hashtag/package.json index 0ee6d645..e6a9abfc 100644 --- a/packages/lume-column-hashtag/package.json +++ b/packages/lume-column-hashtag/package.json @@ -8,16 +8,16 @@ "@lume/icons": "workspace:^", "@lume/ui": "workspace:^", "@lume/utils": "workspace:^", - "@tanstack/react-query": "^5.22.2", + "@tanstack/react-query": "^5.24.1", "react": "^18.2.0", - "sonner": "^1.4.1", + "sonner": "^1.4.2", "virtua": "^0.27.5" }, "devDependencies": { "@lume/tailwindcss": "workspace:^", "@lume/tsconfig": "workspace:^", "@lume/types": "workspace:^", - "@types/react": "^18.2.58", + "@types/react": "^18.2.60", "tailwindcss": "^3.4.1", "typescript": "^5.3.3" } diff --git a/packages/lume-column-thread/package.json b/packages/lume-column-thread/package.json index 9c18552c..f6491153 100644 --- a/packages/lume-column-thread/package.json +++ b/packages/lume-column-thread/package.json @@ -8,16 +8,16 @@ "@lume/icons": "workspace:^", "@lume/ui": "workspace:^", "@lume/utils": "workspace:^", - "@tanstack/react-query": "^5.22.2", + "@tanstack/react-query": "^5.24.1", "react": "^18.2.0", - "sonner": "^1.4.1", + "sonner": "^1.4.2", "virtua": "^0.27.5" }, "devDependencies": { "@lume/tailwindcss": "workspace:^", "@lume/tsconfig": "workspace:^", "@lume/types": "workspace:^", - "@types/react": "^18.2.58", + "@types/react": "^18.2.60", "tailwindcss": "^3.4.1", "typescript": "^5.3.3" } diff --git a/packages/lume-column-timeline/package.json b/packages/lume-column-timeline/package.json index f1b897e7..73c260e5 100644 --- a/packages/lume-column-timeline/package.json +++ b/packages/lume-column-timeline/package.json @@ -8,16 +8,16 @@ "@lume/icons": "workspace:^", "@lume/ui": "workspace:^", "@lume/utils": "workspace:^", - "@tanstack/react-query": "^5.22.2", + "@tanstack/react-query": "^5.24.1", "react": "^18.2.0", - "sonner": "^1.4.1", + "sonner": "^1.4.2", "virtua": "^0.27.5" }, "devDependencies": { "@lume/tailwindcss": "workspace:^", "@lume/tsconfig": "workspace:^", "@lume/types": "workspace:^", - "@types/react": "^18.2.58", + "@types/react": "^18.2.60", "tailwindcss": "^3.4.1", "typescript": "^5.3.3" } diff --git a/packages/lume-column-trending-notes/package.json b/packages/lume-column-trending-notes/package.json index c52c18fa..ca8c830a 100644 --- a/packages/lume-column-trending-notes/package.json +++ b/packages/lume-column-trending-notes/package.json @@ -8,16 +8,16 @@ "@lume/icons": "workspace:^", "@lume/ui": "workspace:^", "@lume/utils": "workspace:^", - "@tanstack/react-query": "^5.22.2", + "@tanstack/react-query": "^5.24.1", "react": "^18.2.0", - "sonner": "^1.4.1", + "sonner": "^1.4.2", "virtua": "^0.27.5" }, "devDependencies": { "@lume/tailwindcss": "workspace:^", "@lume/tsconfig": "workspace:^", "@lume/types": "workspace:^", - "@types/react": "^18.2.58", + "@types/react": "^18.2.60", "tailwindcss": "^3.4.1", "typescript": "^5.3.3" } diff --git a/packages/lume-column-user/package.json b/packages/lume-column-user/package.json index dca6f7ec..7bae7fa6 100644 --- a/packages/lume-column-user/package.json +++ b/packages/lume-column-user/package.json @@ -8,16 +8,16 @@ "@lume/icons": "workspace:^", "@lume/ui": "workspace:^", "@lume/utils": "workspace:^", - "@tanstack/react-query": "^5.22.2", + "@tanstack/react-query": "^5.24.1", "react": "^18.2.0", - "sonner": "^1.4.1", + "sonner": "^1.4.2", "virtua": "^0.27.5" }, "devDependencies": { "@lume/tailwindcss": "workspace:^", "@lume/tsconfig": "workspace:^", "@lume/types": "workspace:^", - "@types/react": "^18.2.58", + "@types/react": "^18.2.60", "tailwindcss": "^3.4.1", "typescript": "^5.3.3" } diff --git a/packages/lume-column-waifu/package.json b/packages/lume-column-waifu/package.json index 4556396f..13cf11c3 100644 --- a/packages/lume-column-waifu/package.json +++ b/packages/lume-column-waifu/package.json @@ -8,14 +8,14 @@ "@lume/icons": "workspace:^", "@lume/ui": "workspace:^", "@lume/utils": "workspace:^", - "@tanstack/react-query": "^5.22.2", + "@tanstack/react-query": "^5.24.1", "react": "^18.2.0" }, "devDependencies": { "@lume/tailwindcss": "workspace:^", "@lume/tsconfig": "workspace:^", "@lume/types": "workspace:^", - "@types/react": "^18.2.58", + "@types/react": "^18.2.60", "tailwindcss": "^3.4.1", "typescript": "^5.3.3" } diff --git a/packages/ui/package.json b/packages/ui/package.json index 85af5909..bfbefa42 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -18,11 +18,10 @@ "@radix-ui/react-hover-card": "^1.0.7", "@radix-ui/react-popover": "^1.0.7", "@radix-ui/react-tooltip": "^1.0.7", - "@tanstack/react-query": "^5.22.2", - "@tanstack/react-router": "^1.16.6", + "@tanstack/react-query": "^5.24.1", + "@tanstack/react-router": "^1.17.4", "framer-motion": "^11.0.6", "get-urls": "^12.1.0", - "jotai": "^2.6.5", "media-chrome": "^2.2.5", "minidenticons": "^4.2.0", "nanoid": "^5.0.6", @@ -34,11 +33,11 @@ "react-hook-form": "^7.50.1", "react-hotkeys-hook": "^4.5.0", "react-i18next": "^14.0.5", - "react-router-dom": "^6.22.1", + "react-router-dom": "^6.22.2", "react-string-replace": "^1.1.1", "slate": "^0.101.5", "slate-react": "^0.101.6", - "sonner": "^1.4.1", + "sonner": "^1.4.2", "string-strip-html": "^13.4.6", "uqr": "^0.1.2", "use-debounce": "^10.0.0", @@ -48,7 +47,7 @@ "@lume/tailwindcss": "workspace:^", "@lume/tsconfig": "workspace:^", "@lume/types": "workspace:^", - "@types/react": "^18.2.58", + "@types/react": "^18.2.60", "tailwindcss": "^3.4.1", "typescript": "^5.3.3" } diff --git a/packages/ui/src/account/active.tsx b/packages/ui/src/account/active.tsx deleted file mode 100644 index eabf1592..00000000 --- a/packages/ui/src/account/active.tsx +++ /dev/null @@ -1,81 +0,0 @@ -import { useArk, useProfile } from "@lume/ark"; -import { SettingsIcon, UserIcon } from "@lume/icons"; -import { cn, useNetworkStatus } from "@lume/utils"; -import * as Avatar from "@radix-ui/react-avatar"; -import * as DropdownMenu from "@radix-ui/react-dropdown-menu"; -import { minidenticon } from "minidenticons"; -import { useMemo } from "react"; -import { useTranslation } from "react-i18next"; -import { LogoutDialog } from "./logoutDialog"; - -export function ActiveAccount() { - const ark = useArk(); - const isOnline = useNetworkStatus(); - const svgURI = useMemo( - () => - `data:image/svg+xml;utf8,${encodeURIComponent( - minidenticon(ark.account.npub, 90, 50), - )}`, - [], - ); - - const { t } = useTranslation(); - const { profile } = useProfile(ark.account.npub); - - return ( - - - - - - {ark.account.npub} - - - - - - - - - {t("user.editProfile")} - - - - - - {t("user.settings")} - - - - - - - - ); -} diff --git a/packages/ui/src/account/logoutDialog.tsx b/packages/ui/src/account/logoutDialog.tsx deleted file mode 100644 index d016a679..00000000 --- a/packages/ui/src/account/logoutDialog.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import { useArk } from "@lume/ark"; -import { LogoutIcon } from "@lume/icons"; -import * as AlertDialog from "@radix-ui/react-alert-dialog"; -import { useQueryClient } from "@tanstack/react-query"; -import { useNavigate } from "@tanstack/react-router"; -import { useTranslation } from "react-i18next"; -import { toast } from "sonner"; - -export function LogoutDialog() { - const ark = useArk(); - const queryClient = useQueryClient(); - const navigate = useNavigate(); - - const { t } = useTranslation(); - - const logout = async () => { - try { - // clear cache - queryClient.clear(); - ark.account = null; - - // redirect to welcome screen - navigate({ to: "/auth/" }); - } catch (e) { - toast.error(String(e)); - } - }; - - return ( - - - - - - - -
-
- - {t("user.logoutConfirmTitle")} - - - {t("user.logoutConfirmSubtitle")} - -
-
- - - - - - -
-
-
-
-
- ); -} diff --git a/packages/ui/src/box.tsx b/packages/ui/src/box.tsx index 2704375f..6681deac 100644 --- a/packages/ui/src/box.tsx +++ b/packages/ui/src/box.tsx @@ -9,9 +9,14 @@ export function Box({ className?: string; }) { return ( -
+
-
+
{children}
diff --git a/packages/ui/src/emptyFeed.tsx b/packages/ui/src/emptyFeed.tsx index 58a8a87a..60479726 100644 --- a/packages/ui/src/emptyFeed.tsx +++ b/packages/ui/src/emptyFeed.tsx @@ -3,28 +3,32 @@ import { cn } from "@lume/utils"; import { useTranslation } from "react-i18next"; export function EmptyFeed({ - text, - subtext, - className, -}: { text?: string; subtext?: string; className?: string }) { - const { t } = useTranslation(); + text, + subtext, + className, +}: { + text?: string; + subtext?: string; + className?: string; +}) { + const { t } = useTranslation(); - return ( -
- -
-

- {text ? text : t("global.emptyFeedTitle")} -

-

- {subtext ? subtext : t("global.emptyFeedSubtitle")} -

-
-
- ); + return ( +
+ +
+

+ {text ? text : t("global.emptyFeedTitle")} +

+

+ {subtext ? subtext : t("global.emptyFeedSubtitle")} +

+
+
+ ); } diff --git a/packages/ui/src/note/buttons/reply.tsx b/packages/ui/src/note/buttons/reply.tsx index 34c01870..b9948f0a 100644 --- a/packages/ui/src/note/buttons/reply.tsx +++ b/packages/ui/src/note/buttons/reply.tsx @@ -1,4 +1,4 @@ -import { ReplyIcon, ShareIcon } from "@lume/icons"; +import { LinkIcon, ReplyIcon } from "@lume/icons"; import * as Tooltip from "@radix-ui/react-tooltip"; import { useTranslation } from "react-i18next"; import { useNoteContext } from "../provider"; @@ -41,8 +41,8 @@ export function NoteReply() { onClick={() => ark.open_thread(event.id)} className="inline-flex h-9 items-center gap-2 rounded-lg px-3 text-sm font-medium text-white hover:bg-neutral-900 focus:outline-none dark:text-black dark:hover:bg-neutral-100" > - - {t("note.buttons.view")} + + {t("note.buttons.open")} diff --git a/packages/ui/src/note/mentions/note.tsx b/packages/ui/src/note/mentions/note.tsx index 519e6d0f..7f149f55 100644 --- a/packages/ui/src/note/mentions/note.tsx +++ b/packages/ui/src/note/mentions/note.tsx @@ -105,7 +105,7 @@ export function MentionNote({ } return ( -
+
diff --git a/packages/ui/src/note/preview/image.tsx b/packages/ui/src/note/preview/image.tsx index 10bdfcf0..139b9ee4 100644 --- a/packages/ui/src/note/preview/image.tsx +++ b/packages/ui/src/note/preview/image.tsx @@ -35,7 +35,10 @@ export function ImagePreview({ url }: { url: string }) { return ( // biome-ignore lint/a11y/useKeyWithClickEvents: -
+
{url}