This commit is contained in:
Ren Amamiya
2023-06-22 21:14:53 +07:00
parent 36888221ff
commit 21d22320b3
7 changed files with 18 additions and 25 deletions

View File

@@ -12,7 +12,7 @@ export function ChannelsList() {
}, [fetchChannels]);
return (
<div className="flex flex-col gap-0.5">
<div className="flex flex-col">
{!channels ? (
<>
<div className="inline-flex h-9 items-center gap-2 rounded-md px-2.5">

View File

@@ -17,29 +17,29 @@ export function ChatsList() {
if (!account)
return (
<div className="flex flex-col gap-0.5">
<div className="flex flex-col">
<div className="inline-flex h-9 items-center gap-2 rounded-md px-2.5">
<div className="relative h-5 w-5 shrink-0 animate-pulse rounded bg-zinc-800" />
<div className="relative h-6 w-6 shrink-0 animate-pulse rounded bg-zinc-800" />
<div className="h-3 w-full rounded-sm animate-pulse bg-zinc-800" />
</div>
<div className="inline-flex h-9 items-center gap-2 rounded-md px-2.5">
<div className="relative h-5 w-5 shrink-0 animate-pulse rounded bg-zinc-800" />
<div className="relative h-6 w-6 shrink-0 animate-pulse rounded bg-zinc-800" />
<div className="h-3 w-full rounded-sm animate-pulse bg-zinc-800" />
</div>
</div>
);
return (
<div className="flex flex-col gap-0.5">
<div className="flex flex-col">
<ChatsListSelfItem data={account} />
{!chats ? (
<>
<div className="inline-flex h-9 items-center gap-2 rounded-md px-2.5">
<div className="relative h-5 w-5 shrink-0 animate-pulse rounded bg-zinc-800" />
<div className="relative h-6 w-6 shrink-0 animate-pulse rounded bg-zinc-800" />
<div className="h-3 w-full rounded-sm animate-pulse bg-zinc-800" />
</div>
<div className="inline-flex h-9 items-center gap-2 rounded-md px-2.5">
<div className="relative h-5 w-5 shrink-0 animate-pulse rounded bg-zinc-800" />
<div className="relative h-6 w-6 shrink-0 animate-pulse rounded bg-zinc-800" />
<div className="h-3 w-full rounded-sm animate-pulse bg-zinc-800" />
</div>
</>

View File

@@ -101,14 +101,7 @@ export function FollowingBlock({ block }: { block: number }) {
className="scrollbar-hide flex w-full h-full flex-col justify-between gap-1.5 pt-1.5 pb-20 overflow-y-auto"
style={{ contain: "strict" }}
>
{isLoading && (
<div className="px-3 py-1.5">
<div className="rounded-md bg-zinc-900 px-3 py-3 shadow-input shadow-black/20">
<NoteSkeleton />
</div>
</div>
)}
{!data ? (
{!data || isLoading ? (
<div className="px-3 py-1.5">
<div className="rounded-md bg-zinc-900 px-3 py-3 shadow-input shadow-black/20">
<NoteSkeleton />

View File

@@ -13,11 +13,7 @@ export function DefaultLayout({ children }: { children: React.ReactNode }) {
);
return (
<div
className={`flex w-screen h-screen ${
platform === "darwin" ? "flex-row" : "flex-row-reverse"
}`}
>
<div className="flex w-screen h-screen">
<div className="relative flex flex-row shrink-0">
<Navigation reverse={platform !== "darwin"} />
</div>

View File

@@ -26,7 +26,7 @@ export function Navigation({ reverse }: { reverse?: boolean }) {
Feeds
</h3>
</div>
<div className="flex flex-col gap-1">
<div className="flex flex-col">
<ActiveLink
href="/app/space"
className="flex h-9 items-center gap-2.5 rounded-md px-2.5 text-zinc-200"

View File

@@ -14,7 +14,9 @@ export function LinkPreview({ urls }: { urls: string[] }) {
<div className="flex flex-col gap-2 px-3 py-3">
<div className="w-2/3 h-3 rounded bg-zinc-700 animate-pulse" />
<div className="w-3/4 h-3 rounded bg-zinc-700 animate-pulse" />
<div className="mt-2.5 w-1/3 h-2 rounded bg-zinc-700 animate-pulse" />
<span className="mt-2.5 leading-none text-sm text-zinc-500">
{domain.hostname}
</span>
</div>
</div>
) : (

View File

@@ -7,9 +7,11 @@ export function VideoPreview({ urls }: { urls: string[] }) {
onKeyDown={(e) => e.stopPropagation()}
className="relative mt-3 max-w-[420px] flex w-full flex-col overflow-hidden rounded-lg bg-zinc-950"
>
<MediaPlayer src={urls[0]} poster="" controls>
<MediaOutlet />
</MediaPlayer>
{urls.map((url: string) => (
<MediaPlayer key={url} src={urls[0]} poster="" controls>
<MediaOutlet />
</MediaPlayer>
))}
</div>
);
}