diff --git a/apps/desktop2/public/antenas.png b/apps/desktop2/public/antenas.png new file mode 100644 index 00000000..0b33465f Binary files /dev/null and b/apps/desktop2/public/antenas.png differ diff --git a/apps/desktop2/public/antenas@2x.png b/apps/desktop2/public/antenas@2x.png new file mode 100644 index 00000000..812aeb24 Binary files /dev/null and b/apps/desktop2/public/antenas@2x.png differ diff --git a/apps/desktop2/public/foryou.png b/apps/desktop2/public/foryou.png new file mode 100644 index 00000000..feade3e1 Binary files /dev/null and b/apps/desktop2/public/foryou.png differ diff --git a/apps/desktop2/public/foryou@2x.png b/apps/desktop2/public/foryou@2x.png new file mode 100644 index 00000000..ee9a9684 Binary files /dev/null and b/apps/desktop2/public/foryou@2x.png differ diff --git a/apps/desktop2/public/global.png b/apps/desktop2/public/global.png new file mode 100644 index 00000000..3ec2cc39 Binary files /dev/null and b/apps/desktop2/public/global.png differ diff --git a/apps/desktop2/public/global@2x.png b/apps/desktop2/public/global@2x.png new file mode 100644 index 00000000..f5d7a9d6 Binary files /dev/null and b/apps/desktop2/public/global@2x.png differ diff --git a/apps/desktop2/public/group.png b/apps/desktop2/public/group.png new file mode 100644 index 00000000..a19b1ed4 Binary files /dev/null and b/apps/desktop2/public/group.png differ diff --git a/apps/desktop2/public/group@2x.png b/apps/desktop2/public/group@2x.png new file mode 100644 index 00000000..9c985a81 Binary files /dev/null and b/apps/desktop2/public/group@2x.png differ diff --git a/apps/desktop2/public/trending.png b/apps/desktop2/public/trending.png new file mode 100644 index 00000000..1b036c02 Binary files /dev/null and b/apps/desktop2/public/trending.png differ diff --git a/apps/desktop2/public/trending@2x.png b/apps/desktop2/public/trending@2x.png new file mode 100644 index 00000000..5e124f31 Binary files /dev/null and b/apps/desktop2/public/trending@2x.png differ diff --git a/apps/desktop2/public/waifu.png b/apps/desktop2/public/waifu.png new file mode 100644 index 00000000..833949c3 Binary files /dev/null and b/apps/desktop2/public/waifu.png differ diff --git a/apps/desktop2/public/waifu@2x.png b/apps/desktop2/public/waifu@2x.png new file mode 100644 index 00000000..484ef2c9 Binary files /dev/null and b/apps/desktop2/public/waifu@2x.png differ diff --git a/apps/desktop2/src/routes/$account.home.tsx b/apps/desktop2/src/routes/$account.home.tsx index fc1fb245..4afe7fa6 100644 --- a/apps/desktop2/src/routes/$account.home.tsx +++ b/apps/desktop2/src/routes/$account.home.tsx @@ -1,6 +1,6 @@ import { Col } from "@/components/col"; import { Toolbar } from "@/components/toolbar"; -import { LoaderIcon } from "@lume/icons"; +import { LoaderIcon, PlusIcon } from "@lume/icons"; import { EventColumns, LumeColumn } from "@lume/types"; import { createFileRoute } from "@tanstack/react-router"; import { UnlistenFn } from "@tauri-apps/api/event"; @@ -13,9 +13,8 @@ export const Route = createFileRoute("/$account/home")({ pendingComponent: Pending, }); -const COLS: LumeColumn[] = [ +const DEFAULT_COLUMNS: LumeColumn[] = [ { id: 1, name: "Newsfeed", content: "/newsfeed" }, - { id: 9999, name: "Lume Store", content: "/store/official" }, ]; function Screen() { @@ -23,7 +22,7 @@ function Screen() { const vlistRef = useRef(null); const unlisten = useRef(null); - const [columns, setColumns] = useState(COLS); + const [columns, setColumns] = useState(DEFAULT_COLUMNS); const [selectedIndex, setSelectedIndex] = useState(-1); const [isScroll, setIsScroll] = useState(false); diff --git a/apps/desktop2/src/routes/store.official.tsx b/apps/desktop2/src/routes/store.official.tsx index 793f794e..70d0813d 100644 --- a/apps/desktop2/src/routes/store.official.tsx +++ b/apps/desktop2/src/routes/store.official.tsx @@ -11,7 +11,8 @@ export const Route = createFileRoute("/store/official")({ name: "For you", content: "/foryou", logo: "", - cover: "", + cover: "/foryou.png", + coverRetina: "/foryou@2x.png", author: "Lume", description: "Keep up to date with content based on your interests.", }, @@ -20,7 +21,8 @@ export const Route = createFileRoute("/store/official")({ name: "Group Feeds", content: "/group", logo: "", - cover: "", + cover: "/group.png", + coverRetina: "/group@2x.png", author: "Lume", description: "Collective of people you're interested in.", }, @@ -29,7 +31,8 @@ export const Route = createFileRoute("/store/official")({ name: "Antenas", content: "/antenas", logo: "", - cover: "", + cover: "/antenas.png", + coverRetina: "/antenas@2x.png", author: "Lume", description: "Keep track to specific content.", }, @@ -38,7 +41,8 @@ export const Route = createFileRoute("/store/official")({ name: "Trending", content: "/trending", logo: "", - cover: "", + cover: "/trending.png", + coverRetina: "/trending@2x.png", author: "Lume", description: "What is trending on Nostr?.", }, @@ -47,7 +51,8 @@ export const Route = createFileRoute("/store/official")({ name: "Global", content: "/global", logo: "", - cover: "", + cover: "/global.png", + coverRetina: "/global@2x.png", author: "Lume", description: "All events from connected relays.", }, @@ -56,7 +61,8 @@ export const Route = createFileRoute("/store/official")({ name: "Waifu", content: "/waifu", logo: "", - cover: "", + cover: "/waifu.png", + coverRetina: "/waifu@2x.png", author: "Lume", description: "Show a random waifu image to boost your morale.", }, @@ -80,11 +86,21 @@ function Screen() { key={column.id} className="relative h-[200px] w-full overflow-hidden rounded-xl bg-gradient-to-tr from-orange-100 to-blue-200 px-3 pt-3" > -
+ {column.cover ? ( + {column.name} + ) : null} +

{column.name}

-

+

{column.description}

diff --git a/packages/icons/src/chevronDown.tsx b/packages/icons/src/chevronDown.tsx index b4d13eea..f6aff9b0 100644 --- a/packages/icons/src/chevronDown.tsx +++ b/packages/icons/src/chevronDown.tsx @@ -1,24 +1,17 @@ import { SVGProps } from "react"; export function ChevronDownIcon( - props: JSX.IntrinsicAttributes & SVGProps, + props: JSX.IntrinsicAttributes & SVGProps, ) { - return ( - - - - ); + return ( + + + + ); } diff --git a/packages/types/index.d.ts b/packages/types/index.d.ts index 90eb9f74..550de669 100644 --- a/packages/types/index.d.ts +++ b/packages/types/index.d.ts @@ -86,8 +86,10 @@ export interface LumeColumn { content: URL | string; description?: string; author?: string; - logo?: URL | string; - cover?: URL | string; + logo?: string; + cover?: string; + coverRetina?: string; + featured?: boolean; } export interface EventColumns { diff --git a/packages/ui/src/column/header.tsx b/packages/ui/src/column/header.tsx index 30d6e8eb..48112f73 100644 --- a/packages/ui/src/column/header.tsx +++ b/packages/ui/src/column/header.tsx @@ -1,4 +1,6 @@ +import { ChevronDownIcon, RefreshIcon } from "@lume/icons"; import { cn } from "@lume/utils"; +import * as DropdownMenu from "@radix-ui/react-dropdown-menu"; export function ColumnHeader({ name, @@ -7,16 +9,40 @@ export function ColumnHeader({ name: string; className?: string; }) { + const reload = () => { + window.location.reload(); + }; + return ( -
-
-
{name}
+ +
+ + +
-
+ + + + + Reload + + + + + ); } diff --git a/packages/ui/src/user/nip05.tsx b/packages/ui/src/user/nip05.tsx index 9ec72d3a..6355860e 100644 --- a/packages/ui/src/user/nip05.tsx +++ b/packages/ui/src/user/nip05.tsx @@ -1,5 +1,5 @@ import { VerifiedIcon } from "@lume/icons"; -import { cn, displayNpub } from "@lume/utils"; +import { cn, displayLongHandle, displayNpub } from "@lume/utils"; import { useQuery } from "@tanstack/react-query"; import { useUserContext } from "./provider"; import { useArk } from "@lume/ark"; @@ -23,7 +23,9 @@ export function UserNip05({ className }: { className?: string }) {

{!user.profile?.nip05 ? displayNpub(user.pubkey, 16) - : user.profile?.nip05.replace("_@", "")} + : user.profile?.nip05.length > 16 + ? displayLongHandle(user.profile?.nip05) + : user.profile.nip05?.replace("_@", "")}

{!isLoading && verified ? ( diff --git a/packages/utils/src/formater.ts b/packages/utils/src/formater.ts index 9532b58e..f11c6afd 100644 --- a/packages/utils/src/formater.ts +++ b/packages/utils/src/formater.ts @@ -65,6 +65,14 @@ export function displayNpub(pubkey: string, len: number) { ); } +export function displayLongHandle(str: string) { + const split = str.split("@"); + const handle = split[0]; + const service = split[1]; + + return handle.substring(0, 16) + "..." + "@" + service; +} + // convert number to K, M, B, T, etc. export const compactNumber = Intl.NumberFormat("en", { notation: "compact" });