feat(dashboard): tableau de bord Second Brain configurable avec chargement progressif
Briefing granulaire, pistes rapides puis enrichissement async, layout persisté v5, suggestions agents, intégration Gmail et navigation sidebar alignée sur /home. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
Heading, Code, Sparkles, MessageSquare, Quote, AlignLeft
|
||||
} from 'lucide-react'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { useLanguage } from '@/lib/i18n'
|
||||
|
||||
export type MobileEditorToolbarProps = {
|
||||
editor: Editor | null
|
||||
@@ -19,6 +20,7 @@ export function MobileEditorToolbar({
|
||||
onOpenActionSheet,
|
||||
onInsertImage,
|
||||
}: MobileEditorToolbarProps) {
|
||||
const { t } = useLanguage()
|
||||
if (!editor) return null
|
||||
|
||||
// Format states
|
||||
@@ -61,7 +63,7 @@ export function MobileEditorToolbar({
|
||||
type="button"
|
||||
className={cn('mobile-toolbar-btn', isBold && 'active')}
|
||||
onClick={() => editor.chain().focus().toggleBold().run()}
|
||||
aria-label="Bold"
|
||||
aria-label={t('editor.bold')}
|
||||
>
|
||||
<Bold size={18} />
|
||||
</button>
|
||||
@@ -70,7 +72,7 @@ export function MobileEditorToolbar({
|
||||
type="button"
|
||||
className={cn('mobile-toolbar-btn', isItalic && 'active')}
|
||||
onClick={() => editor.chain().focus().toggleItalic().run()}
|
||||
aria-label="Italic"
|
||||
aria-label={t('editor.italic')}
|
||||
>
|
||||
<Italic size={18} />
|
||||
</button>
|
||||
@@ -79,7 +81,7 @@ export function MobileEditorToolbar({
|
||||
type="button"
|
||||
className={cn('mobile-toolbar-btn', isHighlight && 'active')}
|
||||
onClick={() => editor.chain().focus().toggleHighlight().run()}
|
||||
aria-label="Highlight"
|
||||
aria-label={t('editor.highlight')}
|
||||
>
|
||||
<Highlighter size={18} />
|
||||
</button>
|
||||
@@ -88,7 +90,7 @@ export function MobileEditorToolbar({
|
||||
type="button"
|
||||
className={cn('mobile-toolbar-btn', isLink && 'active')}
|
||||
onClick={handleLinkPress}
|
||||
aria-label="Link"
|
||||
aria-label={t('editor.link')}
|
||||
>
|
||||
<Link2 size={18} />
|
||||
</button>
|
||||
@@ -97,7 +99,7 @@ export function MobileEditorToolbar({
|
||||
type="button"
|
||||
className={cn('mobile-toolbar-btn', isBulletList && 'active')}
|
||||
onClick={() => editor.chain().focus().toggleBulletList().run()}
|
||||
aria-label="Bullet List"
|
||||
aria-label={t('editor.bulletList')}
|
||||
>
|
||||
<List size={18} />
|
||||
</button>
|
||||
@@ -106,7 +108,7 @@ export function MobileEditorToolbar({
|
||||
type="button"
|
||||
className={cn('mobile-toolbar-btn', isTaskList && 'active')}
|
||||
onClick={() => editor.chain().focus().toggleTaskList().run()}
|
||||
aria-label="Task List"
|
||||
aria-label={t('editor.taskList')}
|
||||
>
|
||||
<CheckSquare size={18} />
|
||||
</button>
|
||||
@@ -115,7 +117,7 @@ export function MobileEditorToolbar({
|
||||
type="button"
|
||||
className={cn('mobile-toolbar-btn', isHeading && 'active')}
|
||||
onClick={toggleHeadingCycle}
|
||||
aria-label="Heading"
|
||||
aria-label={t('editor.heading')}
|
||||
>
|
||||
<Heading size={18} />
|
||||
</button>
|
||||
@@ -124,7 +126,7 @@ export function MobileEditorToolbar({
|
||||
type="button"
|
||||
className={cn('mobile-toolbar-btn', isCodeBlock && 'active')}
|
||||
onClick={() => editor.chain().focus().toggleCodeBlock().run()}
|
||||
aria-label="Code Block"
|
||||
aria-label={t('editor.codeBlock')}
|
||||
>
|
||||
<Code size={18} />
|
||||
</button>
|
||||
@@ -133,7 +135,7 @@ export function MobileEditorToolbar({
|
||||
type="button"
|
||||
className="mobile-toolbar-btn highlight-btn"
|
||||
onClick={onOpenActionSheet}
|
||||
aria-label="Plus"
|
||||
aria-label={t('editor.plus')}
|
||||
>
|
||||
<Sparkles size={18} className="text-amber-500 animate-pulse" />
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user