fix(ui): thème, textes et lisibilité restants de la revue
Les boutons suivent la couleur d’apparence, les libellés trop petits ou trop techniques sont clarifiés, et le catalogue des fournisseurs se met à jour tout seul. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,6 +10,12 @@ interface EmotionMeta {
|
||||
color: string
|
||||
}
|
||||
|
||||
export interface SentimentRelatedNote {
|
||||
id: string
|
||||
title: string | null
|
||||
notebookId: string | null
|
||||
}
|
||||
|
||||
export interface DashboardSentimentChipProps {
|
||||
available: boolean
|
||||
loading?: boolean
|
||||
@@ -17,6 +23,8 @@ export interface DashboardSentimentChipProps {
|
||||
summary?: string
|
||||
emotions?: Record<string, number>
|
||||
emotionMeta: Record<string, EmotionMeta>
|
||||
relatedNotes?: SentimentRelatedNote[]
|
||||
onSelectNote?: (id: string, notebookId: string | null) => void
|
||||
}
|
||||
|
||||
export function DashboardSentimentChip({
|
||||
@@ -26,6 +34,8 @@ export function DashboardSentimentChip({
|
||||
summary,
|
||||
emotions,
|
||||
emotionMeta,
|
||||
relatedNotes = [],
|
||||
onSelectNote,
|
||||
}: DashboardSentimentChipProps) {
|
||||
const { t } = useLanguage()
|
||||
|
||||
@@ -80,6 +90,24 @@ export function DashboardSentimentChip({
|
||||
</p>
|
||||
)}
|
||||
|
||||
{relatedNotes.length > 0 && onSelectNote && (
|
||||
<div className="space-y-1 pt-1">
|
||||
<p className="text-[8px] font-mono font-bold uppercase tracking-wider text-concrete/70">
|
||||
{t('homeDashboard.sentimentFromNotes')}
|
||||
</p>
|
||||
{relatedNotes.map(note => (
|
||||
<button
|
||||
key={note.id}
|
||||
type="button"
|
||||
onClick={() => onSelectNote(note.id, note.notebookId)}
|
||||
className="w-full text-start text-[11px] text-ink dark:text-dark-ink truncate px-2 py-1.5 rounded-lg hover:bg-brand-accent/[0.04] hover:text-brand-accent transition-colors"
|
||||
>
|
||||
{note.title?.trim() || t('homeDashboard.untitled')}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{emotions && (
|
||||
<div className="space-y-2 pt-1">
|
||||
{Object.entries(emotions)
|
||||
|
||||
Reference in New Issue
Block a user