Simplify notifications
This commit is contained in:
parent
4e35fa0237
commit
6d736e3668
@ -304,24 +304,12 @@ export default function FoldersPage() {
|
|||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="space-y-6">
|
<div className="flex h-screen bg-gray-900">
|
||||||
{/* Notification */}
|
{/* Sidebar */}
|
||||||
{notification && (
|
<div className="w-64 bg-gray-800 border-r border-gray-700 flex flex-col">
|
||||||
<div
|
<div className="p-6 border-b border-gray-700">
|
||||||
className={`fixed top-4 right-4 z-50 p-4 rounded-lg shadow-lg flex items-center space-x-2 ${notification.type === "success"
|
<h1 className="text-xl font-semibold text-gray-100">Dossiers</h1>
|
||||||
? "bg-green-100 text-green-800 border border-green-200"
|
<p className="text-sm text-gray-400 mt-1">Gérez vos dossiers 4NK</p>
|
||||||
: notification.type === "error"
|
|
||||||
? "bg-red-100 text-red-800 border border-red-200"
|
|
||||||
: "bg-blue-100 text-blue-800 border border-blue-200"
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
{notification.type === "success" && <CheckCircle className="h-5 w-5" />}
|
|
||||||
{notification.type === "error" && <XCircle className="h-5 w-5" />}
|
|
||||||
{notification.type === "info" && <Info className="h-5 w-5" />}
|
|
||||||
<span>{notification.message}</span>
|
|
||||||
<Button variant="ghost" size="sm" onClick={() => setNotification(null)}>
|
|
||||||
<X className="h-4 w-4" />
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@ -1447,6 +1435,28 @@ export default function FoldersPage() {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Notification */}
|
||||||
|
{notification && (
|
||||||
|
<div className="fixed top-4 right-4 z-50">
|
||||||
|
<div className={`p-4 rounded-md shadow-lg ${
|
||||||
|
notification.type === "success" ? "bg-green-50 text-green-800 border border-green-200" :
|
||||||
|
notification.type === "error" ? "bg-red-50 text-red-800 border border-red-200" :
|
||||||
|
"bg-blue-50 text-blue-800 border border-blue-200"
|
||||||
|
}`}>
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
<span>{notification.message}</span>
|
||||||
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
size="sm"
|
||||||
|
onClick={() => setNotification(null)}
|
||||||
|
>
|
||||||
|
<X className="h-4 w-4" />
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* 4NK Iframe - only show when connected */}
|
{/* 4NK Iframe - only show when connected */}
|
||||||
{isConnected && <Iframe iframeUrl={iframeUrl} />}
|
{isConnected && <Iframe iframeUrl={iframeUrl} />}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user