Polish business FA layout and wire special-group keys plus SSL sync.
RTL carousels/FABs, special key+title fields, slider gallery fixes, and dashboard SSL sync agent for super-admin. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
66004a0fba
commit
672091d1f5
@@ -1,5 +1,7 @@
|
||||
import { FolderPlus, Pencil, Trash2, ChevronRight } from 'lucide-react'
|
||||
import { useLocale } from '@meshkee/dashboard-ui'
|
||||
import type { Category } from '../types/category'
|
||||
import { useT } from '../i18n/useT'
|
||||
import { Tooltip } from './Tooltip'
|
||||
import styles from './CategoryRow.module.css'
|
||||
|
||||
@@ -24,6 +26,16 @@ export function BlogCategoryRow({
|
||||
onEdit,
|
||||
onRemove,
|
||||
}: BlogCategoryRowProps) {
|
||||
const t = useT()
|
||||
const { locale } = useLocale()
|
||||
const isFa = locale === 'fa'
|
||||
const primaryName = isFa ? category.nameFa || category.nameEn : category.nameEn
|
||||
const secondaryName = isFa
|
||||
? category.nameFa
|
||||
? category.nameEn
|
||||
: ''
|
||||
: category.nameFa
|
||||
|
||||
return (
|
||||
<div className={styles.row} style={{ marginLeft: depth * 8 }}>
|
||||
<div
|
||||
@@ -45,9 +57,13 @@ export function BlogCategoryRow({
|
||||
>
|
||||
<div className={styles.textBlock}>
|
||||
<div className={styles.names}>
|
||||
<span className={styles.nameEn}>{category.nameEn}</span>
|
||||
<span className={styles.separator}>·</span>
|
||||
<span className={styles.nameFa}>{category.nameFa}</span>
|
||||
<span className={isFa ? styles.nameFa : styles.nameEn}>{primaryName}</span>
|
||||
{secondaryName ? (
|
||||
<>
|
||||
<span className={styles.separator}>·</span>
|
||||
<span className={isFa ? styles.nameEn : styles.nameFa}>{secondaryName}</span>
|
||||
</>
|
||||
) : null}
|
||||
{hasChildren && (
|
||||
<span className={`${styles.chevron} ${expanded ? styles.chevronOpen : ''}`}>
|
||||
<ChevronRight size={18} />
|
||||
@@ -59,32 +75,32 @@ export function BlogCategoryRow({
|
||||
</div>
|
||||
|
||||
<div className={styles.controls}>
|
||||
<Tooltip label="Add sub category">
|
||||
<Tooltip label={t('categories.tooltip.addSub')}>
|
||||
<button
|
||||
type="button"
|
||||
className={styles.controlBtn}
|
||||
onClick={() => onAddSub(category.id)}
|
||||
aria-label="Add sub category"
|
||||
aria-label={t('categories.tooltip.addSub')}
|
||||
>
|
||||
<FolderPlus size={17} />
|
||||
</button>
|
||||
</Tooltip>
|
||||
<Tooltip label="Edit category">
|
||||
<Tooltip label={t('categories.tooltip.edit')}>
|
||||
<button
|
||||
type="button"
|
||||
className={styles.controlBtn}
|
||||
onClick={() => onEdit(category.id)}
|
||||
aria-label="Edit category"
|
||||
aria-label={t('categories.tooltip.edit')}
|
||||
>
|
||||
<Pencil size={17} />
|
||||
</button>
|
||||
</Tooltip>
|
||||
<Tooltip label="Remove category">
|
||||
<Tooltip label={t('categories.tooltip.remove')}>
|
||||
<button
|
||||
type="button"
|
||||
className={`${styles.controlBtn} ${styles.danger}`}
|
||||
onClick={() => onRemove(category.id)}
|
||||
aria-label="Remove"
|
||||
aria-label={t('categories.tooltip.remove')}
|
||||
>
|
||||
<Trash2 size={17} />
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user