Files
flatrender/src/components/layout/NavbarMobileMenu.tsx
T
soroush.asadi 3fc7bf2b97
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
feat: AI SEO generator, full admin panel, i18n sweep, new logo + auth/RTL fixes
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>
2026-06-02 09:35:14 +03:30

94 lines
2.8 KiB
TypeScript

"use client";
import Link from "next/link";
import { useTranslations } from "next-intl";
import { LayoutGrid } from "lucide-react";
import {
IMAGE_MAKER_NAV,
LEARN_NAV_ITEMS,
VIDEO_MAKER_NAV,
} from "@/lib/navbar-menu-data";
interface NavbarMobileMenuProps {
onNavigate: () => void;
}
const linkClass =
"flex min-h-11 items-center rounded-lg px-3 text-sm font-medium text-gray-700 hover:bg-gray-50 hover:text-gray-900";
export function NavbarMobileMenu({ onNavigate }: NavbarMobileMenuProps) {
const t = useTranslations("auto.componentsLayoutNavbarMobileMenu");
return (
<div className="flex flex-1 flex-col gap-6 overflow-y-auto">
<section>
<p className="px-3 text-xs font-semibold uppercase tracking-wide text-gray-400">
{t("videoMaker")}
</p>
<Link
href={VIDEO_MAKER_NAV.browseHref}
onClick={onNavigate}
className="mt-1 flex min-h-11 items-center gap-2 rounded-lg px-3 text-sm font-semibold text-blue-600 hover:bg-blue-50"
>
<LayoutGrid className="h-4 w-4" aria-hidden />
{VIDEO_MAKER_NAV.browseLabel}
</Link>
<ul className="mt-1 space-y-0.5">
{VIDEO_MAKER_NAV.items.map((item) => (
<li key={item.href}>
<Link href={item.href} onClick={onNavigate} className={linkClass}>
{item.label}
</Link>
</li>
))}
</ul>
</section>
<section>
<p className="px-3 text-xs font-semibold uppercase tracking-wide text-gray-400">
{t("imageMaker")}
</p>
<Link
href={IMAGE_MAKER_NAV.browseHref}
onClick={onNavigate}
className="mt-1 flex min-h-11 items-center gap-2 rounded-lg px-3 text-sm font-semibold text-blue-600 hover:bg-blue-50"
>
<LayoutGrid className="h-4 w-4" aria-hidden />
{IMAGE_MAKER_NAV.browseLabel}
</Link>
<ul className="mt-1 space-y-0.5">
{IMAGE_MAKER_NAV.items.map((item) => (
<li key={item.href}>
<Link href={item.href} onClick={onNavigate} className={linkClass}>
{item.label}
</Link>
</li>
))}
</ul>
</section>
<section>
<Link href="/pricing" onClick={onNavigate} className={linkClass}>
{t("pricing")}
</Link>
</section>
<section>
<p className="px-3 text-xs font-semibold uppercase tracking-wide text-gray-400">
{t("learn")}
</p>
<ul className="mt-1 space-y-0.5">
{LEARN_NAV_ITEMS.map((item) => (
<li key={item.href}>
<Link href={item.href} onClick={onNavigate} className={linkClass}>
{item.label}
</Link>
</li>
))}
</ul>
</section>
</div>
);
}