feat: fix errros

This commit is contained in:
reya 2024-01-16 08:37:42 +07:00
parent 7744a5e17c
commit 939dfd9cc1
25 changed files with 461 additions and 715 deletions

View File

@ -32,7 +32,7 @@
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-switch": "^1.0.3",
"@radix-ui/react-tooltip": "^1.0.7",
"@tanstack/react-query": "^5.17.9",
"@tanstack/react-query": "^5.17.12",
"@tauri-apps/api": "2.0.0-alpha.13",
"@tauri-apps/plugin-autostart": "2.0.0-alpha.5",
"@tauri-apps/plugin-clipboard-manager": "2.0.0-alpha.5",
@ -62,14 +62,14 @@
"smol-toml": "^1.1.3",
"sonner": "^1.3.1",
"unique-names-generator": "^4.7.1",
"virtua": "^0.20.4"
"virtua": "^0.20.5"
},
"devDependencies": {
"@lume/tailwindcss": "workspace:^",
"@lume/tsconfig": "workspace:^",
"@lume/types": "workspace:^",
"@types/node": "^20.11.0",
"@types/react": "^18.2.47",
"@types/node": "^20.11.3",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@vitejs/plugin-react-swc": "^3.5.0",
"autoprefixer": "^10.4.16",

View File

@ -269,42 +269,6 @@ export default function Router() {
return { Component: OnboardingScreen };
},
},
{
path: "tutorials/note",
async lazy() {
const { TutorialNoteScreen } = await import(
"./routes/auth/tutorials/note"
);
return { Component: TutorialNoteScreen };
},
},
{
path: "tutorials/widget",
async lazy() {
const { TutorialWidgetScreen } = await import(
"./routes/auth/tutorials/widget"
);
return { Component: TutorialWidgetScreen };
},
},
{
path: "tutorials/posting",
async lazy() {
const { TutorialPostingScreen } = await import(
"./routes/auth/tutorials/posting"
);
return { Component: TutorialPostingScreen };
},
},
{
path: "tutorials/finish",
async lazy() {
const { TutorialFinishScreen } = await import(
"./routes/auth/tutorials/finish"
);
return { Component: TutorialFinishScreen };
},
},
],
},
]);

View File

@ -1,46 +0,0 @@
import { Link } from "react-router-dom";
export function TutorialFinishScreen() {
return (
<div className="flex h-full w-full items-center justify-center">
<div className="mx-auto flex w-full max-w-md flex-col gap-10">
<div className="text-center">
<img
src="/icon.png"
alt="Lume's logo"
className="mx-auto mb-1 h-auto w-16"
/>
<h1 className="text-2xl font-light">
Yo, you&apos;ve understood basic features 🎉
</h1>
</div>
<div className="flex flex-col gap-2">
<Link
to="/"
className="inline-flex h-11 w-full items-center justify-center rounded-lg bg-blue-500 font-medium text-white hover:bg-blue-600"
>
Start using Lume
</Link>
<Link
to="https://nostr.how/"
target="_blank"
className="inline-flex h-11 w-full items-center justify-center rounded-lg bg-neutral-100 font-medium hover:bg-neutral-200 dark:bg-neutral-900 dark:hover:bg-neutral-800"
>
Learn more about Nostr
</Link>
<p className="text-center text-sm font-medium text-neutral-500 dark:text-neutral-600">
If you&apos;ve trouble when user Lume, you can report the issue{" "}
<a
href="github.com/luminous-devs/lume"
target="_blank"
className="text-blue-500 !underline"
rel="noreferrer"
>
here
</a>
</p>
</div>
</div>
</div>
);
}

View File

