Files
blackheart-website/src/app/admin/meta/page.tsx
diana.dolgolyova 27c1348f89 feat: admin panel with SQLite, auth, and calendar-style schedule editor
Complete admin panel for content management:
- SQLite database with better-sqlite3, seed script from content.ts
- Simple password auth with HMAC-signed cookies (Edge + Node compatible)
- 9 section editors: meta, hero, about, team, classes, schedule, pricing, FAQ, contact
- Team CRUD with image upload and drag reorder
- Schedule editor with Google Calendar-style visual timeline (colored blocks, overlap detection, click-to-add)
- All public components refactored to accept data props from DB (with fallback to static content)
- Middleware protecting /admin/* and /api/admin/* routes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 16:59:12 +03:00

32 lines
821 B
TypeScript

"use client";
import { SectionEditor } from "../_components/SectionEditor";
import { InputField, TextareaField } from "../_components/FormField";
interface MetaData {
title: string;
description: string;
}
export default function MetaEditorPage() {
return (
<SectionEditor<MetaData> sectionKey="meta" title="SEO / Мета">
{(data, update) => (
<>
<InputField
label="Заголовок сайта (title)"
value={data.title}
onChange={(v) => update({ ...data, title: v })}
/>
<TextareaField
label="Описание (description)"
value={data.description}
onChange={(v) => update({ ...data, description: v })}
rows={3}
/>
</>
)}
</SectionEditor>
);
}