refactor(applications): enable autodeploy by default

This commit is contained in:
Mauricio Siu 2024-07-21 01:36:18 -06:00
parent ba9fc59805
commit 6be6ec940a
4 changed files with 7 additions and 7 deletions

View File

@ -29,8 +29,8 @@ export const RefreshToken = ({ applicationId }: Props) => {
<AlertDialogHeader>
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
<AlertDialogDescription>
This action cannot be undone. This will permanently delete the
domain
This action cannot be undone. This will change the refresh token and
other tokens will be invalidated.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>

View File

@ -10,7 +10,7 @@ import {
} from "@/components/ui/dropdown-menu";
import { Toggle } from "@/components/ui/toggle";
import { api } from "@/utils/api";
import { ExternalLink, Globe, Terminal } from "lucide-react";
import { CheckCircle2, ExternalLink, Globe, Terminal } from "lucide-react";
import Link from "next/link";
import { toast } from "sonner";
import { DockerTerminalModal } from "../../settings/web-server/docker-terminal-modal";
@ -50,7 +50,6 @@ export const ComposeActions = ({ composeId }: Props) => {
return (
<div className="flex flex-row gap-4 w-full flex-wrap ">
<DeployCompose composeId={composeId} />
<Toggle
aria-label="Toggle italic"
pressed={data?.autoDeploy || false}
@ -67,8 +66,9 @@ export const ComposeActions = ({ composeId }: Props) => {
toast.error("Error to update Auto Deploy");
});
}}
className="flex flex-row gap-2 items-center"
>
Autodeploy
Autodeploy {data?.autoDeploy && <CheckCircle2 className="size-4" />}
</Toggle>
<RedbuildCompose composeId={composeId} />
{data?.composeType === "docker-compose" && (

View File

@ -122,7 +122,7 @@ export const applications = pgTable("application", {
owner: text("owner"),
branch: text("branch"),
buildPath: text("buildPath").default("/"),
autoDeploy: boolean("autoDeploy"),
autoDeploy: boolean("autoDeploy").$defaultFn(() => true),
// Docker
username: text("username"),
password: text("password"),

View File

@ -37,7 +37,7 @@ export const compose = pgTable("compose", {
repository: text("repository"),
owner: text("owner"),
branch: text("branch"),
autoDeploy: boolean("autoDeploy"),
autoDeploy: boolean("autoDeploy").$defaultFn(() => true),
// Git
customGitUrl: text("customGitUrl"),
customGitBranch: text("customGitBranch"),