feat: Notifications page, Sidebar layout fixes, and Achievements enhancements
continuous-integration/drone/push Build is failing

- implemented /notifications page with overdue/upcoming alerts
- Fixed sidebar scrolling in collapsed mode
- Moved notification button to sidebar footer
- Enhanced Achievements page with streak stats and tooltips
- Improved XP history to show task titles
- Added missing translations (en/de)
- Removed top bar header
- Fixed Docker environment routing
This commit is contained in:
2025-12-17 10:06:36 +01:00
parent 7b79015ac2
commit 9819d8db0b
47 changed files with 2309 additions and 1241 deletions
+32 -5
View File
@@ -46,8 +46,8 @@ import { cn } from "@/lib/utils";
import { formatDistanceToNow } from "date-fns";
import { de } from "date-fns/locale";
import { useToast } from "@/hooks/use-toast";
import ReactMarkdown from "react-markdown";
import remarkGfm from "remark-gfm";
// import ReactMarkdown from "react-markdown";
// import remarkGfm from "remark-gfm";
// Types
type Conversation = {
@@ -93,7 +93,8 @@ const TypewriterMessage = ({ content, onComplete }: { content: string, onComplet
return (
<div className="prose prose-sm dark:prose-invert max-w-none break-words">
<ReactMarkdown remarkPlugins={[remarkGfm]}>{displayedContent}</ReactMarkdown>
{/* <ReactMarkdown remarkPlugins={[remarkGfm]}>{displayedContent}</ReactMarkdown> */}
{displayedContent}
</div>
);
};
@@ -168,7 +169,32 @@ export default function AiChatPage() {
},
});
// ... (Delete/Rename skipped for brevity in prompt, keeping existing) ...
// Delete Conversation
const deleteConversationMutation = useMutation({
mutationFn: async (id: string) => {
const res = await apiRequest("DELETE", `/api/ai/conversations/${id}`);
if (!res.ok) throw new Error("Failed to delete conversation");
},
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ["/api/ai/conversations"] });
if (selectedConversationId === deleteId) {
setSelectedConversationId(null);
}
toast({ title: t('common.deleted', 'Deleted') });
},
});
// Rename Conversation
const renameConversationMutation = useMutation({
mutationFn: async ({ id, title }: { id: string, title: string }) => {
const res = await apiRequest("PATCH", `/api/ai/conversations/${id}`, { title });
if (!res.ok) throw new Error("Failed to rename conversation");
return res.json();
},
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ["/api/ai/conversations"] });
},
});
const sendMessageMutation = useMutation({
mutationFn: async ({ conversationId, content }: { conversationId: string, content: string }) => {
@@ -592,7 +618,8 @@ export default function AiChatPage() {
<TypewriterMessage content={msg.content} onComplete={() => scrollToBottom()} />
) : (
<div className="prose prose-sm dark:prose-invert max-w-none break-words">
<ReactMarkdown remarkPlugins={[remarkGfm]}>{msg.content}</ReactMarkdown>
{/* <ReactMarkdown remarkPlugins={[remarkGfm]}>{msg.content}</ReactMarkdown> */}
{msg.content}
</div>
)
) : (