UI update
This commit is contained in:
@@ -6,10 +6,9 @@ import { Button } from "./ui/button";
|
||||
import { ThemeToggle } from "./ThemeToggle";
|
||||
import { useAuth } from "../providers/auth-provider";
|
||||
import { cn } from "../lib/utils";
|
||||
import { apiClient } from "../api/client";
|
||||
|
||||
export function DashboardLayout() {
|
||||
const { user, token, logout } = useAuth();
|
||||
const { user, logout } = useAuth();
|
||||
const navigate = useNavigate();
|
||||
const [isLoggingOut, setIsLoggingOut] = useState(false);
|
||||
|
||||
@@ -21,8 +20,6 @@ export function DashboardLayout() {
|
||||
[]
|
||||
);
|
||||
|
||||
const socketUrl = useMemo(() => apiClient.defaults.baseURL || window.location.origin, []);
|
||||
|
||||
const handleLogout = () => {
|
||||
setIsLoggingOut(true);
|
||||
logout();
|
||||
@@ -45,8 +42,8 @@ export function DashboardLayout() {
|
||||
cn(
|
||||
"flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition",
|
||||
isActive
|
||||
? "bg-primary text-primary-foreground shadow-sm"
|
||||
: "text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
||||
? "bg-accent text-foreground shadow-sm"
|
||||
: "text-muted-foreground hover:bg-accent hover:text-foreground"
|
||||
)
|
||||
}
|
||||
>
|
||||
@@ -77,16 +74,6 @@ export function DashboardLayout() {
|
||||
|
||||
<main className="flex-1">
|
||||
<div className="mx-auto flex max-w-5xl flex-col gap-6 px-4 py-8 sm:px-6 lg:px-8">
|
||||
<header className="flex items-center justify-between rounded-md border border-border bg-card/60 px-4 py-3">
|
||||
<div>
|
||||
<div className="text-sm uppercase tracking-wide text-muted-foreground">Proje</div>
|
||||
<div className="text-lg font-semibold text-foreground">Wisecolt CI</div>
|
||||
</div>
|
||||
<div className="text-xs text-muted-foreground">
|
||||
Bağlantı: <span className="font-mono text-foreground">{socketUrl}</span>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div className="grid gap-6">
|
||||
<Outlet />
|
||||
</div>
|
||||
|
||||
@@ -187,19 +187,19 @@ export function JobsPage() {
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon"
|
||||
className="h-10 w-10"
|
||||
className="h-10 w-10 transition hover:bg-emerald-100"
|
||||
onClick={() => handleEdit(job)}
|
||||
>
|
||||
<FontAwesomeIcon icon={faPen} className="h-4 w-4" />
|
||||
<FontAwesomeIcon icon={faPen} className="h-4 w-4 text-foreground" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon"
|
||||
className="h-10 w-10"
|
||||
className="h-10 w-10 transition hover:bg-red-100"
|
||||
disabled={deletingId === job._id}
|
||||
onClick={() => handleDelete(job._id)}
|
||||
>
|
||||
<FontAwesomeIcon icon={faTrash} className="h-4 w-4 text-destructive" />
|
||||
<FontAwesomeIcon icon={faTrash} className="h-4 w-4 text-foreground" />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user