Skip to content

Commit

Permalink
feat: add list madeby
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Dec 10, 2024
1 parent 4a4ecee commit 03858b1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
17 changes: 14 additions & 3 deletions apps/server/client/pages/(main)/share/lists/[id]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { askOpenInFollowApp } from "@client/lib/helper"
import type { Feed } from "@client/query/feed"
import { useList } from "@client/query/list"
import { FollowIcon } from "@follow/components/icons/follow.jsx"
import { Avatar, AvatarFallback, AvatarImage } from "@follow/components/ui/avatar/index.jsx"
import { Button } from "@follow/components/ui/button/index.jsx"
import { FeedIcon } from "@follow/components/ui/feed-icon/index.jsx"
import { LoadingCircle } from "@follow/components/ui/loading/index.jsx"
Expand Down Expand Up @@ -53,12 +54,22 @@ export function Component() {
className="mask-squircle mask shrink-0"
size={64}
/>
<div className="flex max-w-prose flex-col items-center">
<div className="mb-6 flex max-w-prose flex-col items-center">
<div className="mb-2 mt-4 flex items-center text-2xl font-bold">
<h1>{list.data.list.title}</h1>
<FeedCertification feed={list.data.list} />
</div>
<div className="mb-8 text-sm text-zinc-500">{list.data.list.description}</div>
<div className="mb-2 text-sm text-zinc-500">{list.data.list.description}</div>
<a
href={`/share/users/${list.data.list.owner?.id}`}
target="_blank"
className="flex items-center gap-1 text-sm text-zinc-500"
>
<span>{t("feed.madeby")}</span>
<Avatar className="inline-flex aspect-square size-5 rounded-full">
<AvatarImage src={list.data.list.owner?.image || undefined} />
<AvatarFallback>{list.data.list.owner?.name?.slice(0, 2)}</AvatarFallback>
</Avatar>
</a>
</div>
<div className="mb-4 text-sm">
{t("feed.followsAndFeeds", {
Expand Down
1 change: 1 addition & 0 deletions locales/external/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"feed.follower_other": "followers",
"feed.followsAndFeeds": "{{subscriptionCount}} {{subscriptionNoun}} and {{feedsCount}} {{feedsNoun}} on {{appName}}",
"feed.followsAndReads": "{{subscriptionCount}} {{subscriptionNoun}} with {{readCount}} recent {{readNoun}} on {{appName}}",
"feed.madeby": "Made by",
"feed.read_one": "read",
"feed.read_other": "reads",
"feed.view_feed_url": "View Feed URL",
Expand Down

0 comments on commit 03858b1

Please sign in to comment.