@ -1,102 +0,0 @@
import { TextNote } from "@lume/ark";
import {
EditIcon,
ReactionIcon,
ReplyIcon,
RepostIcon,
ZapIcon,
} from "@lume/icons";
import { NDKEvent } from "@nostr-dev-kit/ndk";
import { Link } from "react-router-dom";
export function TutorialNoteScreen() {
const exampleEvent = new NDKEvent(undefined, {
id: "a3527670dd9b178bf7c2a9ea673b63bc8bfe774942b196691145343623c45821",
pubkey: "04c915daefee38317fa734444acee390a8269fe5810b2241e5e6dd343dfbecc9",
created_at: 1701355223,
kind: 1,
tags: [],
content: "good morning nostr, stay humble and stack sats 🫡",
sig: "9e0bd67ec25598744f20bff0fe360fdf190c4240edb9eea260e50f77e07f94ea767ececcc6270819b7f64e5e7ca1fe20b4971f46dc120e6db43114557f3a6dae",
});
return (
<div className="flex h-full w-full select-text items-center justify-center">
<div className="mx-auto flex w-full max-w-md flex-col gap-10">
<div className="flex flex-col items-center gap-3">
<div className="inline-flex h-11 w-11 items-center justify-center rounded-lg bg-neutral-100 dark:bg-neutral-900">
<EditIcon className="h-5 w-5" />
</div>
<h1 className="text-2xl font-light">
What is a <span className="font-bold">Note?</span>
</h1>
</div>
<div className="flex flex-col gap-2">
<p className="px-3">
Posts on Nostr based Social Network client are usually called
&apos;Notes.&apos; Notes are arranged chronologically on the
timeline and are updated in real-time.
</p>
<p className="px-3 font-semibold">Here is one example:</p>
<TextNote event={exampleEvent} />
<p className="px-3 font-semibold">
Here are how you can interact with a note:
</p>
<div className="flex flex-col gap-2 px-3">
<div className="inline-flex gap-3">
<div className="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-neutral-100 dark:bg-neutral-900">
<ReplyIcon className="h-5 w-5 text-blue-500" />
</div>
<p>
Reply - Click on this button to reply to a note. It&apos;s also
possible to reply to replies, continuing the conversation like a
thread.
</p>
</div>
<div className="inline-flex gap-3">
<div className="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-neutral-100 dark:bg-neutral-900">
<ReactionIcon className="h-5 w-5 text-red-500" />
</div>
<p>
Reaction - You can add reactions to the Note to express your
concern.
</p>
</div>
<div className="inline-flex gap-3">
<div className="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-neutral-100 dark:bg-neutral-900">
<RepostIcon className="h-5 w-5 text-teal-500" />
</div>
<p>
Repost - You can share that note to your own timeline. You can
also quote them with your comments.
</p>
</div>
<div className="inline-flex gap-3">
<div className="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-neutral-100 dark:bg-neutral-900">
<ZapIcon className="h-5 w-5 text-orange-500" />
</div>
<p>
Zap - You can send tip in Bitcoin to that note owner with
zero-fees
</p>
</div>
</div>
<div className="mt-5 flex gap-2 px-3">
<Link
to="/auth/finish"
className="inline-flex h-9 w-full items-center justify-center rounded-lg bg-neutral-100 font-medium hover:bg-neutral-200 dark:bg-neutral-900 dark:hover:bg-neutral-800"
>
Back
</Link>
<Link
to="/auth/tutorials/widget"
className="inline-flex h-9 w-full items-center justify-center rounded-lg bg-blue-500 font-medium text-white hover:bg-blue-600"
>
Continue
</Link>
</div>
</div>
</div>
</div>
);
}

View File

@ -1,3 +0,0 @@
export function TutorialPostingScreen() {
return <div></div>;
}

View File

@ -1,67 +0,0 @@
import { BellIcon, HomeIcon, PlusIcon } from "@lume/icons";
import { Link } from "react-router-dom";
export function TutorialWidgetScreen() {
return (
<div className="flex h-full w-full select-text items-center justify-center">
<div className="mx-auto flex w-full max-w-md flex-col gap-10">
<div className="flex flex-col items-center gap-3">
<div className="inline-flex h-11 w-11 items-center justify-center rounded-lg bg-neutral-100 dark:bg-neutral-900">
<HomeIcon className="h-5 w-5" />
</div>
<h1 className="text-2xl font-light">
The concept of <span className="font-bold">Widgets</span>
</h1>
</div>
<div className="flex flex-col gap-2 px-3">
<p>
Lume provides multiple widgets based on usage. You always can
control what you need to show on your Home.
</p>
<p className="font-semibold">Default widgets:</p>
<div className="inline-flex gap-3">
<div className="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-neutral-100 dark:bg-neutral-900">
<HomeIcon className="h-5 w-5" />
</div>
<p>Newsfeed - You can view notes from accounts you follow.</p>
</div>
<div className="inline-flex gap-3">
<div className="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-neutral-100 dark:bg-neutral-900">
<BellIcon className="h-5 w-5" />
</div>
<p>
Notification - You can view all notifications related to your
account.
</p>
</div>
<p>
If you want to add more widget, you can click to this button on Home
Screen.
</p>
<div className="flex h-24 w-full items-center justify-center rounded-lg bg-neutral-100 dark:bg-neutral-900">
<button
type="button"
className="inline-flex h-14 w-14 items-center justify-center rounded-full bg-neutral-200 text-neutral-900 hover:bg-neutral-300 dark:bg-neutral-800 dark:text-neutral-100 dark:hover:bg-neutral-700"
>
<PlusIcon className="h-5 w-5" />
</button>
</div>
<div className="mt-5 flex gap-2">
<Link
to="/auth/tutorials/note"
className="inline-flex h-9 w-full items-center justify-center rounded-lg bg-neutral-100 font-medium hover:bg-neutral-200 dark:bg-neutral-900 dark:hover:bg-neutral-800"
>
Back
</Link>
<Link
to="/auth/tutorials/finish"
className="inline-flex h-9 w-full items-center justify-center rounded-lg bg-blue-500 font-medium text-white hover:bg-blue-600"
>
Continue
</Link>
</div>
</div>
</div>
</div>
);
}

