diff --git a/src/views/AdminBlogEditor.tsx b/src/views/AdminBlogEditor.tsx index c1bf545..2628f76 100644 --- a/src/views/AdminBlogEditor.tsx +++ b/src/views/AdminBlogEditor.tsx @@ -5,6 +5,7 @@ import { ArrowLeft, ArrowRight, FolderUp, ImageUp, Loader2, Save, Send, Trash2 } import { useRouter } from "next/navigation"; import Markdown from "@/components/Markdown"; import { useAuth } from "@/contexts/AuthContext"; +import { Link } from "@/lib/router"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; @@ -12,6 +13,7 @@ import { Checkbox } from "@/components/ui/checkbox"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { Textarea } from "@/components/ui/textarea"; import { api } from "@/lib/api"; import type * as Types from "@/lib/types"; @@ -169,13 +171,6 @@ export default function AdminBlogEditor({ postId }: Props) { return savePost(); }; - const openUploadCenter = async () => { - const targetPost = await ensureSavedPost(); - if (targetPost) { - router.push(`/admin/blog/${targetPost.id}/assets`); - } - }; - const onFeaturedImageChange = async (event: React.ChangeEvent) => { const file = event.target.files?.[0]; event.currentTarget.value = ""; @@ -227,27 +222,42 @@ export default function AdminBlogEditor({ postId }: Props) { } return ( -
-
-
-

{isNew ? "نوشته جدید" : "ویرایش نوشته"}

-

- متن را با مارک‌داون بنویسید، تصویر شاخص را تنظیم کنید و فایل‌های داخل متن را از مرکز آپلود جداگانه مدیریت کنید. -

+
+
+
+
+
+ {form.status || "draft"} +

{isNew ? "نوشته جدید" : "ویرایش نوشته"}

+
+

+ نوشتن مارک‌داون، پیش‌نمایش زنده و تنظیمات انتشار در یک محیط مینیمال. +

+
+
+ + + +
-
-
- - - محتوا و سئو - عنوان، متن مارک‌داون و متادیتای موتورهای جست‌وجو. - - + + + مشخصات نوشته + اطلاعات اصلی، دسته‌بندی، نویسندگان، تصویر شاخص و فایل‌های ضمیمه. + + +
@@ -275,40 +285,27 @@ export default function AdminBlogEditor({ postId }: Props) {