fix: batch priorités — thème, scroll, wizard, agents, slides, charts, packs
Anti-flash dark (color-scheme + applyDocumentTheme), scroll pages publiques, prompts wizard/slides moins génériques, cron agents rattrapage nextRun null, slides carnet via notebookId, graphiques à 2 crédits + hint, audit dashboard, packs Stripe marqués non configurés sans price ID.
This commit is contained in:
@@ -64,7 +64,7 @@ export function ChartSuggestionsDialog({
|
||||
console.error('[ChartSuggestionsDialog] Error:', err)
|
||||
setResponse({
|
||||
suggestions: [],
|
||||
analyzedText: textToAnalyze?.substring(0, 100) || '',
|
||||
analyzedText: (selection || content || '').substring(0, 100),
|
||||
detectedData: 'Error occurred',
|
||||
hasData: false,
|
||||
error: err.message || 'Network error - check console',
|
||||
@@ -124,7 +124,7 @@ export function ChartSuggestionsDialog({
|
||||
<div className="flex items-center gap-3">
|
||||
<BarChart3 className="w-5 h-5 text-blue-500" />
|
||||
<div>
|
||||
<h2 className="text-lg font-semibold">Chart Suggestions</h2>
|
||||
<h2 className="text-lg font-semibold">{t('chart.suggestionsTitle') || 'Suggestions de graphiques'}</h2>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
{loading ? (
|
||||
<span className="flex items-center gap-2">
|
||||
@@ -137,6 +137,9 @@ export function ChartSuggestionsDialog({
|
||||
t('chart.noDataDetected')
|
||||
)}
|
||||
</p>
|
||||
<p className="text-[10px] text-muted-foreground mt-0.5">
|
||||
{t('chart.creditCostHint') || 'Coût estimé : 2 crédits IA'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
|
||||
@@ -576,8 +576,10 @@ export function BillingPlans() {
|
||||
>
|
||||
{packLoading === pack.id ? (
|
||||
<Loader2 className="h-4 w-4 animate-spin mx-auto" />
|
||||
) : (
|
||||
) : pack.configured ? (
|
||||
t('billing.buyPack')
|
||||
) : (
|
||||
t('billing.packNotConfigured') || 'Config Stripe requise'
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -40,9 +40,21 @@ export function ThemeInitializer({ theme, fontSize, fontFamily, accentColor }: T
|
||||
const localTheme = localStorage.getItem('theme-preference')
|
||||
const effectiveTheme = normalizeThemeId(localTheme || theme || 'light')
|
||||
|
||||
// Persiste aussi le cookie pour les prochains rendus serveur (anti-flash navigation)
|
||||
// Appliquer le thème AVANT paint (cookie + class dark atomique)
|
||||
applyDocumentTheme(effectiveTheme)
|
||||
persistThemePreference(effectiveTheme)
|
||||
|
||||
// color-scheme navigateur (inputs, scrollbars) — évite flash chrome clair
|
||||
try {
|
||||
const dark =
|
||||
effectiveTheme === 'dark' ||
|
||||
effectiveTheme === 'midnight' ||
|
||||
(effectiveTheme === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches)
|
||||
root.style.colorScheme = dark ? 'dark' : 'light'
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
|
||||
applyFontSize(fontSize)
|
||||
|
||||
const localFontFamily = localStorage.getItem('font-family')
|
||||
|
||||
Reference in New Issue
Block a user