feat: implement core application dashboard with notes, todos, RSS, calendar, and AI chat, alongside a dedicated mobile notes page.

This commit is contained in:
Michael committed 2025-12-08 08:39:58 +01:00
1 parent 29e19414b8
commit b071c94cec
2 files changed
+14 -8

No files matched your search

+10 -3
View File
@@ -208,7 +208,7 @@ const Index = () => {
const userFromAuth = AuthService.getUser(); const userFromAuth = AuthService.getUser();
if (userFromAuth) { if (userFromAuth) {
setUser(userFromAuth); setUser(userFromAuth);
loadNotes(); loadNotes(); // Will use current showArchived state
loadTodos(); loadTodos();
loadRssFeeds(); loadRssFeeds();
loadRssArticles(); loadRssArticles();
@@ -216,7 +216,14 @@ const Index = () => {
} else { } else {
navigate("/login"); navigate("/login");
} }
}, [navigate]); }, [navigate]); // Keep this for auth check
// Reload notes when showArchived changes
useEffect(() => {
if (user) {
loadNotes();
}
}, [showArchived]);
// Auto-refresh des articles RSS toutes les 2 minutes // Auto-refresh des articles RSS toutes les 2 minutes
useEffect(() => { useEffect(() => {
@@ -229,7 +236,7 @@ const Index = () => {
const loadNotes = async () => { const loadNotes = async () => {
try { try {
const fetchedNotes = await NotesService.getNotes(); const fetchedNotes = await NotesService.getNotes(showArchived);
if (Array.isArray(fetchedNotes)) { if (Array.isArray(fetchedNotes)) {
setNotes(fetchedNotes); setNotes(fetchedNotes);
} }
+4 -5
View File
@@ -20,7 +20,7 @@ export default function NotesPage() {
const loadNotes = async () => { const loadNotes = async () => {
try { try {
const data = await NotesService.getNotes(); const data = await NotesService.getNotes(showArchived);
setNotes(data); setNotes(data);
} catch (error) { } catch (error) {
showError("Erreur lors du chargement des notes"); showError("Erreur lors du chargement des notes");
@@ -29,7 +29,7 @@ export default function NotesPage() {
useEffect(() => { useEffect(() => {
loadNotes(); loadNotes();
}, []); }, [showArchived]);
const filteredNotes = notes const filteredNotes = notes
.filter(note => { .filter(note => {
@@ -129,9 +129,8 @@ export default function NotesPage() {
<Button <Button
variant="ghost" variant="ghost"
size="icon" size="icon"
className={`absolute -top-1 -right-1 h-8 w-8 ${ className={`absolute -top-1 -right-1 h-8 w-8 ${note.priority ? 'opacity-100' : 'opacity-50'
note.priority ? 'opacity-100' : 'opacity-50' }`}
}`}
onClick={(e) => handleTogglePriority(note, e)} onClick={(e) => handleTogglePriority(note, e)}
> >
<span className={`text-lg font-bold ${note.priority ? 'text-red-500' : 'text-muted-foreground'}`}> <span className={`text-lg font-bold ${note.priority ? 'text-red-500' : 'text-muted-foreground'}`}>