From 9a8b3c4e1421180a3340454dfdc86b3dc24e00b6 Mon Sep 17 00:00:00 2001 From: Michele Date: Tue, 7 Apr 2026 11:03:34 +0200 Subject: [PATCH] feat: integrate Social, Affiliati, Commenti into Settings page - Add Social, Link Affiliati, Commenti as tabs in Settings page - Import and render existing components directly (they have their own headers) - Sections accessible via /settings?tab=social, ?tab=affiliati, ?tab=commenti Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/components/SettingsPage.jsx | 34 ++++++++++++++++++++---- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/SettingsPage.jsx b/frontend/src/components/SettingsPage.jsx index 596c81b..ca42d3e 100644 --- a/frontend/src/components/SettingsPage.jsx +++ b/frontend/src/components/SettingsPage.jsx @@ -2,6 +2,9 @@ import React, { useState, useEffect, useRef } from 'react' import { useNavigate, useSearchParams } from 'react-router-dom' import { api } from '../api' import { useAuth } from '../AuthContext' +import SocialAccounts from './SocialAccounts' +import AffiliateList from './AffiliateList' +import CommentsQueue from './CommentsQueue' // ─── Provider catalogs ──────────────────────────────────────────────────────── const TEXT_PROVIDERS = [ @@ -149,11 +152,14 @@ const PROVIDER_GUIDES = { } const SECTIONS = [ - { id: 'profilo', label: 'Profilo' }, - { id: 'piano', label: 'Piano & Account' }, - { id: 'ai', label: 'Provider AI' }, - { id: 'sicurezza',label: 'Sicurezza' }, - { id: 'privacy', label: 'Privacy & Dati' }, + { id: 'profilo', label: 'Profilo' }, + { id: 'piano', label: 'Piano & Account' }, + { id: 'ai', label: 'Provider AI' }, + { id: 'social', label: 'Account Social' }, + { id: 'affiliati', label: 'Link Affiliati' }, + { id: 'commenti', label: 'Commenti' }, + { id: 'sicurezza', label: 'Sicurezza' }, + { id: 'privacy', label: 'Privacy & Dati' }, ] export default function SettingsPage() { @@ -256,6 +262,9 @@ export default function SettingsPage() { setAiValues(p => ({ ...p, [k]: v }))} saveAI={saveAI} loading={loadingAI} saving={saving} success={success} errors={errors} /> )} + {activeSection === 'social' && } + {activeSection === 'affiliati' && } + {activeSection === 'commenti' && } {activeSection === 'sicurezza' && ( )} @@ -844,6 +853,21 @@ function Spinner() { ) } +function EmbeddedSection({ title, description, children }) { + return ( +
+

{title}

+
+

{description}

+ {children} +
+ ) +} + +function SocialAccountsEmbed() { return } +function AffiliateListEmbed() { return } +function CommentsQueueEmbed() { return } + const inputStyle = { width: '100%', padding: '0.625rem 0.875rem', border: '1px solid var(--border)', borderRadius: 0,