@@ -91,7 +91,7 @@ export default function AdminBlog() {
} ;
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" >
< Button asChild >
< Link to = "/admin/blog/new/edit" >
@@ -108,10 +108,10 @@ export default function AdminBlog() {
< / div >
< 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 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 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 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" > < 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" > < 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" > < 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" > < XCircle className = "h-5 w-5 text-rose-600" / > < span > ا ص ل ا ح : { stats . changes_requested ? ? 0 } < / span > < / CardContent > < / Card >
< / div >
< 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 className = "flex flex-wrap gap-2" >
< 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 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 >
{ post . status === "draft" || post . status === "changes_requested" ? (
< 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 >
) : null }
{ canReview && post . status === "submitted" ? (