mirror of
https://github.com/luminous-devs/lume.git
synced 2024-09-18 11:13:30 +00:00
wip
This commit is contained in:
parent
50f90ddcc2
commit
41b12746a7
@ -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",
|
||||
|
@ -136,7 +136,6 @@
|
||||
"enableTauriAPI": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"macOSPrivateApi": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
|
||||
"tauri": {
|
||||
"macOSPrivateApi": true,
|
||||
"windows": [
|
||||
{
|
||||
"width": 400,
|
||||
|
@ -45,7 +45,7 @@ export function NoteActions({
|
||||
to={`/notes/text/${id}`}
|
||||
className="group inline-flex h-7 w-7 items-center justify-center"
|
||||
>
|
||||
<FocusIcon className="h-5 w-5 text-white group-hover:text-fuchsia-400" />
|
||||
<FocusIcon className="h-5 w-5 text-white/80 group-hover:text-fuchsia-400" />
|
||||
</Link>
|
||||
</Tooltip.Trigger>
|
||||
<Tooltip.Portal>
|
||||
@ -68,7 +68,7 @@ export function NoteActions({
|
||||
}
|
||||
className="group inline-flex h-7 w-7 items-center justify-center"
|
||||
>
|
||||
<ThreadIcon className="h-5 w-5 text-white group-hover:text-fuchsia-400" />
|
||||
<ThreadIcon className="h-5 w-5 text-white/80 group-hover:text-fuchsia-400" />
|
||||
</button>
|
||||
</Tooltip.Trigger>
|
||||
<Tooltip.Portal>
|
||||
|
@ -30,9 +30,9 @@ export function MoreActions({ id, pubkey }: { id: string; pubkey: string }) {
|
||||
<DropdownMenu.Trigger asChild>
|
||||
<button
|
||||
type="button"
|
||||
className="group ml-auto inline-flex h-7 w-7 items-center justify-center"
|
||||
className="group ml-auto inline-flex h-7 w-7 items-center justify-center text-white/80"
|
||||
>
|
||||
<HorizontalDotsIcon className="h-5 w-5 text-white group-hover:text-fuchsia-400" />
|
||||
<HorizontalDotsIcon className="h-5 w-5 text-white/80 group-hover:text-fuchsia-400" />
|
||||
</button>
|
||||
</DropdownMenu.Trigger>
|
||||
</Tooltip.Trigger>
|
||||
|
@ -62,12 +62,12 @@ export function NoteReaction({ id, pubkey }: { id: string; pubkey: string }) {
|
||||
<Popover.Trigger asChild>
|
||||
<button
|
||||
type="button"
|
||||
className="group inline-flex h-7 w-7 items-center justify-center"
|
||||
className="group inline-flex h-7 w-7 items-center justify-center text-white/80"
|
||||
>
|
||||
{reaction ? (
|
||||
<img src={getReactionImage(reaction)} alt={reaction} className="h-6 w-6" />
|
||||
) : (
|
||||
<ReactionIcon className="h-5 w-5 text-white group-hover:text-red-400" />
|
||||
<ReactionIcon className="h-5 w-5 text-white/80 group-hover:text-red-400" />
|
||||
)}
|
||||
</button>
|
||||
</Popover.Trigger>
|
||||
|
@ -21,9 +21,9 @@ export function NoteReply({
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setReply(id, pubkey, root)}
|
||||
className="group inline-flex h-7 w-7 items-center justify-center"
|
||||
className="group inline-flex h-7 w-7 items-center justify-center text-white/80"
|
||||
>
|
||||
<ReplyIcon className="h-5 w-5 text-white group-hover:text-green-500" />
|
||||
<ReplyIcon className="h-5 w-5 text-white/80 group-hover:text-green-500" />
|
||||
</button>
|
||||
</Tooltip.Trigger>
|
||||
<Tooltip.Portal>
|
||||
|
@ -44,12 +44,12 @@ export function NoteRepost({ id, pubkey }: { id: string; pubkey: string }) {
|
||||
<AlertDialog.Trigger asChild>
|
||||
<button
|
||||
type="button"
|
||||
className="group inline-flex h-7 w-7 items-center justify-center"
|
||||
className="group inline-flex h-7 w-7 items-center justify-center text-white/80"
|
||||
>
|
||||
<RepostIcon
|
||||
className={twMerge(
|
||||
'h-5 w-5 group-hover:text-blue-400',
|
||||
isRepost ? 'text-blue-400' : 'text-white'
|
||||
'h-5 w-5 group-hover:text-blue-500',
|
||||
isRepost ? 'text-blue-500' : 'text-white/80'
|
||||
)}
|
||||
/>
|
||||
</button>
|
||||
|
@ -94,9 +94,9 @@ export function NoteZap({ id, pubkey }: { id: string; pubkey: string }) {
|
||||
<Dialog.Trigger asChild>
|
||||
<button
|
||||
type="button"
|
||||
className="group inline-flex h-7 w-7 items-center justify-center"
|
||||
className="group inline-flex h-7 w-7 items-center justify-center text-white/80"
|
||||
>
|
||||
<ZapIcon className="h-5 w-5 text-white group-hover:text-orange-400" />
|
||||
<ZapIcon className="h-5 w-5 text-white/80 group-hover:text-orange-400" />
|
||||
</button>
|
||||
</Dialog.Trigger>
|
||||
<Dialog.Portal className="relative z-10">
|
||||
|
@ -56,8 +56,8 @@ export function ChildNote({ id, root }: { id: string; root?: string }) {
|
||||
Lume <span className="text-green-500">(System)</span>
|
||||
</h5>
|
||||
</div>
|
||||
<div className="-mt-6 flex items-start gap-3">
|
||||
<div className="w-11 shrink-0" />
|
||||
<div className="-mt-5 flex items-start gap-3">
|
||||
<div className="w-10 shrink-0" />
|
||||
<div>
|
||||
<div className="relative z-20 mt-1 flex-1 select-text">
|
||||
<div className="mb-1 select-text rounded-lg bg-white/5 p-1.5 text-sm">
|
||||
@ -78,11 +78,11 @@ export function ChildNote({ id, root }: { id: string; root?: string }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="absolute bottom-0 left-[18px] h-[calc(100%-3.4rem)] w-0.5 bg-gradient-to-t from-white/20 to-white/10" />
|
||||
<div className="mb-5 flex flex-col">
|
||||
<div className="absolute bottom-0 left-[18px] h-[calc(100%-3.6rem)] w-0.5 bg-gradient-to-t from-white/20 to-white/10" />
|
||||
<div className="mb-6 flex flex-col">
|
||||
<User pubkey={data.pubkey} time={data.created_at} />
|
||||
<div className="-mt-6 flex items-start gap-3">
|
||||
<div className="w-11 shrink-0" />
|
||||
<div className="-mt-5 flex items-start gap-3">
|
||||
<div className="w-10 shrink-0" />
|
||||
<div className="relative z-20 flex-1">
|
||||
{renderKind(data)}
|
||||
<NoteActions id={data.id} pubkey={data.pubkey} root={root} />
|
||||
|
@ -64,15 +64,15 @@ export function Repost({
|
||||
<div className="h-min w-full px-3 pb-3">
|
||||
<div
|
||||
className={twMerge(
|
||||
'relative flex flex-col gap-10 overflow-hidden rounded-xl px-3 py-3',
|
||||
'relative flex flex-col gap-1 overflow-hidden rounded-xl px-3 py-3',
|
||||
!lighter ? 'bg-white/10 backdrop-blur-xl' : ''
|
||||
)}
|
||||
>
|
||||
<User pubkey={event.pubkey} time={event.created_at} variant="repost" />
|
||||
<div className="relative flex flex-col">
|
||||
<User pubkey={embedEvent.pubkey} time={embedEvent.created_at} />
|
||||
<div className="-mt-6 flex items-start gap-3">
|
||||
<div className="w-11 shrink-0" />
|
||||
<div className="-mt-5 flex items-start gap-3">
|
||||
<div className="w-10 shrink-0" />
|
||||
<div className="relative z-20 flex-1">
|
||||
{renderKind(embedEvent)}
|
||||
<NoteActions id={embedEvent.id} pubkey={embedEvent.pubkey} />
|
||||
@ -141,7 +141,7 @@ export function Repost({
|
||||
<div className="h-min w-full px-3 pb-3">
|
||||
<div
|
||||
className={twMerge(
|
||||
'relative flex flex-col gap-10 overflow-hidden rounded-xl px-3 py-3',
|
||||
'relative flex flex-col gap-1 overflow-hidden rounded-xl px-3 py-3',
|
||||
!lighter ? 'bg-white/10 backdrop-blur-xl' : ''
|
||||
)}
|
||||
>
|
||||
@ -149,7 +149,7 @@ export function Repost({
|
||||
<div className="relative flex flex-col">
|
||||
<User pubkey={data.pubkey} time={data.created_at} />
|
||||
<div className="-mt-2 flex items-start gap-3">
|
||||
<div className="w-11 shrink-0" />
|
||||
<div className="w-10 shrink-0" />
|
||||
<div className="relative z-20 flex-1">
|
||||
{renderKind(data)}
|
||||
<NoteActions id={data.id} pubkey={data.pubkey} />
|
||||
|
@ -16,7 +16,7 @@ export function VideoPreview({ urls }: { urls: string[] }) {
|
||||
<img
|
||||
src={`https://thumbnail.video/api/get?url=${url}&seconds=1`}
|
||||
alt={url}
|
||||
className="h-auto w-full bg-white object-cover"
|
||||
className="aspect-video h-full w-full bg-white object-cover"
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
@ -23,7 +23,7 @@ export function NoteWrapper({
|
||||
<div className="h-min w-full px-3 pb-3">
|
||||
<div
|
||||
className={twMerge(
|
||||
'relative overflow-hidden rounded-xl px-3 py-3',
|
||||
'relative overflow-hidden rounded-xl px-3 py-4',
|
||||
!lighter ? 'bg-white/10 backdrop-blur-xl' : 'bg-transparent'
|
||||
)}
|
||||
>
|
||||
@ -31,8 +31,8 @@ export function NoteWrapper({
|
||||
<div className="relative">{reply && <ChildNote id={reply} root={root} />}</div>
|
||||
<div className="relative flex flex-col">
|
||||
<User pubkey={event.pubkey} time={event.created_at} />
|
||||
<div className="-mt-6 flex items-start gap-3">
|
||||
<div className="w-11 shrink-0" />
|
||||
<div className="-mt-5 flex items-start gap-3">
|
||||
<div className="w-10 shrink-0" />
|
||||
<div className="relative z-20 flex-1">
|
||||
{children}
|
||||
<NoteActions id={event.id} pubkey={event.pubkey} />
|
||||
|
@ -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 (
|
||||
<div className="relative flex items-start gap-3">
|
||||
<div className="relative z-10 h-11 w-11 shrink-0 animate-pulse overflow-hidden rounded-lg bg-white/10 backdrop-blur-xl" />
|
||||
<div className="relative z-10 h-10 w-10 shrink-0 animate-pulse overflow-hidden rounded-lg bg-white/10 backdrop-blur-xl" />
|
||||
<div className="h-3.5 w-36 animate-pulse rounded bg-white/10 backdrop-blur-xl" />
|
||||
</div>
|
||||
);
|
||||
@ -145,24 +145,24 @@ export const User = memo(function User({
|
||||
|
||||
if (variant === 'repost') {
|
||||
return (
|
||||
<>
|
||||
<div className="flex gap-3">
|
||||
<div className="flex gap-3">
|
||||
<div className="inline-flex h-10 w-10 items-center justify-center">
|
||||
<RepostIcon className="h-6 w-6 text-blue-500" />
|
||||
</div>
|
||||
<div className="inline-flex items-center gap-2">
|
||||
<Image
|
||||
src={user?.picture || user?.image}
|
||||
alt={pubkey}
|
||||
className="relative z-20 inline-block h-11 w-11 rounded-lg"
|
||||
className="relative z-20 inline-block h-6 w-6 rounded"
|
||||
/>
|
||||
<div className="inline-flex items-baseline gap-1">
|
||||
<h5 className="max-w-[15rem] truncate font-semibold leading-none text-white">
|
||||
<h5 className="max-w-[10rem] truncate font-medium leading-none text-white/80">
|
||||
{user?.display_name || user?.name || displayNpub(pubkey, 16)}
|
||||
</h5>
|
||||
<span className="font-semibold text-fuchsia-500">reposted</span>
|
||||
<span className="leading-none text-white/50">·</span>
|
||||
<span className="leading-none text-white/50">{createdAt}</span>
|
||||
<span className="text-blue-500">reposted</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="absolute left-[28px] top-16 h-6 w-0.5 bg-gradient-to-t from-white/20 to-white/10" />
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@ -172,7 +172,7 @@ export const User = memo(function User({
|
||||
<Image
|
||||
src={user?.picture || user?.image}
|
||||
alt={pubkey}
|
||||
className="relative z-20 inline-block h-11 w-11 rounded-lg"
|
||||
className="relative z-20 inline-block h-10 w-10 rounded-lg"
|
||||
/>
|
||||
<div className="flex flex-1 flex-col gap-2">
|
||||
<h5 className="max-w-[15rem] truncate font-semibold leading-none text-white">
|
||||
@ -194,12 +194,12 @@ export const User = memo(function User({
|
||||
<Popover.Trigger asChild>
|
||||
<button
|
||||
type="button"
|
||||
className="relative z-40 h-11 w-11 shrink-0 overflow-hidden"
|
||||
className="relative z-40 h-10 w-10 shrink-0 overflow-hidden"
|
||||
>
|
||||
<Image
|
||||
src={user?.picture || user?.image}
|
||||
alt={pubkey}
|
||||
className="h-11 w-11 rounded-lg object-cover"
|
||||
className="h-10 w-10 rounded-lg object-cover"
|
||||
/>
|
||||
</button>
|
||||
</Popover.Trigger>
|
||||
@ -220,7 +220,7 @@ export const User = memo(function User({
|
||||
<Image
|
||||
src={user?.picture || user?.image}
|
||||
alt={pubkey}
|
||||
className="h-11 w-11 shrink-0 rounded-lg object-cover"
|
||||
className="h-10 w-10 shrink-0 rounded-lg object-cover"
|
||||
/>
|
||||
<div className="flex flex-1 flex-col gap-2">
|
||||
<div className="inline-flex flex-col gap-1">
|
||||
|
@ -9,19 +9,19 @@ export function WidgetWrapper({
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
}) {
|
||||
const [width, setWidth] = useState(400);
|
||||
const [width, setWidth] = useState(420);
|
||||
|
||||
return (
|
||||
<Resizable
|
||||
size={{ width: width, height: '100vh' }}
|
||||
onResizeStart={(e) => 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 }}
|
||||
|
Loading…
Reference in New Issue
Block a user