chore: localize donate interface to Thai and wrap donate logo in a home link
This commit is contained in:
@@ -29,10 +29,10 @@ import { Button } from "@/components/ui/button";
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|
||||||
const columns: ColumnDef<typeof donations.$inferSelect>[] = [
|
const columns: ColumnDef<typeof donations.$inferSelect>[] = [
|
||||||
{ accessorKey: "name", header: "Name", meta: { className: "w-50 truncate" } },
|
{ accessorKey: "name", header: "ชื่อ", meta: { className: "w-50 truncate" } },
|
||||||
{
|
{
|
||||||
accessorFn: (row) => `${row.amount}฿`,
|
accessorFn: (row) => `${row.amount}฿`,
|
||||||
header: "Amount",
|
header: "จำนวน",
|
||||||
meta: { className: "w-24" },
|
meta: { className: "w-24" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -60,7 +60,7 @@ const columns: ColumnDef<typeof donations.$inferSelect>[] = [
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
header: "Message",
|
header: "ข้อความ",
|
||||||
meta: { className: "w-full" },
|
meta: { className: "w-full" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -105,7 +105,7 @@ const columns: ColumnDef<typeof donations.$inferSelect>[] = [
|
|||||||
cell(row) {
|
cell(row) {
|
||||||
return (
|
return (
|
||||||
<div className="flex gap-1">
|
<div className="flex gap-1">
|
||||||
<SimpleTooltip text="Re-send Popup">
|
<SimpleTooltip text="แสดง Popup อีกครั้ง">
|
||||||
<ActionButton
|
<ActionButton
|
||||||
variant="outline"
|
variant="outline"
|
||||||
size="icon-sm"
|
size="icon-sm"
|
||||||
@@ -120,7 +120,7 @@ const columns: ColumnDef<typeof donations.$inferSelect>[] = [
|
|||||||
</ActionButton>
|
</ActionButton>
|
||||||
</SimpleTooltip>
|
</SimpleTooltip>
|
||||||
{row.row.original.uid ? (
|
{row.row.original.uid ? (
|
||||||
<SimpleTooltip text="Copy Artifact UID">
|
<SimpleTooltip text="ก็อบ UID">
|
||||||
<ActionButton
|
<ActionButton
|
||||||
size="icon-sm"
|
size="icon-sm"
|
||||||
action={() =>
|
action={() =>
|
||||||
@@ -134,7 +134,7 @@ const columns: ColumnDef<typeof donations.$inferSelect>[] = [
|
|||||||
<div className="size-8" />
|
<div className="size-8" />
|
||||||
)}
|
)}
|
||||||
{row.row.original.image && (
|
{row.row.original.image && (
|
||||||
<SimpleTooltip text="Open Image">
|
<SimpleTooltip text="เปิดภาพ">
|
||||||
<ActionButton
|
<ActionButton
|
||||||
size="icon-sm"
|
size="icon-sm"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
@@ -178,7 +178,7 @@ export function DonateAdminPage({
|
|||||||
<div className="mx-auto flex w-full max-w-[max(1280px,90%)] flex-col">
|
<div className="mx-auto flex w-full max-w-[max(1280px,90%)] flex-col">
|
||||||
<span className="flex items-center gap-1 pt-1 pb-2 text-3xl font-semibold">
|
<span className="flex items-center gap-1 pt-1 pb-2 text-3xl font-semibold">
|
||||||
<BitcoinIcon size={32} />
|
<BitcoinIcon size={32} />
|
||||||
Donate List
|
โดเนททั้งหมด
|
||||||
</span>
|
</span>
|
||||||
<DataTable
|
<DataTable
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import { DownloadButton } from "../rubgram/client";
|
|||||||
import { getPostHogClient } from "@/lib/posthog-server";
|
import { getPostHogClient } from "@/lib/posthog-server";
|
||||||
import { sql } from "drizzle-orm";
|
import { sql } from "drizzle-orm";
|
||||||
import DonateLogo from "#/logos/donate.webp";
|
import DonateLogo from "#/logos/donate.webp";
|
||||||
|
import Link from 'next/link';
|
||||||
|
|
||||||
const { TMN_DEST_PHONE_NUM, SASTIFY_API_PRIVKEY } = process.env as Record<
|
const { TMN_DEST_PHONE_NUM, SASTIFY_API_PRIVKEY } = process.env as Record<
|
||||||
string,
|
string,
|
||||||
@@ -263,11 +264,13 @@ export default async function () {
|
|||||||
<div className="w-full max-w-md rounded-md border bg-card p-5">
|
<div className="w-full max-w-md rounded-md border bg-card p-5">
|
||||||
{/* oxlint-disable-next-line tailwindcss/enforce-canonical */}
|
{/* oxlint-disable-next-line tailwindcss/enforce-canonical */}
|
||||||
<div className="relative aspect-[304.5/30] w-full">
|
<div className="relative aspect-[304.5/30] w-full">
|
||||||
<Image
|
<Link href="/">
|
||||||
src={DonateLogo}
|
<Image
|
||||||
alt="Donate Logo"
|
src={DonateLogo}
|
||||||
className="absolute left-1/2 w-3/4 -translate-x-1/2 -translate-y-2/3"
|
alt="Donate Logo"
|
||||||
/>
|
className="absolute left-1/2 w-3/4 -translate-x-1/2 -translate-y-2/3"
|
||||||
|
/>
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<FormProvider id="tip" inDialog={false} onSubmit={submit}>
|
<FormProvider id="tip" inDialog={false} onSubmit={submit}>
|
||||||
<div className="flex flex-col items-center gap-2 sm:flex-row sm:items-end">
|
<div className="flex flex-col items-center gap-2 sm:flex-row sm:items-end">
|
||||||
|
|||||||
+1
-1
@@ -44,7 +44,7 @@ export function Navbar() {
|
|||||||
/>
|
/>
|
||||||
<Item icon={<Table size={16} />} name="จัดเทียร์ลิสต์" href="/tl" />
|
<Item icon={<Table size={16} />} name="จัดเทียร์ลิสต์" href="/tl" />
|
||||||
<Item icon={<StickyNote size={16} />} name="ไกด์ตัวละคร" href="/guide" />
|
<Item icon={<StickyNote size={16} />} name="ไกด์ตัวละคร" href="/guide" />
|
||||||
<Item icon={<Bitcoin size={16} />} name="โดเนทขึ้นจอ" href="/donate" last />
|
<Item icon={<Bitcoin size={16} />} name="โดเนท" href="/donate" last />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user