fix: note du jour preview (type daily) + aide Readwise toujours visible
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -236,18 +236,19 @@ export default function IntegrationsPage() {
|
|||||||
{loading ? <Loader2 size={16} className="animate-spin text-concrete mt-2" /> : <StatusBadge connected={rwConnected} />}
|
{loading ? <Loader2 size={16} className="animate-spin text-concrete mt-2" /> : <StatusBadge connected={rwConnected} />}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<SettingsHelpBox
|
||||||
|
title="Comment fonctionne Readwise ?"
|
||||||
|
steps={[
|
||||||
|
{ text: 'Copiez votre token d\'accès Readwise.', link: { label: 'readwise.io/access_token', href: 'https://readwise.io/access_token' } },
|
||||||
|
{ text: 'Collez-le dans le champ ci-dessous et cliquez "Connecter". La première synchronisation importe tous vos livres et articles.' },
|
||||||
|
{ text: 'Chaque livre devient une note dans un carnet "Readwise 📚" — avec tous vos surlignages organisés.' },
|
||||||
|
{ text: 'Pour mettre à jour avec de nouveaux surlignages, revenez ici et cliquez "Synchroniser maintenant".' },
|
||||||
|
{ icon: '💡', text: 'Astuce : créez des flashcards IA depuis une note Readwise (bouton 🎓 dans l\'éditeur) pour réviser vos lectures.' },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
|
||||||
{!rwConnected && (
|
{!rwConnected && (
|
||||||
<div className="space-y-3">
|
<div className="space-y-3">
|
||||||
<SettingsHelpBox
|
|
||||||
title="Comment fonctionne Readwise ?"
|
|
||||||
steps={[
|
|
||||||
{ text: 'Copiez votre token d\'accès Readwise.', link: { label: 'readwise.io/access_token', href: 'https://readwise.io/access_token' } },
|
|
||||||
{ text: 'Collez-le dans le champ ci-dessous et cliquez "Connecter". La première synchronisation importe tous vos livres et articles.' },
|
|
||||||
{ text: 'Chaque livre devient une note dans un carnet "Readwise 📚" — avec tous vos surlignages organisés.' },
|
|
||||||
{ text: 'Pour mettre à jour avec de nouveaux surlignages, revenez ici et cliquez "Synchroniser maintenant".' },
|
|
||||||
{ icon: '💡', text: 'Astuce : créez des flashcards IA depuis une note Readwise (bouton 🎓 dans l\'éditeur) pour réviser vos lectures.' },
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<input
|
<input
|
||||||
type="password"
|
type="password"
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ export const NoteCard = memo(function NoteCard({
|
|||||||
const [reminderDate, setReminderDate] = useState<Date | null>(note.reminder ? new Date(note.reminder) : null)
|
const [reminderDate, setReminderDate] = useState<Date | null>(note.reminder ? new Date(note.reminder) : null)
|
||||||
|
|
||||||
const sanitizedHtml = useMemo(() => {
|
const sanitizedHtml = useMemo(() => {
|
||||||
if (note.type !== 'richtext' || !note.content) return ''
|
if ((note.type !== 'richtext' && note.type !== 'daily') || !note.content) return ''
|
||||||
return DOMPurify.sanitize(note.content)
|
return DOMPurify.sanitize(note.content)
|
||||||
}, [note.type, note.content])
|
}, [note.type, note.content])
|
||||||
|
|
||||||
@@ -692,7 +692,7 @@ export const NoteCard = memo(function NoteCard({
|
|||||||
items={localCheckItems || optimisticNote.checkItems || note.checkItems || []}
|
items={localCheckItems || optimisticNote.checkItems || note.checkItems || []}
|
||||||
onToggleItem={handleCheckItem}
|
onToggleItem={handleCheckItem}
|
||||||
/>
|
/>
|
||||||
) : note.type === 'richtext' ? (
|
) : (note.type === 'richtext' || note.type === 'daily') ? (
|
||||||
<div className="text-sm text-foreground line-clamp-10 rt-preview" dangerouslySetInnerHTML={{ __html: sanitizedHtml }} />
|
<div className="text-sm text-foreground line-clamp-10 rt-preview" dangerouslySetInnerHTML={{ __html: sanitizedHtml }} />
|
||||||
) : (
|
) : (
|
||||||
<div className="text-sm text-foreground line-clamp-10">
|
<div className="text-sm text-foreground line-clamp-10">
|
||||||
|
|||||||
Reference in New Issue
Block a user