ready for alpha
This commit is contained in:
@@ -67,9 +67,9 @@ export function GlobalArticlesWidget({ params }: { params: Widget }) {
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<VList className="h-full scrollbar-none">
|
||||
<VList className="h-full" style={{ contentVisibility: 'auto' }}>
|
||||
{data.map((item) => renderItem(item))}
|
||||
<div className="h-16" />
|
||||
<div className="h-14" />
|
||||
</VList>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -69,9 +69,9 @@ export function GlobalFilesWidget({ params }: { params: Widget }) {
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<VList className="h-full scrollbar-none">
|
||||
<VList className="h-full" style={{ contentVisibility: 'auto' }}>
|
||||
{data.map((item) => renderItem(item))}
|
||||
<div className="h-16" />
|
||||
<div className="h-14" />
|
||||
</VList>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -99,7 +99,7 @@ export function GlobalHashtagWidget({ params }: { params: Widget }) {
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<VList className="h-full scrollbar-none">
|
||||
<VList className="h-full" style={{ contentVisibility: 'auto' }}>
|
||||
{data.map((item) => renderItem(item))}
|
||||
<div className="h-16" />
|
||||
</VList>
|
||||
|
||||
@@ -69,7 +69,7 @@ export function LocalArticlesWidget({ params }: { params: Widget }) {
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<VList className="h-full scrollbar-none">
|
||||
<VList className="h-full" style={{ contentVisibility: 'auto' }}>
|
||||
{dbEvents.map((item) => renderItem(item))}
|
||||
<div className="flex items-center justify-center px-3 py-1.5">
|
||||
{dbEvents.length > 0 ? (
|
||||
@@ -97,7 +97,7 @@ export function LocalArticlesWidget({ params }: { params: Widget }) {
|
||||
</button>
|
||||
) : null}
|
||||
</div>
|
||||
<div className="h-16" />
|
||||
<div className="h-14" />
|
||||
</VList>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -105,7 +105,7 @@ export function LocalFeedsWidget({ params }: { params: Widget }) {
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<VList className="h-full scrollbar-none">
|
||||
<VList className="h-full" style={{ contentVisibility: 'auto' }}>
|
||||
{dbEvents.map((item) => renderItem(item))}
|
||||
<div className="flex items-center justify-center px-3 py-1.5">
|
||||
{dbEvents.length > 0 ? (
|
||||
@@ -133,7 +133,7 @@ export function LocalFeedsWidget({ params }: { params: Widget }) {
|
||||
</button>
|
||||
) : null}
|
||||
</div>
|
||||
<div className="h-16" />
|
||||
<div className="h-14" />
|
||||
</VList>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -69,7 +69,7 @@ export function LocalFilesWidget({ params }: { params: Widget }) {
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<VList className="h-full scrollbar-none">
|
||||
<VList className="h-full" style={{ contentVisibility: 'auto' }}>
|
||||
{dbEvents.map((item) => renderItem(item))}
|
||||
<div className="flex items-center justify-center px-3 py-1.5">
|
||||
{dbEvents.length > 0 ? (
|
||||
@@ -97,7 +97,7 @@ export function LocalFilesWidget({ params }: { params: Widget }) {
|
||||
</button>
|
||||
) : null}
|
||||
</div>
|
||||
<div className="h-16" />
|
||||
<div className="h-14" />
|
||||
</VList>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -104,7 +104,7 @@ export function LocalFollowsWidget({ params }: { params: Widget }) {
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<VList className="h-full scrollbar-none">
|
||||
<VList className="h-full" style={{ contentVisibility: 'auto' }}>
|
||||
{dbEvents.map((item) => renderItem(item))}
|
||||
<div className="flex items-center justify-center px-3 py-1.5">
|
||||
{dbEvents.length > 0 ? (
|
||||
@@ -132,7 +132,7 @@ export function LocalFollowsWidget({ params }: { params: Widget }) {
|
||||
</button>
|
||||
) : null}
|
||||
</div>
|
||||
<div className="h-16" />
|
||||
<div className="h-14" />
|
||||
</VList>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -145,7 +145,7 @@ export function LocalNetworkWidget() {
|
||||
) : dbEvents.length === 0 ? (
|
||||
<EventLoader firstTime={true} />
|
||||
) : (
|
||||
<VList className="h-full scrollbar-none">
|
||||
<VList className="h-full" style={{ contentVisibility: 'auto' }}>
|
||||
{!isFetched ? <EventLoader firstTime={false} /> : null}
|
||||
{dbEvents.map((item) => renderItem(item))}
|
||||
<div className="flex items-center justify-center px-3 py-1.5">
|
||||
|
||||
@@ -25,18 +25,8 @@ export function LocalNotificationWidget({ params }: { params: Widget }) {
|
||||
|
||||
const renderEvent = useCallback(
|
||||
(event: NDKEvent) => {
|
||||
const rootEventId = event.tags.find((el) => el[0] === 'e')?.[1];
|
||||
if (!rootEventId) return null;
|
||||
if (event.pubkey === db.account.pubkey) return null;
|
||||
return (
|
||||
<NotifyNote
|
||||
id={rootEventId}
|
||||
user={event.pubkey}
|
||||
content={event.content}
|
||||
kind={event.kind}
|
||||
time={event.created_at}
|
||||
/>
|
||||
);
|
||||
return <NotifyNote key={event.id} event={event} />;
|
||||
},
|
||||
[activities]
|
||||
);
|
||||
@@ -53,7 +43,7 @@ export function LocalNotificationWidget({ params }: { params: Widget }) {
|
||||
return (
|
||||
<WidgetWrapper>
|
||||
<TitleBar id={params.id} title={params.title} />
|
||||
<div className="h-full px-3">
|
||||
<div className="flex-1">
|
||||
{!activities ? (
|
||||
<div className="flex h-full w-full items-center justify-center">
|
||||
<div className="flex flex-col items-center gap-1.5">
|
||||
@@ -71,8 +61,9 @@ export function LocalNotificationWidget({ params }: { params: Widget }) {
|
||||
</p>
|
||||
</div>
|
||||
) : (
|
||||
<VList className="h-full overflow-y-auto scrollbar-none">
|
||||
<VList className="h-full" style={{ contentVisibility: 'auto' }}>
|
||||
{activities.map((event) => renderEvent(event))}
|
||||
<div className="h-14" />
|
||||
</VList>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { NDKEvent, NDKKind } from '@nostr-dev-kit/ndk';
|
||||
import { useCallback } from 'react';
|
||||
import { WVList } from 'virtua';
|
||||
|
||||
import { LoaderIcon } from '@shared/icons';
|
||||
import {
|
||||
@@ -41,7 +42,7 @@ export function LocalThreadWidget({ params }: { params: Widget }) {
|
||||
return (
|
||||
<WidgetWrapper>
|
||||
<TitleBar id={params.id} title={params.title} />
|
||||
<div className="h-full overflow-y-auto px-3 scrollbar-none">
|
||||
<WVList className="flex-1 overflow-y-auto px-3">
|
||||
{status === 'loading' ? (
|
||||
<div className="flex h-16 items-center justify-center rounded-xl bg-neutral-100 px-3 py-3 dark:bg-neutral-900">
|
||||
<LoaderIcon className="h-5 w-5 animate-spin" />
|
||||
@@ -58,7 +59,7 @@ export function LocalThreadWidget({ params }: { params: Widget }) {
|
||||
<NoteReplyForm id={params.content} />
|
||||
<ReplyList id={params.content} />
|
||||
<div className="h-10" />
|
||||
</div>
|
||||
</WVList>
|
||||
</WidgetWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ export function LocalUserWidget({ params }: { params: Widget }) {
|
||||
return (
|
||||
<WidgetWrapper>
|
||||
<TitleBar id={params.id} title={params.title} />
|
||||
<div className="h-full overflow-y-auto scrollbar-none">
|
||||
<WVList className="flex-1 overflow-y-auto">
|
||||
<div className="px-3 pt-1.5">
|
||||
<UserProfile pubkey={params.content} />
|
||||
</div>
|
||||
@@ -107,11 +107,11 @@ export function LocalUserWidget({ params }: { params: Widget }) {
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<WVList>{data.map((item) => renderItem(item))}</WVList>
|
||||
data.map((item) => renderItem(item))
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</WVList>
|
||||
</WidgetWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export function TrendingAccountsWidget({ params }: { params: Widget }) {
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<VList className="h-full scrollbar-none">
|
||||
<VList className="h-full">
|
||||
{data.map((item: Profile) => (
|
||||
<NostrBandUserProfile key={item.pubkey} data={item} />
|
||||
))}
|
||||
|
||||
@@ -58,7 +58,7 @@ export function TrendingNotesWidget({ params }: { params: Widget }) {
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<VList className="h-full scrollbar-none">
|
||||
<VList className="h-full">
|
||||
{data.map((item) => (
|
||||
<NoteWrapper key={item.event.id} event={item.event}>
|
||||
<TextNote content={item.event.content} />
|
||||
|
||||
@@ -21,7 +21,7 @@ export function WidgetWrapper({
|
||||
minWidth={420}
|
||||
maxWidth={600}
|
||||
className={twMerge(
|
||||
'flex flex-col border-r border-neutral-100 dark:border-neutral-900',
|
||||
'flex flex-col border-r-2 border-neutral-50 hover:border-neutral-100 dark:border-neutral-950 dark:hover:border-neutral-900',
|
||||
className
|
||||
)}
|
||||
enable={{ right: true }}
|
||||
|
||||
Reference in New Issue
Block a user