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
@@ -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 PortfolioSettingsPage() {
const t = useT()
const { showToast } = useToast()
const [settings, setSettings] = useState<DashboardSettings>(DEFAULT_SETTINGS)
const [isLoading, setIsLoading] = useState(true)
@@ -41,7 +43,7 @@ export function PortfolioSettingsPage() {
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 PortfolioSettingsPage() {
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 PortfolioSettingsPage() {
<div className={pageStyles.pageHeader}>
<div>
<h2 className={pageStyles.pageTitle}>Portfolio settings</h2>
<p className={pageStyles.pageSubtitle}>
Configure how portfolio comments are moderated.
</p>
<h2 className={pageStyles.pageTitle}>{t('portfolio.settings.title')}</h2>
<p className={pageStyles.pageSubtitle}>{t('portfolio.settings.subtitle')}</p>
</div>
</div>
@@ -95,27 +95,24 @@ export function PortfolioSettingsPage() {
)}
<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="portfolio-comments-auto-approve" className={styles.rowLabel}>
Auto-approve comments
{t('portfolio.settings.commentsAuto')}
</label>
<p className={styles.rowDescription}>
New portfolio comments are published immediately when submitted. You can still
reject them later if needed.
</p>
<p className={styles.rowDescription}>{t('portfolio.settings.commentsAutoDesc')}</p>
</div>
<Switch
id="portfolio-comments-auto-approve"
checked={settings.comments.autoApprove}
disabled={savingKey === 'comments'}
aria-label="Auto-approve portfolio comments"
aria-label={t('portfolio.settings.commentsAutoAria')}
onChange={(checked) => void handleCommentsAutoApprove(checked)}
/>
</div>