fix(admin): align RTL management actions

This commit is contained in:
2026-06-12 15:09:16 +03:30
parent 971b709169
commit 4611c8d63b
4 changed files with 11 additions and 11 deletions

View File

@@ -91,7 +91,7 @@ export default function AdminBlog() {
}; };
return ( return (
<div className="space-y-6" dir="rtl"> <div className="space-y-6" dir="ltr">
<div className="flex flex-col gap-4 md:flex-row md:items-center md:justify-between"> <div className="flex flex-col gap-4 md:flex-row md:items-center md:justify-between">
<Button asChild> <Button asChild>
<Link to="/admin/blog/new/edit"> <Link to="/admin/blog/new/edit">
@@ -108,10 +108,10 @@ export default function AdminBlog() {
</div> </div>
<div className="grid gap-4 md:grid-cols-4"> <div className="grid gap-4 md:grid-cols-4">
<Card><CardContent className="flex items-center justify-between p-4"><BookOpenText className="h-5 w-5 text-primary" /><span>کل: {posts.length}</span></CardContent></Card> <Card><CardContent className="flex items-center flex-row-reverse gap-2 p-4"><BookOpenText className="h-5 w-5 text-primary" /><span>کل: {posts.length}</span></CardContent></Card>
<Card><CardContent className="flex items-center justify-between p-4"><Clock3 className="h-5 w-5 text-amber-600" /><span>بررسی: {stats.submitted ?? 0}</span></CardContent></Card> <Card><CardContent className="flex items-center flex-row-reverse gap-2 p-4"><Clock3 className="h-5 w-5 text-amber-600" /><span>بررسی: {stats.submitted ?? 0}</span></CardContent></Card>
<Card><CardContent className="flex items-center justify-between p-4"><CheckCircle2 className="h-5 w-5 text-emerald-600" /><span>منتشر: {stats.published ?? 0}</span></CardContent></Card> <Card><CardContent className="flex items-center flex-row-reverse gap-2 p-4"><CheckCircle2 className="h-5 w-5 text-emerald-600" /><span>منتشر: {stats.published ?? 0}</span></CardContent></Card>
<Card><CardContent className="flex items-center justify-between p-4"><XCircle className="h-5 w-5 text-rose-600" /><span>اصلاح: {stats.changes_requested ?? 0}</span></CardContent></Card> <Card><CardContent className="flex items-center flex-row-reverse gap-2 p-4"><XCircle className="h-5 w-5 text-rose-600" /><span>اصلاح: {stats.changes_requested ?? 0}</span></CardContent></Card>
</div> </div>
<Card> <Card>
@@ -146,14 +146,14 @@ export default function AdminBlog() {
<div key={post.id} className="flex flex-col gap-3 rounded-2xl border p-4 md:flex-row md:items-center md:justify-between"> <div key={post.id} className="flex flex-col gap-3 rounded-2xl border p-4 md:flex-row md:items-center md:justify-between">
<div className="flex flex-wrap gap-2"> <div className="flex flex-wrap gap-2">
<Button variant="outline" size="sm" asChild> <Button variant="outline" size="sm" asChild>
<Link to={`/admin/blog/${post.id}/preview`}><Eye className="ml-2 h-4 w-4" />پیشنمایش</Link> <Link to={`/admin/blog/${post.id}/preview`}><Eye className="h-4 w-4" /></Link>
</Button> </Button>
<Button variant="secondary" size="sm" asChild> <Button variant="secondary" size="sm" asChild>
<Link to={`/admin/blog/${post.id}/edit`}><Edit className="ml-2 h-4 w-4" />ویرایش</Link> <Link to={`/admin/blog/${post.id}/edit`}><Edit className="h-4 w-4" /></Link>
</Button> </Button>
{post.status === "draft" || post.status === "changes_requested" ? ( {post.status === "draft" || post.status === "changes_requested" ? (
<Button size="sm" onClick={() => submitPost(post.id)} disabled={actingId === post.id}> <Button size="sm" onClick={() => submitPost(post.id)} disabled={actingId === post.id}>
<Send className="ml-2 h-4 w-4" />ارسال برای بررسی <Send className="h-4 w-4" />
</Button> </Button>
) : null} ) : null}
{canReview && post.status === "submitted" ? ( {canReview && post.status === "submitted" ? (

View File

@@ -110,7 +110,7 @@ export default function AdminBlogAssets({ postId }: Props) {
} }
return ( return (
<div className="space-y-6" dir="rtl"> <div className="space-y-6">
<div className="flex flex-col gap-4 md:flex-row-reverse md:items-center md:justify-between"> <div className="flex flex-col gap-4 md:flex-row-reverse md:items-center md:justify-between">
<div className="text-right"> <div className="text-right">
<h2 className="text-2xl font-bold">مرکز آپلود نوشته</h2> <h2 className="text-2xl font-bold">مرکز آپلود نوشته</h2>

View File

@@ -102,7 +102,7 @@ const AdminEventsPage: React.FC = () => {
}, [eventsQuery.data, filters.sort]); }, [eventsQuery.data, filters.sort]);
return ( return (
<div className="space-y-6" dir="rtl"> <div className="space-y-6">
<div className="flex flex-col gap-1"> <div className="flex flex-col gap-1">
<h2 className="text-xl font-semibold">رویدادها</h2> <h2 className="text-xl font-semibold">رویدادها</h2>
<p className="text-sm text-muted-foreground">مدیریت رویدادها، ثبتنامها و وضعیت انتشار</p> <p className="text-sm text-muted-foreground">مدیریت رویدادها، ثبتنامها و وضعیت انتشار</p>

View File

@@ -91,7 +91,7 @@ const AdminUsersPage: React.FC = () => {
}; };
return ( return (
<div className="space-y-6" dir="rtl"> <div className="space-y-6">
<div> <div>
<h2 className="text-xl font-semibold">کاربران</h2> <h2 className="text-xl font-semibold">کاربران</h2>
<p className="text-sm text-muted-foreground mt-1">مدیریت و جستجوی کاربران سامانه</p> <p className="text-sm text-muted-foreground mt-1">مدیریت و جستجوی کاربران سامانه</p>