diff --git a/apps/desktop/public/heading.png b/apps/desktop/public/heading.png new file mode 100644 index 00000000..d68bfe18 Binary files /dev/null and b/apps/desktop/public/heading.png differ diff --git a/apps/desktop/public/heading@2x.png b/apps/desktop/public/heading@2x.png new file mode 100644 index 00000000..9696e0ea Binary files /dev/null and b/apps/desktop/public/heading@2x.png differ diff --git a/apps/desktop/src/routes/auth/welcome.tsx b/apps/desktop/src/routes/auth/welcome.tsx index 7c7fc18a..a64fd957 100644 --- a/apps/desktop/src/routes/auth/welcome.tsx +++ b/apps/desktop/src/routes/auth/welcome.tsx @@ -1,24 +1,50 @@ +import { SettingsIcon } from "@lume/icons"; import { Link } from "react-router-dom"; export function WelcomeScreen() { return ( -
-
-

Welcome to Nostr!

+
+
+
+
+ lume +

+ Lume is your safe Nostr client to meet, explore and +
+ freely sharing your though to everyone in nostrverse +

+
+
+ + Create New Account + + + Login + +
-
- - Create new account - - - Log in - +
+

+ Before joining Nostr, you can take time to learn more about Nostr{" "} + + here + +

); diff --git a/apps/desktop/src/routes/home/index.tsx b/apps/desktop/src/routes/home/index.tsx index fe586296..52d11966 100644 --- a/apps/desktop/src/routes/home/index.tsx +++ b/apps/desktop/src/routes/home/index.tsx @@ -16,7 +16,7 @@ export function HomeScreen() { const renderItem = (column: IColumn) => { switch (column.kind) { case COL_TYPES.newsfeed: - return ; + return ; case COL_TYPES.thread: return ; case COL_TYPES.user: @@ -24,12 +24,12 @@ export function HomeScreen() { case COL_TYPES.hashtag: return ; default: - return ; + return ; } }; return ( -
+
} diff --git a/packages/ark/src/components/column/header.tsx b/packages/ark/src/components/column/header.tsx index 75cc7cf4..69b03964 100644 --- a/packages/ark/src/components/column/header.tsx +++ b/packages/ark/src/components/column/header.tsx @@ -17,35 +17,35 @@ export function ColumnHeader({ queryKey, icon, }: { - id: string; + id: number; title: string; queryKey?: string[]; icon?: ReactNode; }) { const queryClient = useQueryClient(); - const { removeColumn } = useColumnContext(); + const { moveColumn, removeColumn } = useColumnContext(); const refresh = async () => { if (queryKey) await queryClient.refetchQueries({ queryKey }); }; const moveLeft = async () => { - removeColumn(id); + moveColumn(id, "left"); }; const moveRight = async () => { - removeColumn(id); + moveColumn(id, "right"); }; const deleteWidget = async () => { - removeColumn(id); + await removeColumn(id); }; return ( -
+
-
-
+
+
{icon ? icon : }
{title}
@@ -55,7 +55,7 @@ export function ColumnHeader({ @@ -66,7 +66,7 @@ export function ColumnHeader({ - + - + Pin note - + diff --git a/packages/ark/src/components/note/buttons/reaction.tsx b/packages/ark/src/components/note/buttons/reaction.tsx index e5fdb246..e0c95adc 100644 --- a/packages/ark/src/components/note/buttons/reaction.tsx +++ b/packages/ark/src/components/note/buttons/reaction.tsx @@ -1,7 +1,6 @@ import { ReactionIcon } from "@lume/icons"; import * as HoverCard from "@radix-ui/react-hover-card"; import { useState } from "react"; -import { toast } from "sonner"; import { useNoteContext } from "../provider"; const REACTIONS = [ @@ -49,7 +48,7 @@ export function NoteReaction() { setOpen(false); } catch (e) { - toast.error(e); + console.error(e); } }; @@ -58,22 +57,22 @@ export function NoteReaction() { @@ -81,56 +80,56 @@ export function NoteReaction() {
- + diff --git a/packages/ark/src/components/note/buttons/reply.tsx b/packages/ark/src/components/note/buttons/reply.tsx index 526b4ba9..d9766145 100644 --- a/packages/ark/src/components/note/buttons/reply.tsx +++ b/packages/ark/src/components/note/buttons/reply.tsx @@ -26,15 +26,15 @@ export function NoteReply({ }).toString(), }) } - className="group inline-flex h-7 w-7 items-center justify-center text-neutral-600 dark:text-neutral-400" + className="inline-flex items-center justify-center group h-7 w-7 text-neutral-600 dark:text-neutral-400" > - + - + Quick reply - + diff --git a/packages/ark/src/components/note/buttons/repost.tsx b/packages/ark/src/components/note/buttons/repost.tsx index 65247280..bb9e101c 100644 --- a/packages/ark/src/components/note/buttons/repost.tsx +++ b/packages/ark/src/components/note/buttons/repost.tsx @@ -29,20 +29,20 @@ export function NoteRepost() { - + Repost - + diff --git a/packages/ark/src/components/note/buttons/zap.tsx b/packages/ark/src/components/note/buttons/zap.tsx index 61f1069f..8ab7f12d 100644 --- a/packages/ark/src/components/note/buttons/zap.tsx +++ b/packages/ark/src/components/note/buttons/zap.tsx @@ -107,32 +107,32 @@ export function NoteZap() { - -
-
+ +
+
- + Send tip to{" "} {user?.name || user?.displayName || displayNpub(event.pubkey, 16)} - - + +
-
+
{!invoice ? ( <> -
-
+
+
setAmount(value)} - className="w-full flex-1 border-none bg-transparent text-right text-4xl font-semibold placeholder:text-neutral-600 focus:outline-none focus:ring-0 dark:text-neutral-400" + className="flex-1 w-full text-4xl font-semibold text-right bg-transparent border-none placeholder:text-neutral-600 focus:outline-none focus:ring-0 dark:text-neutral-400" /> - + sats
@@ -186,7 +186,7 @@ export function NoteZap() {
-
+
createZapRequest()} - className="inline-flex h-11 w-full items-center justify-center rounded-lg bg-blue-500 px-4 font-medium text-white hover:bg-blue-600" + className="inline-flex items-center justify-center w-full px-4 font-medium text-white bg-blue-500 rounded-lg h-11 hover:bg-blue-600" > {isCompleted ? (

Successfully zapped

@@ -229,7 +229,7 @@ export function NoteZap() { @@ -238,13 +238,13 @@ export function NoteZap() {
) : ( -
-
+
+

Scan to zap

- + You must use Bitcoin wallet which support Lightning
such as: Blue Wallet, Bitkit, Phoenix,... diff --git a/packages/ark/src/components/note/mentions/hashtag.tsx b/packages/ark/src/components/note/mentions/hashtag.tsx index bfddf5f5..df9f3db0 100644 --- a/packages/ark/src/components/note/mentions/hashtag.tsx +++ b/packages/ark/src/components/note/mentions/hashtag.tsx @@ -7,14 +7,14 @@ export function Hashtag({ tag }: { tag: string }) { return ( diff --git a/packages/ark/src/components/note/mentions/note.tsx b/packages/ark/src/components/note/mentions/note.tsx index c21bc143..8a1c6706 100644 --- a/packages/ark/src/components/note/mentions/note.tsx +++ b/packages/ark/src/components/note/mentions/note.tsx @@ -24,7 +24,7 @@ export const MentionNote = memo(function MentionNote({ if (isLoading) { return ( -
+
Loading
); @@ -32,7 +32,7 @@ export const MentionNote = memo(function MentionNote({ if (isError) { return ( -
+
Failed to fetch event
); @@ -40,11 +40,11 @@ export const MentionNote = memo(function MentionNote({ return ( - -
+ +
-
+
{renderKind(data)} - + {`@${user?.name || user?.displayName || user?.username || "anon"}`} View profile @@ -28,14 +28,14 @@ export const MentionUser = memo(function MentionUser({ diff --git a/packages/ark/src/components/note/preview/image.tsx b/packages/ark/src/components/note/preview/image.tsx index de99f37e..49de8378 100644 --- a/packages/ark/src/components/note/preview/image.tsx +++ b/packages/ark/src/components/note/preview/image.tsx @@ -39,7 +39,7 @@ export function ImagePreview({ url }: { url: string }) { return ( // biome-ignore lint/a11y/useKeyWithClickEvents: -
+
{url}
diff --git a/packages/ark/src/components/note/preview/link.tsx b/packages/ark/src/components/note/preview/link.tsx index bb448a40..4cd00bd1 100644 --- a/packages/ark/src/components/note/preview/link.tsx +++ b/packages/ark/src/components/note/preview/link.tsx @@ -11,11 +11,11 @@ export function LinkPreview({ url }: { url: string }) { if (status === "pending") { return ( -
-
+
+
-
-
+
+
{domain.hostname} @@ -42,29 +42,29 @@ export function LinkPreview({ url }: { url: string }) { to={url} target="_blank" rel="noreferrer" - className="flex w-full flex-col rounded-lg bg-neutral-100 dark:bg-neutral-900" + className="flex flex-col w-full my-1 overflow-hidden rounded-lg bg-neutral-100 dark:bg-neutral-900" > {isImage(data.image) ? ( {url} ) : null}
{data.title ? ( -
+
{data.title}
) : null} {data.description ? ( -
+
{data.description}
) : null}
-
+
{domain.hostname}
diff --git a/packages/ark/src/components/note/preview/video.tsx b/packages/ark/src/components/note/preview/video.tsx index 5c3b757c..17b596fb 100644 --- a/packages/ark/src/components/note/preview/video.tsx +++ b/packages/ark/src/components/note/preview/video.tsx @@ -8,7 +8,7 @@ export function VideoPreview({ url }: { url: string }) { return ( diff --git a/packages/ark/src/provider.tsx b/packages/ark/src/provider.tsx index 546e9559..c89429d6 100644 --- a/packages/ark/src/provider.tsx +++ b/packages/ark/src/provider.tsx @@ -94,7 +94,7 @@ const LumeProvider = ({ children }: PropsWithChildren) => { const sqliteAdapter = await Database.load("sqlite:lume_v2.db"); const storage = new LumeStorage(sqliteAdapter, platformName); - storage.init(); + await storage.init(); // check for new update if (storage.settings.autoupdate) { @@ -193,9 +193,9 @@ const LumeProvider = ({ children }: PropsWithChildren) => { return (
-
+
TIP:
) => {
- +

{isNewVersion ? "Found a new version, updating..." : "Starting..."}

diff --git a/packages/icons/src/settings.tsx b/packages/icons/src/settings.tsx index 5267f06e..569ea943 100644 --- a/packages/icons/src/settings.tsx +++ b/packages/icons/src/settings.tsx @@ -1,27 +1,31 @@ -import { SVGProps } from 'react'; +import { SVGProps } from "react"; -export function SettingsIcon(props: JSX.IntrinsicAttributes & SVGProps) { - return ( - - - - - ); +export function SettingsIcon( + props: JSX.IntrinsicAttributes & SVGProps, +) { + return ( + + + + + ); } diff --git a/packages/storage/index.ts b/packages/storage/index.ts index dbc00186..fc657cce 100644 --- a/packages/storage/index.ts +++ b/packages/storage/index.ts @@ -1,10 +1,10 @@ import { Account, + IColumn, NDKCacheEvent, NDKCacheEventTag, NDKCacheUser, NDKCacheUserProfile, - WidgetProps, } from "@lume/types"; import { appConfigDir, resolveResource } from "@tauri-apps/api/path"; import { invoke } from "@tauri-apps/api/primitives"; @@ -323,7 +323,7 @@ export class LumeStorage { } public async getWidgets() { - const widgets: Array = await this.#db.select( + const widgets: Array = await this.#db.select( "SELECT * FROM widgets WHERE account_id = $1 ORDER BY created_at DESC;", [this.account.id], ); @@ -341,7 +341,7 @@ export class LumeStorage { ); if (insert) { - const widgets: Array = await this.#db.select( + const widgets: Array = await this.#db.select( "SELECT * FROM widgets ORDER BY id DESC LIMIT 1;", ); if (widgets.length < 1) console.error("get created widget failed"); @@ -351,7 +351,7 @@ export class LumeStorage { console.error("create widget failed"); } - public async removeWidget(id: string) { + public async removeWidget(id: number) { const res = await this.#db.execute("DELETE FROM widgets WHERE id = $1;", [ id, ]); diff --git a/packages/types/index.d.ts b/packages/types/index.d.ts index cc21f301..d061216b 100644 --- a/packages/types/index.d.ts +++ b/packages/types/index.d.ts @@ -34,7 +34,7 @@ export interface WidgetGroupItem { } export interface IColumn { - id?: string; + id?: number; kind: number; title: string; content: string; diff --git a/packages/ui/src/layouts/auth.tsx b/packages/ui/src/layouts/auth.tsx index 2d3c484f..b1188cb2 100644 --- a/packages/ui/src/layouts/auth.tsx +++ b/packages/ui/src/layouts/auth.tsx @@ -1,24 +1,23 @@ -import { cn } from "@lume/utils"; +import { SettingsIcon } from "@lume/icons"; import { type Platform } from "@tauri-apps/plugin-os"; -import { Outlet, ScrollRestoration } from "react-router-dom"; +import { Outlet } from "react-router-dom"; import { WindowTitleBar } from "../titlebar"; export function AuthLayout({ platform }: { platform: Platform }) { return ( -
+
{platform !== "macos" ? ( ) : (
)} -
+
+
+
+ +
+
-
); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 402e9641..e5841f25 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -472,6 +472,9 @@ importers: '@lume/tsconfig': specifier: workspace:^ version: link:../../tsconfig + '@lume/types': + specifier: workspace:^ + version: link:../../types '@types/react': specifier: ^18.2.46 version: 18.2.46 diff --git a/src-tauri/tauri.linux.conf.json b/src-tauri/tauri.linux.conf.json index 279dfe60..9e47392d 100644 --- a/src-tauri/tauri.linux.conf.json +++ b/src-tauri/tauri.linux.conf.json @@ -1,21 +1,21 @@ { - "$schema": "../node_modules/@tauri-apps/cli/schema.json", - "tauri": { - "windows": [ - { - "width": 1080, - "height": 800, - "minWidth": 560, - "minHeight": 800, - "resizable": true, - "title": "Lume", - "center": true, - "fullscreen": false, - "hiddenTitle": true, - "fileDropEnabled": true, - "decorations": false, - "transparent": false - } - ] - } + "$schema": "../node_modules/@tauri-apps/cli/schema.json", + "tauri": { + "windows": [ + { + "width": 1080, + "height": 800, + "minWidth": 1080, + "minHeight": 800, + "resizable": true, + "title": "Lume", + "center": true, + "fullscreen": false, + "hiddenTitle": true, + "fileDropEnabled": true, + "decorations": false, + "transparent": false + } + ] + } } diff --git a/src-tauri/tauri.macos.conf.json b/src-tauri/tauri.macos.conf.json index 68e7d7e0..e0cb1d5e 100644 --- a/src-tauri/tauri.macos.conf.json +++ b/src-tauri/tauri.macos.conf.json @@ -1,25 +1,25 @@ { - "$schema": "../node_modules/@tauri-apps/cli/schema.json", - "tauri": { - "windows": [ - { - "width": 1080, - "height": 800, - "minWidth": 560, - "minHeight": 800, - "resizable": true, - "title": "Lume", - "titleBarStyle": "Overlay", - "center": true, - "fullscreen": false, - "hiddenTitle": true, - "fileDropEnabled": true, - "decorations": true, - "transparent": true, - "windowEffects": { - "effects": ["sidebar"] - } - } - ] - } + "$schema": "../node_modules/@tauri-apps/cli/schema.json", + "tauri": { + "windows": [ + { + "width": 1080, + "height": 800, + "minWidth": 1080, + "minHeight": 800, + "resizable": true, + "title": "Lume", + "titleBarStyle": "Overlay", + "center": true, + "fullscreen": false, + "hiddenTitle": true, + "fileDropEnabled": true, + "decorations": true, + "transparent": true, + "windowEffects": { + "effects": ["sidebar"] + } + } + ] + } } diff --git a/src-tauri/tauri.windows.conf.json b/src-tauri/tauri.windows.conf.json index e3b444c5..2ce30690 100644 --- a/src-tauri/tauri.windows.conf.json +++ b/src-tauri/tauri.windows.conf.json @@ -1,24 +1,24 @@ { - "$schema": "../node_modules/@tauri-apps/cli/schema.json", - "tauri": { - "windows": [ - { - "width": 1080, - "height": 800, - "minWidth": 560, - "minHeight": 800, - "resizable": true, - "title": "Lume", - "center": true, - "fullscreen": false, - "hiddenTitle": true, - "fileDropEnabled": true, - "decorations": false, - "transparent": true, - "windowEffects": { - "effects": ["micaLight", "micaDark"] - } - } - ] - } + "$schema": "../node_modules/@tauri-apps/cli/schema.json", + "tauri": { + "windows": [ + { + "width": 1080, + "height": 800, + "minWidth": 1080, + "minHeight": 800, + "resizable": true, + "title": "Lume", + "center": true, + "fullscreen": false, + "hiddenTitle": true, + "fileDropEnabled": true, + "decorations": false, + "transparent": true, + "windowEffects": { + "effects": ["micaLight", "micaDark"] + } + } + ] + } }