Add automated content planning and image overlays
This commit is contained in:
@@ -7,6 +7,7 @@ import { Icon } from "@/components/Icon";
|
||||
import { WeekBoard } from "@/components/WeekBoard";
|
||||
import { WeekPlanAssistant } from "@/components/WeekPlanAssistant";
|
||||
import { roleAtLeast } from "@/lib/auth/roles";
|
||||
import { ContentAutoLauncher } from "@/components/ContentAutoLauncher";
|
||||
|
||||
export default async function OverviewPage(props: PageProps<"/">) {
|
||||
const ctx = await getConsoleContext();
|
||||
@@ -39,7 +40,7 @@ export default async function OverviewPage(props: PageProps<"/">) {
|
||||
const openDays = Array.from({ length: 7 }, (_, i) => addDays(week, i)).filter(d => d >= today).length;
|
||||
const planFor = ctx.selected && editable.includes(ctx.selected.id) && openDays > 0 ? ctx.selected : null;
|
||||
return <>
|
||||
<PageTitle title="แผนคอนเทนต์" subtitle={ctx.selected ? `จัดคิวโพสต์ของ ${ctx.selected.name}` : "ทุกไอเดีย ทุกเพจ ในแผนเดียว · เวลาไทย"} actions={editable.length > 0 ? <Link href="/posts/new" className="btn btn-primary"><Icon name="plus" /> สร้างโพสต์</Link> : undefined} />
|
||||
<PageTitle title="แผนคอนเทนต์" subtitle={ctx.selected ? `จัดคิวโพสต์ของ ${ctx.selected.name}` : "ทุกไอเดีย ทุกเพจ ในแผนเดียว · เวลาไทย"} actions={editable.length > 0 ? <>{planFor && <ContentAutoLauncher pageId={planFor.id} />}<Link href="/posts/new" className="btn btn-primary"><Icon name="plus" /> สร้างโพสต์</Link></> : undefined} />
|
||||
<div className="flex flex-wrap items-center gap-3 text-[12px] text-ink-3">
|
||||
<span>{posts.length} โพสต์ในสัปดาห์นี้</span><span className="w-1 h-1 bg-line rounded-full" /><span>{tray.length}{tray.length === 50 ? "+" : ""} โพสต์ยังไม่วางวัน</span>
|
||||
{pending > 0 && <Link href="/posts?status=PENDING_APPROVAL" className="pill pill-amber">รออนุมัติ {pending}</Link>}
|
||||
|
||||
Reference in New Issue
Block a user