prepared for ver 0.1.0

This commit is contained in:
Ren Amamiya 2023-02-24 07:54:39 +07:00
parent 4b73715927
commit d1fd80e15a
24 changed files with 19 additions and 23 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 974 B

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 903 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 159 KiB

View File

@ -23,7 +23,7 @@
},
"bundle": {
"active": true,
"category": "DeveloperTool",
"category": "SocialNetworking",
"copyright": "",
"deb": {
"depends": []
@ -36,7 +36,7 @@
"icons/icon.icns",
"icons/icon.ico"
],
"identifier": "com.tauri.dev",
"identifier": "com.uselume.xyz",
"longDescription": "",
"macOS": {
"entitlements": null,

View File

@ -6,7 +6,7 @@ import { ImageCard } from '@components/note/content/preview/imageCard';
import { Video } from '@components/note/content/preview/video';
import dynamic from 'next/dynamic';
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
import ReactPlayer from 'react-player';
const MarkdownPreview = dynamic(() => import('@uiw/react-markdown-preview'), {
@ -14,7 +14,7 @@ const MarkdownPreview = dynamic(() => import('@uiw/react-markdown-preview'), {
loading: () => <div className="h-4 w-36 animate-pulse rounded bg-zinc-700" />,
});
export default function Content({ data }: { data: any }) {
export const Content = memo(function Content({ data }: { data: any }) {
const [preview, setPreview] = useState({});
const content = useRef(data.content);
@ -96,4 +96,4 @@ export default function Content({ data }: { data: any }) {
</div>
</div>
);
}
});

View File

@ -1,5 +1,5 @@
import { UserWithUsername } from '@components/note/atoms/userWithUsername';
import Content from '@components/note/content';
import { Content } from '@components/note/content';
import NoteReply from '@components/note/modal/noteReply';
import { useNostrEvents } from 'nostr-react';
@ -24,7 +24,7 @@ const Modal = ({ event }: { event: any }) => {
<div className="relative h-full overflow-auto rounded-lg border-[0.5px] border-white/30 bg-zinc-800 p-4 shadow-inner">
<div className="flex flex-col gap-4">
<UserWithUsername pubkey={event.pubkey} />
<Content data={event.content} />
<Content data={event} />
</div>
<div className="flex flex-col gap-2 divide-y divide-zinc-700">
{events.map((item) => (

View File

@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { User } from '@components/note/atoms/user';
import Content from '@components/note/content';
import { Content } from '@components/note/content';
export default function NoteReply({ event }: { event: any }) {
return (

View File

@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { UserRepost } from '@components/note/atoms/userRepost';
import Content from '@components/note/content';
import { Content } from '@components/note/content';
import { Placeholder } from '@components/note/placeholder';
import RepostIcon from '@assets/icons/Repost';
@ -24,7 +24,7 @@ export const Repost = memo(function Repost({ root, user }: { root: any; user: st
},
});
if (events !== null) {
if (events !== null && Object.keys(events).length > 0) {
return (
<Dialog.Root>
<Dialog.Trigger>
@ -35,12 +35,12 @@ export const Repost = memo(function Repost({ root, user }: { root: any; user: st
<UserRepost pubkey={user} />
</div>
</div>
<Content data={events[0]} />
{events[0].content && <Content data={events[0]} />}
</div>
<Dialog.Portal>
<Dialog.Overlay className="fixed inset-0 bg-black bg-opacity-30 backdrop-blur-sm data-[state=open]:animate-overlayShow" />
<Dialog.Content className="fixed inset-0 overflow-y-auto">
<Modal event={events[0]} />
{events[0].content && <Modal event={events[0]} />}
</Dialog.Content>
</Dialog.Portal>
</Dialog.Trigger>

View File

@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import Content from '@components/note/content';
import { Content } from '@components/note/content';
import * as Dialog from '@radix-ui/react-dialog';
import dynamic from 'next/dynamic';
@ -12,8 +12,6 @@ const Modal = dynamic(() => import('@components/note/modal'), {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const Single = memo(function Single({ event }: { event: any }) {
console.log(event);
return (
<Dialog.Root>
<Dialog.Trigger asChild>

View File

@ -4,7 +4,7 @@ import OnboardingLayout from '@layouts/onboardingLayout';
import { motion } from 'framer-motion';
import { useRouter } from 'next/router';
import { getPublicKey, nip19 } from 'nostr-tools';
import { nip19 } from 'nostr-tools';
import { JSXElementConstructor, ReactElement, ReactFragment, ReactPortal } from 'react';
import { Resolver, useForm } from 'react-hook-form';
@ -36,17 +36,15 @@ export default function Page() {
} = useForm<FormValues>({ resolver });
const onSubmit = async (data: any) => {
let privKey = data['key'];
let privkey = data['key'];
if (privKey.substring(0, 4) === 'nsec') {
privKey = nip19.decode(privKey).data;
if (privkey.substring(0, 4) === 'nsec') {
privkey = nip19.decode(privkey).data;
}
try {
const pubKey = getPublicKey(privKey);
if (pubKey) {
router.push(`/onboarding/profile/${privKey}`);
if (privkey) {
router.push(`/onboarding/profile/${privkey}`);
}
} catch (error) {
setError('key', {