mirror of
https://github.com/freedbygrace/DynamoDNS.git
synced 2026-09-04 14:35:23 +00:00
Fix navigation and DNS record management issues. Improved back button implementation and updated enable/disable functionality for DNS records.
Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9111ef36-26c8-4085-84ca-a35dc1fec1b5 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7083d608-d6d3-4a6a-9a27-6286c5109627/ed9cd0f0-32d1-420e-a7ed-01994944d731.jpg
This commit is contained in:
@@ -393,7 +393,15 @@ export function DomainDetails({ domain, onBack }: DomainDetailsProps) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="mb-6 flex justify-between items-center">
|
<div className="mb-6 flex justify-between items-center">
|
||||||
<h2 className="text-xl font-semibold">DNS Records for {domain.name}</h2>
|
<div className="flex items-center space-x-4">
|
||||||
|
{onBack && (
|
||||||
|
<Button variant="outline" onClick={onBack} className="h-9">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="mr-2 h-4 w-4"><path d="m15 18-6-6 6-6"/></svg>
|
||||||
|
Back
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
<h2 className="text-xl font-semibold">DNS Records for {domain.name}</h2>
|
||||||
|
</div>
|
||||||
<Button onClick={handleAddRecord}>
|
<Button onClick={handleAddRecord}>
|
||||||
<Plus className="mr-2 h-4 w-4" />
|
<Plus className="mr-2 h-4 w-4" />
|
||||||
Add Record
|
Add Record
|
||||||
@@ -477,28 +485,20 @@ export function DomainDetails({ domain, onBack }: DomainDetailsProps) {
|
|||||||
: "Never"}
|
: "Never"}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
{record.isActive ? (
|
<div className="flex items-center gap-2">
|
||||||
<Badge variant="outline" className="bg-green-50 text-green-700 border-green-200">Active</Badge>
|
<Switch
|
||||||
) : (
|
checked={record.isActive}
|
||||||
<Badge variant="secondary">Inactive</Badge>
|
onCheckedChange={(checked) => handleToggleActive(record, checked)}
|
||||||
)}
|
className="data-[state=checked]:bg-green-500"
|
||||||
|
size="lg"
|
||||||
|
/>
|
||||||
|
<span className={record.isActive ? "text-green-700 font-medium" : "text-muted-foreground"}>
|
||||||
|
{record.isActive ? "Active" : "Inactive"}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell className="text-right">
|
<TableCell className="text-right">
|
||||||
<div className="flex justify-end gap-2">
|
<div className="flex justify-end gap-2">
|
||||||
<TooltipProvider>
|
|
||||||
<Tooltip>
|
|
||||||
<TooltipTrigger asChild>
|
|
||||||
<Switch
|
|
||||||
checked={record.isActive}
|
|
||||||
onCheckedChange={(checked) => handleToggleActive(record, checked)}
|
|
||||||
className="mx-2"
|
|
||||||
/>
|
|
||||||
</TooltipTrigger>
|
|
||||||
<TooltipContent>
|
|
||||||
<p>{record.isActive ? "Disable" : "Enable"} record</p>
|
|
||||||
</TooltipContent>
|
|
||||||
</Tooltip>
|
|
||||||
</TooltipProvider>
|
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="icon"
|
size="icon"
|
||||||
|
|||||||
Reference in New Issue
Block a user