Responsive
This commit is contained in:
1 parent
ffddef9845
commit
c1c6d97a77
6 files changed
+75
-46
No files matched your search
@@ -64,6 +64,11 @@ export default function AIChatSidebar({ isOpen, onClose, currentService }: AICha
|
||||
};
|
||||
}, [isResizing, sidebarWidth]);
|
||||
|
||||
// Sync sidebarWidth to CSS variable for App.tsx layout
|
||||
useEffect(() => {
|
||||
document.documentElement.style.setProperty('--sidebar-width', `${sidebarWidth}px`);
|
||||
}, [sidebarWidth]);
|
||||
|
||||
useEffect(() => {
|
||||
if (isOpen) fetchConversations();
|
||||
}, [isOpen]);
|
||||
@@ -253,18 +258,28 @@ export default function AIChatSidebar({ isOpen, onClose, currentService }: AICha
|
||||
}, [isOpen, currentConv]);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"fixed top-0 right-0 h-full bg-card border-l border-muted/50 shadow-2xl transition-all duration-500 z-50 flex flex-col",
|
||||
isOpen ? "translate-x-0" : "translate-x-full"
|
||||
<>
|
||||
{/* Mobile Backdrop */}
|
||||
{isOpen && (
|
||||
<div
|
||||
className="fixed inset-0 bg-background/60 backdrop-blur-sm z-40 lg:hidden animate-in fade-in duration-300"
|
||||
onClick={onClose}
|
||||
/>
|
||||
)}
|
||||
style={{ width: sidebarWidth }}
|
||||
>
|
||||
{/* Resize Handle */}
|
||||
|
||||
<div
|
||||
className="absolute left-0 top-0 w-1.5 h-full cursor-col-resize hover:bg-primary/20 transition-colors z-50"
|
||||
onMouseDown={handleMouseDown}
|
||||
/>
|
||||
className={cn(
|
||||
"fixed top-0 right-0 h-full bg-card border-l border-muted/50 shadow-2xl transition-transform duration-500 z-50 flex flex-col",
|
||||
isOpen ? "translate-x-0" : "translate-x-full",
|
||||
"w-full sm:w-[500px] lg:w-[var(--sidebar-width)]"
|
||||
)}
|
||||
style={{ width: isOpen && window.innerWidth >= 1024 ? sidebarWidth : undefined }}
|
||||
>
|
||||
{/* Resize Handle - Only on Desktop */}
|
||||
<div
|
||||
className="absolute left-0 top-0 w-1.5 h-full cursor-col-resize hover:bg-primary/20 transition-colors z-50 hidden lg:block"
|
||||
onMouseDown={handleMouseDown}
|
||||
/>
|
||||
|
||||
{/* Header */}
|
||||
<div className="flex items-center justify-between p-6 bg-muted/5">
|
||||
@@ -439,5 +454,6 @@ export default function AIChatSidebar({ isOpen, onClose, currentService }: AICha
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import { Label } from '@/components/ui/label';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogFooter,
|
||||
@@ -72,6 +73,9 @@ export default function AddServiceModal({ onClose, onAdded }: { onClose: () => v
|
||||
<form onSubmit={handleSubmit}>
|
||||
<DialogHeader>
|
||||
<DialogTitle className="text-xl">Nouveau Service</DialogTitle>
|
||||
<DialogDescription>
|
||||
Enregistrez un nouveau conteneur Docker ou un service système pour commencer la supervision.
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<div className="grid gap-4 py-4">
|
||||
@@ -122,8 +126,8 @@ export default function AddServiceModal({ onClose, onAdded }: { onClose: () => v
|
||||
)}
|
||||
</div>
|
||||
<datalist id="targets-list">
|
||||
{availableTargets.map(target => (
|
||||
<option key={target.id} value={target.id}>{target.name}</option>
|
||||
{availableTargets.map((target, idx) => (
|
||||
<option key={`${target.id}-${idx}`} value={target.id}>{target.name}</option>
|
||||
))}
|
||||
</datalist>
|
||||
</div>
|
||||
|
||||
@@ -5,6 +5,7 @@ import { Label } from '@/components/ui/label';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogFooter,
|
||||
@@ -72,6 +73,9 @@ export default function SettingsModal({ onClose }: { onClose: () => void }) {
|
||||
<DialogContent className="sm:max-w-[600px] max-h-[90vh] overflow-hidden flex flex-col p-0">
|
||||
<DialogHeader className="p-6 pb-2 border-b">
|
||||
<DialogTitle className="text-2xl font-bold tracking-tight">Paramètres Globaux</DialogTitle>
|
||||
<DialogDescription>
|
||||
Configurez vos intégrations Notion, Ollama et SearXNG pour personnaliser votre expérience LogAI.
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<div className="flex-1 overflow-y-auto p-6 pt-2 space-y-8 scrollbar-thin">
|
||||
|
||||
Reference in new issue
Block a user