mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat: add button to view github app
This commit is contained in:
@@ -54,7 +54,7 @@ export const AddTemplate = ({ projectId }: Props) => {
|
|||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
<DialogContent className="max-h-screen overflow-y-auto sm:max-w-7xl p-0">
|
<DialogContent className="max-h-screen overflow-y-auto sm:max-w-7xl p-0">
|
||||||
<div className="sticky top-0 z-10 flex flex-col gap-4 dark:bg-black p-6 border-b">
|
<div className="sticky top-0 z-10 flex flex-col gap-4 bg-background p-6 border-b">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>Create Template</DialogTitle>
|
<DialogTitle>Create Template</DialogTitle>
|
||||||
<DialogDescription>
|
<DialogDescription>
|
||||||
|
|||||||
@@ -93,8 +93,18 @@ export const GithubSetup = () => {
|
|||||||
</span>
|
</span>
|
||||||
<BadgeCheck className="size-4 text-green-700" />
|
<BadgeCheck className="size-4 text-green-700" />
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-end">
|
<div className="flex items-end gap-4 flex-wrap">
|
||||||
<RemoveGithubApp />
|
<RemoveGithubApp />
|
||||||
|
<Link
|
||||||
|
href={`https://github.com/settings/apps/${data?.githubAppName}`}
|
||||||
|
target="_blank"
|
||||||
|
className={buttonVariants({
|
||||||
|
className: "w-fit",
|
||||||
|
variant: "secondary",
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<span className="text-sm">Manage Github App</span>
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -13,6 +13,13 @@ import {
|
|||||||
} from "@/components/ui/alert-dialog";
|
} from "@/components/ui/alert-dialog";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
|
import {
|
||||||
|
Tooltip,
|
||||||
|
TooltipContent,
|
||||||
|
TooltipTrigger,
|
||||||
|
TooltipProvider,
|
||||||
|
} from "@/components/ui/tooltip";
|
||||||
|
import { InfoIcon } from "lucide-react";
|
||||||
|
|
||||||
export const RemoveGithubApp = () => {
|
export const RemoveGithubApp = () => {
|
||||||
const { refetch } = api.auth.get.useQuery();
|
const { refetch } = api.auth.get.useQuery();
|
||||||
@@ -22,7 +29,20 @@ export const RemoveGithubApp = () => {
|
|||||||
return (
|
return (
|
||||||
<AlertDialog>
|
<AlertDialog>
|
||||||
<AlertDialogTrigger asChild>
|
<AlertDialogTrigger asChild>
|
||||||
<Button variant="destructive">Remove Current Github App</Button>
|
<Button variant="destructive">
|
||||||
|
Remove Current Github App
|
||||||
|
<TooltipProvider delayDuration={0}>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<InfoIcon className="size-4 fill-muted-destructive text-muted-destructive" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
We recommend deleting the GitHub app first, and then removing
|
||||||
|
the current one from here.
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</Button>
|
||||||
</AlertDialogTrigger>
|
</AlertDialogTrigger>
|
||||||
<AlertDialogContent>
|
<AlertDialogContent>
|
||||||
<AlertDialogHeader>
|
<AlertDialogHeader>
|
||||||
|
|||||||
Reference in New Issue
Block a user