From 41b12746a7f89cab58d8b5561a51f20403b980da Mon Sep 17 00:00:00 2001 From: Ren Amamiya <123083837+reyamir@users.noreply.github.com> Date: Sun, 24 Sep 2023 09:13:42 +0700 Subject: [PATCH] wip --- src-tauri/Cargo.toml | 3 +-- src-tauri/tauri.conf.json | 3 +-- src-tauri/tauri.macos.conf.json | 1 + src/shared/notes/actions.tsx | 4 ++-- src/shared/notes/actions/more.tsx | 4 ++-- src/shared/notes/actions/reaction.tsx | 4 ++-- src/shared/notes/actions/reply.tsx | 4 ++-- src/shared/notes/actions/repost.tsx | 6 +++--- src/shared/notes/actions/zap.tsx | 4 ++-- src/shared/notes/child.tsx | 12 +++++------ src/shared/notes/kinds/repost.tsx | 10 ++++----- src/shared/notes/preview/video.tsx | 2 +- src/shared/notes/wrapper.tsx | 6 +++--- src/shared/user.tsx | 30 +++++++++++++-------------- src/shared/widgets/wrapper.tsx | 8 +++---- 15 files changed, 50 insertions(+), 51 deletions(-) diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 41e22308..5fb1f6d0 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -16,11 +16,10 @@ tauri-build = { version = "1.4", features = [] } [dependencies] serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } -tauri = { version = "1.4", features = [ +tauri = { version = "1.4", features = [ "macos-private-api", "window-close", "window-print", "window-create", - "macos-private-api", "fs-read-dir", "fs-read-file", "window-start-dragging", diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 32ab8d23..b4299e4b 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -136,7 +136,6 @@ "enableTauriAPI": true } ] - }, - "macOSPrivateApi": true + } } } diff --git a/src-tauri/tauri.macos.conf.json b/src-tauri/tauri.macos.conf.json index 443a00c7..1386b524 100644 --- a/src-tauri/tauri.macos.conf.json +++ b/src-tauri/tauri.macos.conf.json @@ -1,6 +1,7 @@ { "$schema": "../node_modules/@tauri-apps/cli/schema.json", "tauri": { + "macOSPrivateApi": true, "windows": [ { "width": 400, diff --git a/src/shared/notes/actions.tsx b/src/shared/notes/actions.tsx index 1fcb29f5..080ab714 100644 --- a/src/shared/notes/actions.tsx +++ b/src/shared/notes/actions.tsx @@ -45,7 +45,7 @@ export function NoteActions({ to={`/notes/text/${id}`} className="group inline-flex h-7 w-7 items-center justify-center" > - + @@ -68,7 +68,7 @@ export function NoteActions({ } className="group inline-flex h-7 w-7 items-center justify-center" > - + diff --git a/src/shared/notes/actions/more.tsx b/src/shared/notes/actions/more.tsx index 2f2f05e3..d636c49e 100644 --- a/src/shared/notes/actions/more.tsx +++ b/src/shared/notes/actions/more.tsx @@ -30,9 +30,9 @@ export function MoreActions({ id, pubkey }: { id: string; pubkey: string }) { diff --git a/src/shared/notes/actions/reaction.tsx b/src/shared/notes/actions/reaction.tsx index 17ba08e7..9548e5af 100644 --- a/src/shared/notes/actions/reaction.tsx +++ b/src/shared/notes/actions/reaction.tsx @@ -62,12 +62,12 @@ export function NoteReaction({ id, pubkey }: { id: string; pubkey: string }) { diff --git a/src/shared/notes/actions/reply.tsx b/src/shared/notes/actions/reply.tsx index d5bf9c33..fb2df6dd 100644 --- a/src/shared/notes/actions/reply.tsx +++ b/src/shared/notes/actions/reply.tsx @@ -21,9 +21,9 @@ export function NoteReply({ diff --git a/src/shared/notes/actions/repost.tsx b/src/shared/notes/actions/repost.tsx index 7946588b..2fd29237 100644 --- a/src/shared/notes/actions/repost.tsx +++ b/src/shared/notes/actions/repost.tsx @@ -44,12 +44,12 @@ export function NoteRepost({ id, pubkey }: { id: string; pubkey: string }) { diff --git a/src/shared/notes/actions/zap.tsx b/src/shared/notes/actions/zap.tsx index dff857f4..ebaabe9e 100644 --- a/src/shared/notes/actions/zap.tsx +++ b/src/shared/notes/actions/zap.tsx @@ -94,9 +94,9 @@ export function NoteZap({ id, pubkey }: { id: string; pubkey: string }) { diff --git a/src/shared/notes/child.tsx b/src/shared/notes/child.tsx index 64094616..2a6725be 100644 --- a/src/shared/notes/child.tsx +++ b/src/shared/notes/child.tsx @@ -56,8 +56,8 @@ export function ChildNote({ id, root }: { id: string; root?: string }) { Lume (System) -
-
+
+
@@ -78,11 +78,11 @@ export function ChildNote({ id, root }: { id: string; root?: string }) { return ( <> -
-
+
+
-
-
+
+
{renderKind(data)} diff --git a/src/shared/notes/kinds/repost.tsx b/src/shared/notes/kinds/repost.tsx index 20edbcc5..f882aa86 100644 --- a/src/shared/notes/kinds/repost.tsx +++ b/src/shared/notes/kinds/repost.tsx @@ -64,15 +64,15 @@ export function Repost({
-
-
+
+
{renderKind(embedEvent)} @@ -141,7 +141,7 @@ export function Repost({
@@ -149,7 +149,7 @@ export function Repost({
-
+
{renderKind(data)} diff --git a/src/shared/notes/preview/video.tsx b/src/shared/notes/preview/video.tsx index c161fd74..183fa407 100644 --- a/src/shared/notes/preview/video.tsx +++ b/src/shared/notes/preview/video.tsx @@ -16,7 +16,7 @@ export function VideoPreview({ urls }: { urls: string[] }) { {url} } /> diff --git a/src/shared/notes/wrapper.tsx b/src/shared/notes/wrapper.tsx index 7df469ec..3d6ff4ce 100644 --- a/src/shared/notes/wrapper.tsx +++ b/src/shared/notes/wrapper.tsx @@ -23,7 +23,7 @@ export function NoteWrapper({
@@ -31,8 +31,8 @@ export function NoteWrapper({
{reply && }
-
-
+
+
{children} diff --git a/src/shared/user.tsx b/src/shared/user.tsx index 5ed5c8b3..9bf7a764 100644 --- a/src/shared/user.tsx +++ b/src/shared/user.tsx @@ -4,7 +4,7 @@ import ReactMarkdown from 'react-markdown'; import { Link } from 'react-router-dom'; import remarkGfm from 'remark-gfm'; -import { WorldIcon } from '@shared/icons'; +import { RepostIcon, WorldIcon } from '@shared/icons'; import { Image } from '@shared/image'; import { NIP05 } from '@shared/nip05'; @@ -46,7 +46,7 @@ export const User = memo(function User({ return (
-
+
); @@ -145,24 +145,24 @@ export const User = memo(function User({ if (variant === 'repost') { return ( - <> -
+
+
+ +
+
{pubkey}
-
+
{user?.display_name || user?.name || displayNpub(pubkey, 16)}
- reposted - ยท - {createdAt} + reposted
-
- +
); } @@ -172,7 +172,7 @@ export const User = memo(function User({ {pubkey}
@@ -194,12 +194,12 @@ export const User = memo(function User({ @@ -220,7 +220,7 @@ export const User = memo(function User({ {pubkey}
diff --git a/src/shared/widgets/wrapper.tsx b/src/shared/widgets/wrapper.tsx index 72e8587f..0a3ce978 100644 --- a/src/shared/widgets/wrapper.tsx +++ b/src/shared/widgets/wrapper.tsx @@ -9,19 +9,19 @@ export function WidgetWrapper({ children: ReactNode; className?: string; }) { - const [width, setWidth] = useState(400); + const [width, setWidth] = useState(420); return ( e.preventDefault()} - onResizeStop={(e, direction, ref, d) => { + onResizeStop={(_e, _direction, _ref, d) => { setWidth((prevWidth) => prevWidth + d.width); }} - minWidth={400} + minWidth={420} minHeight={'100vh'} className={twMerge( - 'relative shrink-0 grow-0 basis-[400px] bg-white/10 backdrop-blur-xl', + 'relative shrink-0 grow-0 bg-white/10 backdrop-blur-xl', className )} enable={{ right: true }}