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();
if (userFromAuth) {
setUser(userFromAuth);
loadNotes();
loadNotes(); // Will use current showArchived state
loadTodos();
loadRssFeeds();
loadRssArticles();
@@ -216,7 +216,14 @@ const Index = () => {
} else {
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
useEffect(() => {
@@ -229,7 +236,7 @@ const Index = () => {
const loadNotes = async () => {
try {
const fetchedNotes = await NotesService.getNotes();
const fetchedNotes = await NotesService.getNotes(showArchived);
if (Array.isArray(fetchedNotes)) {
setNotes(fetchedNotes);
}
+4 -5
View File
@@ -20,7 +20,7 @@ export default function NotesPage() {
const loadNotes = async () => {
try {
const data = await NotesService.getNotes();
const data = await NotesService.getNotes(showArchived);
setNotes(data);
} catch (error) {
showError("Erreur lors du chargement des notes");
@@ -29,7 +29,7 @@ export default function NotesPage() {
useEffect(() => {
loadNotes();
}, []);
}, [showArchived]);
const filteredNotes = notes
.filter(note => {
@@ -129,9 +129,8 @@ export default function NotesPage() {
<Button
variant="ghost"
size="icon"
className={`absolute -top-1 -right-1 h-8 w-8 ${
note.priority ? 'opacity-100' : 'opacity-50'
}`}
className={`absolute -top-1 -right-1 h-8 w-8 ${note.priority ? 'opacity-100' : 'opacity-50'
}`}
onClick={(e) => handleTogglePriority(note, e)}
>
<span className={`text-lg font-bold ${note.priority ? 'text-red-500' : 'text-muted-foreground'}`}>