fix: settings page defaults to Profilo tab, banner links to Provider AI
- Change default activeSection from 'piano' to 'profilo' - Support ?tab= query param to deep-link into settings sections - Update missing API key banner to link to /settings?tab=ai Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -154,7 +154,7 @@ export default function ContentPage() {
|
|||||||
<p style={{ fontSize: '0.85rem', color: '#78350F', margin: '0 0 0.75rem', lineHeight: 1.6 }}>
|
<p style={{ fontSize: '0.85rem', color: '#78350F', margin: '0 0 0.75rem', lineHeight: 1.6 }}>
|
||||||
Per generare contenuti devi prima configurare un provider AI (Claude, OpenAI, Gemini...) e inserire la tua API key.
|
Per generare contenuti devi prima configurare un provider AI (Claude, OpenAI, Gemini...) e inserire la tua API key.
|
||||||
</p>
|
</p>
|
||||||
<Link to="/settings" style={{ ...btnPrimary, backgroundColor: '#F59E0B', textDecoration: 'none', fontSize: '0.82rem', padding: '0.5rem 1rem' }}>
|
<Link to="/settings?tab=ai" style={{ ...btnPrimary, backgroundColor: '#F59E0B', textDecoration: 'none', fontSize: '0.82rem', padding: '0.5rem 1rem' }}>
|
||||||
Vai alle Impostazioni →
|
Vai alle Impostazioni →
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { useState, useEffect, useRef } from 'react'
|
import React, { useState, useEffect, useRef } from 'react'
|
||||||
import { useNavigate } from 'react-router-dom'
|
import { useNavigate, useSearchParams } from 'react-router-dom'
|
||||||
import { api } from '../api'
|
import { api } from '../api'
|
||||||
import { useAuth } from '../AuthContext'
|
import { useAuth } from '../AuthContext'
|
||||||
|
|
||||||
@@ -126,7 +126,8 @@ const SECTIONS = [
|
|||||||
export default function SettingsPage() {
|
export default function SettingsPage() {
|
||||||
const { user, isPro } = useAuth()
|
const { user, isPro } = useAuth()
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
const [activeSection, setActiveSection] = useState('piano')
|
const [searchParams] = useSearchParams()
|
||||||
|
const [activeSection, setActiveSection] = useState(searchParams.get('tab') || 'profilo')
|
||||||
const [aiValues, setAiValues] = useState({
|
const [aiValues, setAiValues] = useState({
|
||||||
llm_provider: 'claude', llm_api_key: '', llm_model: '', llm_base_url: '',
|
llm_provider: 'claude', llm_api_key: '', llm_model: '', llm_base_url: '',
|
||||||
image_provider: 'dalle', image_api_key: '', image_base_url: '',
|
image_provider: 'dalle', image_api_key: '', image_base_url: '',
|
||||||
|
|||||||
Reference in New Issue
Block a user