View File

@ -5,7 +5,6 @@ import {
PlusIcon,
UnverifiedIcon,
} from "@lume/icons";
import { useStorage } from "@lume/storage";
import { NDKKind, NDKUserProfile } from "@nostr-dev-kit/ndk";
import { useQueryClient } from "@tanstack/react-query";
import { message } from "@tauri-apps/plugin-dialog";
@ -20,7 +19,6 @@ export function EditProfileScreen() {
const [nip05, setNIP05] = useState({ verified: true, text: "" });
const ark = useArk();
const storage = useStorage();
const {
register,
@ -56,7 +54,7 @@ export function EditProfileScreen() {
setLoading(true);
const image = await ark.upload({});
const image = await ark.upload({ fileExts: [] });
if (image) {
setPicture(image);
setLoading(false);
@ -74,7 +72,7 @@ export function EditProfileScreen() {
try {
setLoading(true);
const image = await ark.upload({});
const image = await ark.upload({ fileExts: [] });
if (image) {
setBanner(image);

View File

@ -18,7 +18,7 @@
"@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.17.9",
"@tanstack/react-query": "^5.17.12",
"@tauri-apps/api": "2.0.0-alpha.13",
"@tauri-apps/plugin-clipboard-manager": "2.0.0-alpha.5",
"@tauri-apps/plugin-dialog": "2.0.0-alpha.5",
@ -52,7 +52,7 @@
"@lume/tailwindcss": "workspace:^",
"@lume/tsconfig": "workspace:^",
"@lume/types": "workspace:^",
"@types/react": "^18.2.47",
"@types/react": "^18.2.48",
"tailwind-merge": "^2.2.0",
"tailwindcss": "^3.4.1",
"typescript": "^5.3.3"

View File

@ -8,7 +8,7 @@
},
"devDependencies": {
"@lume/tsconfig": "workspace:*",
"@types/react": "^18.2.47",
"@types/react": "^18.2.48",
"typescript": "^5.3.3"
}
}

View File

@ -9,17 +9,17 @@
"@lume/ui": "workspace:^",
"@lume/utils": "workspace:^",
"@nostr-dev-kit/ndk": "^2.3.2",
"@tanstack/react-query": "^5.17.9",
"@tanstack/react-query": "^5.17.12",
"react": "^18.2.0",
"react-router-dom": "^6.21.2",
"sonner": "^1.3.1",
"virtua": "^0.20.4"
"virtua": "^0.20.5"
},
"devDependencies": {
"@lume/tailwindcss": "workspace:^",
"@lume/tsconfig": "workspace:^",
"@lume/types": "workspace:^",
"@types/react": "^18.2.47",
"@types/react": "^18.2.48",
"tailwind": "^4.0.0",
"typescript": "^5.3.3"
}

View File

@ -9,17 +9,17 @@
"@lume/ui": "workspace:^",
"@lume/utils": "workspace:^",
"@nostr-dev-kit/ndk": "^2.3.2",
"@tanstack/react-query": "^5.17.9",
"@tanstack/react-query": "^5.17.12",
"react": "^18.2.0",
"react-router-dom": "^6.21.2",
"sonner": "^1.3.1",
"virtua": "^0.20.4"
"virtua": "^0.20.5"
},
"devDependencies": {
"@lume/tailwindcss": "workspace:^",
"@lume/tsconfig": "workspace:^",
"@lume/types": "workspace:^",
"@types/react": "^18.2.47",
"@types/react": "^18.2.48",
"tailwind": "^4.0.0",
"typescript": "^5.3.3"
}

View File

@ -9,17 +9,17 @@
"@lume/ui": "workspace:^",
"@lume/utils": "workspace:^",
"@nostr-dev-kit/ndk": "^2.3.2",
"@tanstack/react-query": "^5.17.9",
"@tanstack/react-query": "^5.17.12",
"react": "^18.2.0",
"react-router-dom": "^6.21.2",
"sonner": "^1.3.1",
"virtua": "^0.20.4"
"virtua": "^0.20.5"
},
"devDependencies": {
"@lume/tailwindcss": "workspace:^",
"@lume/tsconfig": "workspace:^",
"@lume/types": "workspace:^",
"@types/react": "^18.2.47",
"@types/react": "^18.2.48",
"tailwind": "^4.0.0",
"typescript": "^5.3.3"
}

View File

@ -9,17 +9,17 @@
"@lume/ui": "workspace:^",
"@lume/utils": "workspace:^",
"@nostr-dev-kit/ndk": "^2.3.2",
"@tanstack/react-query": "^5.17.9",
"@tanstack/react-query": "^5.17.12",
"react": "^18.2.0",
"react-router-dom": "^6.21.2",
"sonner": "^1.3.1",
"virtua": "^0.20.4"
"virtua": "^0.20.5"
},
"devDependencies": {
"@lume/tailwindcss": "workspace:^",
"@lume/tsconfig": "workspace:^",
"@lume/types": "workspace:^",
"@types/react": "^18.2.47",
"@types/react": "^18.2.48",
"tailwind": "^4.0.0",
"typescript": "^5.3.3"
}

View File

@ -9,17 +9,17 @@
"@lume/ui": "workspace:^",
"@lume/utils": "workspace:^",
"@nostr-dev-kit/ndk": "^2.3.2",
"@tanstack/react-query": "^5.17.9",
"@tanstack/react-query": "^5.17.12",
"react": "^18.2.0",
"react-router-dom": "^6.21.2",
"sonner": "^1.3.1",
"virtua": "^0.20.4"
"virtua": "^0.20.5"
},
"devDependencies": {
"@lume/tailwindcss": "workspace:^",
"@lume/tsconfig": "workspace:^",
"@lume/types": "workspace:^",
"@types/react": "^18.2.47",
"@types/react": "^18.2.48",
"tailwind": "^4.0.0",
"typescript": "^5.3.3"
}

