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:
Alireza Hassani
2026-08-03 00:06:44 +03:30
co-authored by Cursor
parent 66004a0fba
commit 672091d1f5
113 changed files with 4154 additions and 1451 deletions
+12 -15
View File
@@ -2,6 +2,7 @@ import { useEffect, useState } from 'react'
import { Breadcrumbs } from '../components/Breadcrumbs'
import { Switch } from '../components/Switch'
import { useToast } from '../context/ToastContext'
import { useT } from '../i18n/useT'
import { ApiError } from '../lib/api'
import {
getSettings,
@@ -17,6 +18,7 @@ const DEFAULT_SETTINGS: DashboardSettings = {
}
export function BlogSettingsPage() {
const t = useT()
const { showToast } = useToast()
const [settings, setSettings] = useState<DashboardSettings>(DEFAULT_SETTINGS)
const [isLoading, setIsLoading] = useState(true)
@@ -41,7 +43,7 @@ export function BlogSettingsPage() {
if (err instanceof ApiError) {
setError(err.message)
} else {
setError('Unable to load settings.')
setError(t('productSettings.errorLoad'))
}
} finally {
setIsLoading(false)
@@ -57,12 +59,12 @@ export function BlogSettingsPage() {
comments: { autoApprove: checked },
})
setSettings(data.settings.dashboard)
showToast('Settings saved.', 'success')
showToast(t('productSettings.saved'), 'success')
} catch (err) {
if (err instanceof ApiError) {
setError(err.message)
} else {
setError('Unable to save settings.')
setError(t('productSettings.errorSave'))
}
} finally {
setSavingKey(null)
@@ -81,10 +83,8 @@ export function BlogSettingsPage() {
<div className={pageStyles.pageHeader}>
<div>
<h2 className={pageStyles.pageTitle}>Blog settings</h2>
<p className={pageStyles.pageSubtitle}>
Configure how blog comments are moderated.
</p>
<h2 className={pageStyles.pageTitle}>{t('blog.settings.title')}</h2>
<p className={pageStyles.pageSubtitle}>{t('blog.settings.subtitle')}</p>
</div>
</div>
@@ -95,27 +95,24 @@ export function BlogSettingsPage() {
)}
<section className={styles.panel}>
<h3 className={styles.sectionTitle}>Moderation</h3>
<h3 className={styles.sectionTitle}>{t('productSettings.moderation')}</h3>
{isLoading ? (
<p className={styles.status}>Loading settings...</p>
<p className={styles.status}>{t('productSettings.loading')}</p>
) : (
<div className={styles.list}>
<div className={styles.row}>
<div className={styles.rowText}>
<label htmlFor="blog-comments-auto-approve" className={styles.rowLabel}>
Auto-approve comments
{t('blog.settings.commentsAuto')}
</label>
<p className={styles.rowDescription}>
New blog comments are published immediately when submitted. You can still
reject them later if needed.
</p>
<p className={styles.rowDescription}>{t('blog.settings.commentsAutoDesc')}</p>
</div>
<Switch
id="blog-comments-auto-approve"
checked={settings.comments.autoApprove}
disabled={savingKey === 'comments'}
aria-label="Auto-approve blog comments"
aria-label={t('blog.settings.commentsAutoAria')}
onChange={(checked) => void handleCommentsAutoApprove(checked)}
/>
</div>