UI Stabilization: Global color theme updates (#75B2D6), AI Assistant styling refactor, and navigation fixes
This commit is contained in:
@@ -11,7 +11,7 @@ import { NotesEditorialView } from '@/components/notes-editorial-view'
|
||||
import { MemoryEchoNotification } from '@/components/memory-echo-notification'
|
||||
import { NotebookSuggestionToast } from '@/components/notebook-suggestion-toast'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Plus, ArrowUpDown, Search, Share2 } from 'lucide-react'
|
||||
import { Plus, ArrowUpDown, Search, Sparkles } from 'lucide-react'
|
||||
import { useNoteRefresh } from '@/context/NoteRefreshContext'
|
||||
import { useRefresh } from '@/lib/use-refresh'
|
||||
import { useReminderCheck } from '@/hooks/use-reminder-check'
|
||||
@@ -262,8 +262,12 @@ export function HomeClient({ initialNotes, initialSettings }: HomeClientProps) {
|
||||
? await searchNotes(search, semanticMode, notebook || undefined)
|
||||
: await getAllNotes(false, notebook || undefined)
|
||||
|
||||
if (!notebook && !search) {
|
||||
allNotes = allNotes.filter((note: any) => !note.notebookId || note._isShared)
|
||||
const sharedOnly = searchParams.get('shared') === '1'
|
||||
|
||||
if (sharedOnly) {
|
||||
allNotes = allNotes.filter((note: any) => note._isShared)
|
||||
} else if (!notebook && !search) {
|
||||
allNotes = allNotes.filter((note: any) => !note.notebookId && !note._isShared)
|
||||
}
|
||||
|
||||
if (labelFilter.length > 0) {
|
||||
@@ -295,10 +299,13 @@ export function HomeClient({ initialNotes, initialSettings }: HomeClientProps) {
|
||||
return () => { cancelled.value = true }
|
||||
} else {
|
||||
let filtered = initialNotes
|
||||
const sharedOnly = searchParams.get('shared') === '1'
|
||||
if (notebook) {
|
||||
filtered = initialNotes.filter((n: any) => n.notebookId === notebook && !n._isShared)
|
||||
} else if (sharedOnly) {
|
||||
filtered = initialNotes.filter((n: any) => n._isShared)
|
||||
} else {
|
||||
filtered = initialNotes.filter((n: any) => !n.notebookId || n._isShared)
|
||||
filtered = initialNotes.filter((n: any) => !n.notebookId && !n._isShared)
|
||||
}
|
||||
setNotes(prev => {
|
||||
const localSizeMap = new Map(prev.map(n => [n.id, n.size]))
|
||||
@@ -306,7 +313,7 @@ export function HomeClient({ initialNotes, initialSettings }: HomeClientProps) {
|
||||
})
|
||||
setPinnedNotes(filtered.filter(n => n.isPinned))
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [searchParams, refreshKey])
|
||||
|
||||
const currentNotebook = notebooks.find((n: any) => n.id === searchParams.get('notebook'))
|
||||
@@ -384,7 +391,7 @@ export function HomeClient({ initialNotes, initialSettings }: HomeClientProps) {
|
||||
)}>
|
||||
<div className="flex justify-between items-start">
|
||||
<h1 className="font-memento-serif text-4xl font-medium tracking-tight text-foreground leading-tight pr-12">
|
||||
{currentNotebook ? currentNotebook.name : t('notes.title')}
|
||||
{currentNotebook ? currentNotebook.name : (searchParams.get('shared') === '1' ? 'Partagées avec moi' : t('notes.title'))}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@@ -463,10 +470,23 @@ export function HomeClient({ initialNotes, initialSettings }: HomeClientProps) {
|
||||
<span>{t('notes.search') || 'Search'}</span>
|
||||
</button>
|
||||
)}
|
||||
|
||||
{!searchParams.get('notebook') && searchParams.get('shared') !== '1' && (
|
||||
<button
|
||||
onClick={() => setBatchOrganizationOpen(true)}
|
||||
className="flex items-center gap-2 text-[13px] text-foreground font-medium hover:opacity-70 transition-opacity"
|
||||
>
|
||||
<Sparkles size={16} />
|
||||
<span>Réorganiser les notes</span>
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
<button className="flex items-center gap-2 text-[13px] text-foreground font-medium hover:opacity-70 transition-opacity">
|
||||
<Share2 size={16} />
|
||||
<span>{t('notes.share') || 'Share'}</span>
|
||||
<button
|
||||
onClick={() => setSortOrder(s => s === 'newest' ? 'oldest' : s === 'oldest' ? 'alpha' : 'newest')}
|
||||
className="flex items-center gap-2 text-[13px] text-foreground font-medium hover:opacity-70 transition-opacity"
|
||||
>
|
||||
<ArrowUpDown size={16} />
|
||||
<span>{sortLabels[sortOrder]}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user