feat(ui): panneau repliable, carnets plus lisibles et accueil plus clair

Harmonise la liste des notes et l’éditeur (titres, dates, retour),
rend la saisie rapide et les raccourcis de l’accueil utilisables
sur téléphone, et conserve le panneau latéral repliable.
This commit is contained in:
Antigravity
2026-09-05 20:53:48 +00:00
parent a7b16870a4
commit 3bdbec575a
37 changed files with 1138 additions and 482 deletions

View File

@@ -8,9 +8,7 @@ import { useLanguage } from '@/lib/i18n'
import { NoteEditorProvider, useNoteEditorContext } from './note-editor-context'
import { NoteTitleBlock } from './note-title-block'
import { NoteContentArea } from './note-content-area'
import { formatAbsoluteDateLocalized } from '@/lib/utils/format-localized-date'
import { fr } from 'date-fns/locale/fr'
import { enUS } from 'date-fns/locale/en-US'
import { dateTextDirection, formatNoteCalendarDate } from '@/lib/utils/format-localized-date'
interface NoteEditorSplitPeekProps {
note: Note
@@ -23,7 +21,7 @@ interface NoteEditorSplitPeekProps {
function PeekEditorBody({ blockId }: { blockId?: string }) {
const { note } = useNoteEditorContext()
const { t, language } = useLanguage()
const dateLocale = language === 'fr' ? fr : enUS
const dateDir = dateTextDirection(language)
const scrollRootRef = useRef<HTMLDivElement>(null)
useEffect(() => {
@@ -40,10 +38,12 @@ function PeekEditorBody({ blockId }: { blockId?: string }) {
<div ref={scrollRootRef} className="flex-1 min-h-0 overflow-y-auto">
<div className="max-w-2xl mx-auto w-full px-6 sm:px-8 py-10 space-y-8 pb-24">
<p
className="text-[10px] uppercase tracking-[.25em] font-bold text-[var(--color-concrete)]"
className="text-[10px] font-medium tracking-normal text-[var(--color-concrete)]"
dir={dateDir}
lang={language === 'fa' ? 'fa' : language === 'ar' ? 'ar' : undefined}
suppressHydrationWarning
>
{formatAbsoluteDateLocalized(new Date(note.contentUpdatedAt), language, 'MMM d, yyyy', dateLocale)}
{formatNoteCalendarDate(note.contentUpdatedAt, language)}
</p>
<NoteTitleBlock />
<div className="max-w-xl mx-auto w-full">
@@ -85,7 +85,7 @@ export function NoteEditorSplitPeek({ note, blockId, onClose, onOpenFully, onBac
className="inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg text-[10px] font-bold uppercase tracking-wide text-ink dark:text-dark-ink hover:bg-black/5 dark:hover:bg-white/5 transition-colors"
>
<LayoutGrid size={12} />
{t('notes.backToDashboard')}
{t('notes.backToHome')}
</button>
)}
<button