Improve self host support (#28)
* Add docker setup for self hosting * Add ses settings tables
This commit is contained in:
@@ -40,6 +40,12 @@ export default function ApiList() {
|
||||
/>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
) : apiKeysQuery.data?.length === 0 ? (
|
||||
<TableRow className="h-32">
|
||||
<TableCell colSpan={6} className="text-center py-4">
|
||||
<p>No API keys added</p>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
) : (
|
||||
apiKeysQuery.data?.map((apiKey) => (
|
||||
<TableRow key={apiKey.id}>
|
||||
|
@@ -8,6 +8,7 @@ import {
|
||||
Home,
|
||||
LayoutDashboard,
|
||||
LineChart,
|
||||
LogOut,
|
||||
Mail,
|
||||
Menu,
|
||||
Package,
|
||||
@@ -28,7 +29,7 @@ import {
|
||||
} from "@unsend/ui/src/dropdown-menu";
|
||||
import { Sheet, SheetContent, SheetTrigger } from "@unsend/ui/src/sheet";
|
||||
|
||||
import { NavButton } from "./nav-button";
|
||||
import { LogoutButton, NavButton } from "./nav-button";
|
||||
import { DashboardProvider } from "~/providers/dashboard-provider";
|
||||
import { NextAuthProvider } from "~/providers/next-auth";
|
||||
|
||||
@@ -89,15 +90,16 @@ export default function AuthenticatedDashboardLayout({
|
||||
Developer settings
|
||||
</NavButton>
|
||||
</div>
|
||||
<div className=" absolute bottom-10 p-4">
|
||||
<div className=" absolute bottom-10 p-4 flex flex-col gap-2">
|
||||
<Link
|
||||
href="https://docs.unsend.dev"
|
||||
target="_blank"
|
||||
className="flex gap-2 items-center"
|
||||
className="flex gap-2 items-center hover:text-primary text-muted-foreground"
|
||||
>
|
||||
<BookOpenText className="h-4 w-4" />
|
||||
<span className="">Docs</span>
|
||||
</Link>
|
||||
<LogoutButton />
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
@@ -1,5 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { LogOut } from "lucide-react";
|
||||
import { signOut } from "next-auth/react";
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
import React from "react";
|
||||
@@ -37,3 +39,15 @@ export const NavButton: React.FC<{
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
|
||||
export const LogoutButton: React.FC = () => {
|
||||
return (
|
||||
<button
|
||||
className={` w-full justify-start flex items-center gap-2 rounded-lg py-2 transition-all hover:text-primary text-muted-foreground`}
|
||||
onClick={() => signOut()}
|
||||
>
|
||||
<LogOut className="h-4 w-4" />
|
||||
Logout
|
||||
</button>
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user