feat: AI SEO generator, full admin panel, i18n sweep, new logo + auth/RTL fixes
Build backend images / build content-svc (push) Failing after 3m39s
Build backend images / build file-svc (push) Failing after 52s
Build backend images / build gateway (push) Failing after 58s
Build backend images / build identity-svc (push) Failing after 1m21s
Build backend images / build notification-svc (push) Failing after 1m0s
Build backend images / build render-svc (push) Failing after 58s
Build backend images / build studio-svc (push) Failing after 55s
Build backend images / build content-svc (push) Failing after 3m39s
Build backend images / build file-svc (push) Failing after 52s
Build backend images / build gateway (push) Failing after 58s
Build backend images / build identity-svc (push) Failing after 1m21s
Build backend images / build notification-svc (push) Failing after 1m0s
Build backend images / build render-svc (push) Failing after 58s
Build backend images / build studio-svc (push) Failing after 55s
AI SEO content generator - content-svc: per-tenant OpenAI config (ai_settings) + /v1/ai endpoints (settings GET/PUT, seo-post) with SEO-expert prompt → structured article - admin UI to configure token/base-url/model and generate + save as blog - configurable base URL for restricted networks Full data-driven admin panel - generic /api/admin/resource proxy + reusable AdminResource component - categories/tags/fonts/blogs (CRUD), users (list + ban), plans/slides - AI content section; nav + i18n i18n localization sweep - localized 116 user-facing + studio/editor components to next-intl (fa+en) under the auto.* namespace; merge tooling in scripts/merge-i18n.js Branding + assets - Monoline F logo (LogoMark + favicon) - offline SVG placeholder generator (/api/placeholder), dropped picsum.photos Fixes - JWT issuer mismatch on content/studio (flatrender → flatrender-identity) - missing role claim → [Authorize(Roles="Admin")] now works (RBAC) - Secure cookies broke HTTP sessions → gated behind AUTH_COOKIE_SECURE - Radix RTL via DirectionProvider (right-aligned menus in fa) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { AiContentStudio } from "@/components/admin/AiContentStudio";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export default function AdminAiPage() {
|
||||
return <AiContentStudio />;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
"use client";
|
||||
|
||||
import { AdminResource } from "@/components/admin/AdminResource";
|
||||
import { blogsConfig } from "@/components/admin/admin-resources";
|
||||
|
||||
export default function Page() {
|
||||
return <AdminResource config={blogsConfig} />;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
"use client";
|
||||
|
||||
import { AdminResource } from "@/components/admin/AdminResource";
|
||||
import { categoriesConfig } from "@/components/admin/admin-resources";
|
||||
|
||||
export default function Page() {
|
||||
return <AdminResource config={categoriesConfig} />;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
"use client";
|
||||
|
||||
import { AdminResource } from "@/components/admin/AdminResource";
|
||||
import { fontsConfig } from "@/components/admin/admin-resources";
|
||||
|
||||
export default function Page() {
|
||||
return <AdminResource config={fontsConfig} />;
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import { redirect } from "next/navigation";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
|
||||
import { getCurrentUser } from "@/lib/auth/session";
|
||||
|
||||
@@ -13,28 +14,38 @@ export default async function AdminLayout({
|
||||
if (!user || !user.is_admin) {
|
||||
redirect("/dashboard");
|
||||
}
|
||||
const t = await getTranslations("auto.appAdminLayout");
|
||||
const links: { href: string; label: string }[] = [
|
||||
{ href: "/admin/categories", label: t("categories") },
|
||||
{ href: "/admin/tags", label: t("tags") },
|
||||
{ href: "/admin/fonts", label: t("fonts") },
|
||||
{ href: "/admin/blogs", label: t("blogs") },
|
||||
{ href: "/admin/slides", label: t("slides") },
|
||||
{ href: "/admin/ai", label: t("aiContent") },
|
||||
{ href: "/admin/users", label: t("users") },
|
||||
{ href: "/admin/plans", label: t("plans") },
|
||||
{ href: "/admin/nodes", label: t("nodes") },
|
||||
{ href: "/admin/renders", label: t("renderQueue") },
|
||||
];
|
||||
return (
|
||||
<div className="min-h-screen bg-[#0c0e1a] text-gray-200">
|
||||
<nav className="border-b border-[#1e2235] bg-[#0f1120] px-6 py-3">
|
||||
<div className="mx-auto flex max-w-7xl items-center gap-6">
|
||||
<span className="text-sm font-semibold text-white">FlatRender Admin</span>
|
||||
<a
|
||||
href="/admin/nodes"
|
||||
className="text-sm text-gray-400 hover:text-white transition-colors"
|
||||
>
|
||||
Nodes
|
||||
</a>
|
||||
<a
|
||||
href="/admin/renders"
|
||||
className="text-sm text-gray-400 hover:text-white transition-colors"
|
||||
>
|
||||
Render Queue
|
||||
</a>
|
||||
<div className="mx-auto flex max-w-7xl flex-wrap items-center gap-x-5 gap-y-2">
|
||||
<span className="text-sm font-semibold text-white">{t("brand")}</span>
|
||||
{links.map((l) => (
|
||||
<a
|
||||
key={l.href}
|
||||
href={l.href}
|
||||
className="text-sm text-gray-400 transition-colors hover:text-white"
|
||||
>
|
||||
{l.label}
|
||||
</a>
|
||||
))}
|
||||
<a
|
||||
href="/dashboard"
|
||||
className="ml-auto text-xs text-gray-500 hover:text-gray-300 transition-colors"
|
||||
className="ml-auto text-xs text-gray-500 transition-colors hover:text-gray-300"
|
||||
>
|
||||
← Back to Dashboard
|
||||
{t("backToDashboard")}
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { getTranslations } from "next-intl/server";
|
||||
|
||||
import { adminGet } from "@/lib/api/admin-gateway";
|
||||
import { NodesTable } from "@/components/admin/NodesTable";
|
||||
|
||||
@@ -24,14 +26,15 @@ interface V2NodeList {
|
||||
export default async function AdminNodesPage() {
|
||||
const data = await adminGet<V2NodeList>("/v1/nodes?pageSize=100");
|
||||
const nodes = data?.items ?? [];
|
||||
const t = await getTranslations("auto.appAdminNodesPage");
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<h1 className="text-xl font-semibold text-white">Render Nodes</h1>
|
||||
<h1 className="text-xl font-semibold text-white">{t("title")}</h1>
|
||||
<p className="mt-1 text-sm text-gray-500">
|
||||
{nodes.length} node{nodes.length !== 1 ? "s" : ""} registered
|
||||
{t("registered", { count: nodes.length })}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
"use client";
|
||||
|
||||
import { AdminResource } from "@/components/admin/AdminResource";
|
||||
import { plansConfig } from "@/components/admin/admin-resources";
|
||||
|
||||
export default function Page() {
|
||||
return <AdminResource config={plansConfig} />;
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
import { getTranslations } from "next-intl/server";
|
||||
|
||||
import { adminGet } from "@/lib/api/admin-gateway";
|
||||
import { RenderQueueTable } from "@/components/admin/RenderQueueTable";
|
||||
|
||||
@@ -35,15 +37,25 @@ export default async function AdminRendersPage({
|
||||
const data = await adminGet<V2RenderList>(`/v1/renders${qs}`);
|
||||
const jobs = data?.items ?? [];
|
||||
const total = data?.total ?? 0;
|
||||
const t = await getTranslations("auto.appAdminRendersPage");
|
||||
|
||||
const steps = ["Queued", "Preparing", "Rendering", "Uploading", "Done", "Failed", "Cancelled"];
|
||||
const stepLabels: Record<string, string> = {
|
||||
Queued: t("stepQueued"),
|
||||
Preparing: t("stepPreparing"),
|
||||
Rendering: t("stepRendering"),
|
||||
Uploading: t("stepUploading"),
|
||||
Done: t("stepDone"),
|
||||
Failed: t("stepFailed"),
|
||||
Cancelled: t("stepCancelled"),
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<h1 className="text-xl font-semibold text-white">Render Queue</h1>
|
||||
<p className="mt-1 text-sm text-gray-500">{total} total jobs</p>
|
||||
<h1 className="text-xl font-semibold text-white">{t("title")}</h1>
|
||||
<p className="mt-1 text-sm text-gray-500">{t("totalJobs", { total })}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -57,7 +69,7 @@ export default async function AdminRendersPage({
|
||||
: "border-[#1e2235] text-gray-400 hover:text-white hover:border-[#2a3050]"
|
||||
}`}
|
||||
>
|
||||
All
|
||||
{t("filterAll")}
|
||||
</a>
|
||||
{steps.map((s) => (
|
||||
<a
|
||||
@@ -69,7 +81,7 @@ export default async function AdminRendersPage({
|
||||
: "border-[#1e2235] text-gray-400 hover:text-white hover:border-[#2a3050]"
|
||||
}`}
|
||||
>
|
||||
{s}
|
||||
{stepLabels[s] ?? s}
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
"use client";
|
||||
|
||||
import { AdminResource } from "@/components/admin/AdminResource";
|
||||
import { slidesConfig } from "@/components/admin/admin-resources";
|
||||
|
||||
export default function Page() {
|
||||
return <AdminResource config={slidesConfig} />;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
"use client";
|
||||
|
||||
import { AdminResource } from "@/components/admin/AdminResource";
|
||||
import { tagsConfig } from "@/components/admin/admin-resources";
|
||||
|
||||
export default function Page() {
|
||||
return <AdminResource config={tagsConfig} />;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
"use client";
|
||||
|
||||
import { AdminResource } from "@/components/admin/AdminResource";
|
||||
import { usersConfig } from "@/components/admin/admin-resources";
|
||||
|
||||
export default function Page() {
|
||||
return <AdminResource config={usersConfig} />;
|
||||
}
|
||||
Reference in New Issue
Block a user