feat: Added localized support for user subscription and deletion status, and optimized the subscription form and user interface.

This commit is contained in:
web@ppanel
2025-12-29 07:02:31 +00:00
parent 3751f64f73
commit 9f95cec876
8 changed files with 520 additions and 444 deletions
+14 -5
View File
@@ -172,6 +172,18 @@ export default function User() {
accessorKey: "id",
header: "ID",
},
{
accessorKey: "deleted_at",
header: t("isDeleted", "Deleted"),
cell: ({ row }) => {
const deletedAt = row.getValue("deleted_at") as number | undefined;
return deletedAt ? (
<Badge variant="destructive">{t("deleted", "Deleted")}</Badge>
) : (
<Badge variant="outline">{t("normal", "Normal")}</Badge>
);
},
},
{
accessorKey: "auth_methods",
header: t("userName", "Username"),
@@ -355,16 +367,13 @@ function SubscriptionSheet({ userId }: { userId: number }) {
<SheetTrigger asChild>
<Button variant="secondary">{t("subscription", "Subscription")}</Button>
</SheetTrigger>
<SheetContent
className="w-[1000px] max-w-full md:max-w-screen-xl"
side="right"
>
<SheetContent className="w-[1000px] max-w-full md:max-w-7xl" side="right">
<SheetHeader>
<SheetTitle>
{t("subscriptionList", "Subscription List")} · ID: {userId}
</SheetTitle>
</SheetHeader>
<div className="mt-2">
<div className="mt-2 px-4">
<UserSubscription userId={userId} />
</div>
</SheetContent>