what happened with the smtp tab?

This commit is contained in:
Leon Serfaty G
2025-07-18 03:20:07 +00:00
parent 4ac8ca62fb
commit c56316c740
2 changed files with 71 additions and 1 deletions
+10 -1
View File
@@ -22,7 +22,8 @@ import {
Settings, Settings,
LogOut, LogOut,
Code2, Code2,
Mails Mails,
Send
} from "lucide-react" } from "lucide-react"
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
@@ -74,6 +75,14 @@ function AdminLayout({
<span>Settings</span> <span>Settings</span>
</SidebarMenuButton> </SidebarMenuButton>
</Link> </Link>
</SidebarMenuItem>
<SidebarMenuItem>
<Link href="/admin/settings/smtp">
<SidebarMenuButton tooltip="SMTP Settings">
<Send />
<span>SMTP Settings</span>
</SidebarMenuButton>
</Link>
</SidebarMenuItem> </SidebarMenuItem>
<SidebarMenuItem> <SidebarMenuItem>
<Link href="/admin/settings/email-templates"> <Link href="/admin/settings/email-templates">
+61
View File
@@ -0,0 +1,61 @@
'use client';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/card';
import { useToast } from '@/hooks/use-toast';
export default function SmtpSettingsPage() {
const { toast } = useToast();
const handleSaveChanges = () => {
// In a real app, you would save these settings.
// For now, we'll just show a success toast.
toast({
title: 'Success!',
description: 'SMTP settings saved (simulation).',
});
};
return (
<div className="space-y-8">
<div>
<h1 className="text-3xl font-bold tracking-tight">SMTP Settings</h1>
<p className="mt-2 text-muted-foreground">
Configure your SMTP server to send emails.
</p>
</div>
<Card>
<CardHeader>
<CardTitle>SMTP Configuration</CardTitle>
<CardDescription>
Enter the details for your SMTP provider.
</CardDescription>
</CardHeader>
<CardContent className="space-y-4">
<div className="grid gap-2">
<Label htmlFor="smtp-server">SMTP Server</Label>
<Input id="smtp-server" placeholder="smtp.example.com" />
</div>
<div className="grid grid-cols-2 gap-4">
<div className="grid gap-2">
<Label htmlFor="smtp-port">Port</Label>
<Input id="smtp-port" placeholder="587" />
</div>
<div className="grid gap-2">
<Label htmlFor="smtp-username">Username</Label>
<Input id="smtp-username" placeholder="your_username" />
</div>
</div>
<div className="grid gap-2">
<Label htmlFor="smtp-password">Password</Label>
<Input id="smtp-password" type="password" placeholder="••••••••" />
</div>
</CardContent>
</Card>
<Button onClick={handleSaveChanges}>Save Changes</Button>
</div>
);
}