View File

@ -9,17 +9,17 @@
"@lume/ui": "workspace:^",
"@lume/utils": "workspace:^",
"@nostr-dev-kit/ndk": "^2.3.2",
"@tanstack/react-query": "^5.17.9",
"@tanstack/react-query": "^5.17.12",
"react": "^18.2.0",
"react-router-dom": "^6.21.2",
"sonner": "^1.3.1",
"virtua": "^0.20.4"
"virtua": "^0.20.5"
},
"devDependencies": {
"@lume/tailwindcss": "workspace:^",
"@lume/tsconfig": "workspace:^",
"@lume/types": "workspace:^",
"@types/react": "^18.2.47",
"@types/react": "^18.2.48",
"tailwind": "^4.0.0",
"typescript": "^5.3.3"
}

View File

@ -9,17 +9,17 @@
"@lume/ui": "workspace:^",
"@lume/utils": "workspace:^",
"@nostr-dev-kit/ndk": "^2.3.2",
"@tanstack/react-query": "^5.17.9",
"@tanstack/react-query": "^5.17.12",
"react": "^18.2.0",
"react-router-dom": "^6.21.2",
"sonner": "^1.3.1",
"virtua": "^0.20.4"
"virtua": "^0.20.5"
},
"devDependencies": {
"@lume/tailwindcss": "workspace:^",
"@lume/tsconfig": "workspace:^",
"@lume/types": "workspace:^",
"@types/react": "^18.2.47",
"@types/react": "^18.2.48",
"tailwind": "^4.0.0",
"typescript": "^5.3.3"
}

View File

@ -9,17 +9,17 @@
"@lume/ui": "workspace:^",
"@lume/utils": "workspace:^",
"@nostr-dev-kit/ndk": "^2.3.2",
"@tanstack/react-query": "^5.17.9",
"@tanstack/react-query": "^5.17.12",
"react": "^18.2.0",
"react-router-dom": "^6.21.2",
"sonner": "^1.3.1",
"virtua": "^0.20.4"
"virtua": "^0.20.5"
},
"devDependencies": {
"@lume/tailwindcss": "workspace:^",
"@lume/tsconfig": "workspace:^",
"@lume/types": "workspace:^",
"@types/react": "^18.2.47",
"@types/react": "^18.2.48",
"tailwind": "^4.0.0",
"typescript": "^5.3.3"
}

View File

@ -17,7 +17,7 @@
},
"devDependencies": {
"@lume/tsconfig": "workspace:*",
"@types/react": "^18.2.47",
"@types/react": "^18.2.48",
"typescript": "^5.3.3"
}
}

View File

@ -18,7 +18,7 @@
"devDependencies": {
"@lume/tsconfig": "workspace:*",
"@lume/types": "workspace:*",
"@types/react": "^18.2.47",
"@types/react": "^18.2.48",
"typescript": "^5.3.3"
}
}

View File

@ -17,7 +17,7 @@
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-hover-card": "^1.0.7",
"@radix-ui/react-popover": "^1.0.7",
"@tanstack/react-query": "^5.17.9",
"@tanstack/react-query": "^5.17.12",
"@tauri-apps/api": "2.0.0-alpha.13",
"@tauri-apps/plugin-http": "2.0.0-alpha.6",
"@tauri-apps/plugin-os": "2.0.0-alpha.6",
@ -28,19 +28,19 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.49.3",
"react-hotkeys-hook": "^4.4.3",
"react-hotkeys-hook": "^4.4.4",
"react-router-dom": "^6.21.2",
"slate": "^0.101.5",
"slate-react": "^0.101.5",
"sonner": "^1.3.1",
"uqr": "^0.1.2",
"virtua": "^0.20.4"
"virtua": "^0.20.5"
},
"devDependencies": {
"@lume/tailwindcss": "workspace:^",
"@lume/tsconfig": "workspace:^",
"@lume/types": "workspace:^",
"@types/react": "^18.2.47",
"@types/react": "^18.2.48",
"tailwind-merge": "^2.2.0",
"tailwindcss": "^3.4.1",
"typescript": "^5.3.3"

View File

@ -1,5 +1,5 @@
import { useArk } from "@lume/ark";
import { CheckIcon, LoaderIcon } from "@lume/icons";
import { useStorage } from "@lume/storage";
import { onboardingAtom } from "@lume/utils";
import { useQueryClient } from "@tanstack/react-query";
import { motion } from "framer-motion";
@ -7,7 +7,7 @@ import { useSetAtom } from "jotai";
import { useState } from "react";
export function OnboardingFinishScreen() {
const storage = useStorage();
const ark = useArk();
const queryClient = useQueryClient();
const setOnboarding = useSetAtom(onboardingAtom);

View File

@ -1,6 +1,7 @@
import { Reply, useArk } from "@lume/ark";
import { LoaderIcon } from "@lume/icons";
import { NDKEventWithReplies } from "@lume/types";
import { type NDKSubscription } from "@nostr-dev-kit/ndk";
import { useEffect, useState } from "react";
import { twMerge } from "tailwind-merge";
@ -13,7 +14,7 @@ export function ReplyList({
const [data, setData] = useState<null | NDKEventWithReplies[]>(null);
useEffect(() => {
let sub;
let sub: NDKSubscription;
let isCancelled = false;
async function fetchRepliesAndSub() {

View File

@ -8,7 +8,7 @@
"access": "public"
},
"dependencies": {
"@tanstack/react-query": "^5.17.9",
"@tanstack/react-query": "^5.17.12",
"@tauri-apps/api": "2.0.0-alpha.13",
"@tauri-apps/plugin-notification": "2.0.0-alpha.5",
"clsx": "^2.1.0",
@ -21,7 +21,7 @@
"devDependencies": {
"@lume/tsconfig": "workspace:^",
"@lume/types": "workspace:^",
"@types/react": "^18.2.47",
"@types/react": "^18.2.48",
"typescript": "^5.3.3"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
"withGlobalTauri": true
},
"package": {
"productName": "Lume",
"productName": "Lume 3",
"version": "3.0.0"
},
"plugins": {