Compare commits

..

1 Commits

Author SHA1 Message Date
Mauricio Siu
cd8230b0e5 refactor(add-domain): remove debug log statement from AddDomain component 2025-04-06 11:14:43 -06:00
7 changed files with 17 additions and 38 deletions

View File

@@ -89,8 +89,6 @@ export const AddDomain = ({
serverId: application?.serverId || "",
});
console.log("canGenerateTraefikMeDomains", canGenerateTraefikMeDomains);
const form = useForm<Domain>({
resolver: zodResolver(domain),
defaultValues: {

View File

@@ -298,11 +298,7 @@ export const ShowPreviewSettings = ({ applicationId }: Props) => {
})
.then(() => {
refetch();
toast.success(
checked
? "Preview deployments enabled"
: "Preview deployments disabled",
);
toast.success("Preview deployments enabled");
})
.catch((error) => {
toast.error(error.message);

View File

@@ -56,8 +56,6 @@ const randomImages = [
export const ProfileForm = () => {
const _utils = api.useUtils();
const { data, refetch, isLoading } = api.user.get.useQuery();
console.log(data);
const {
mutateAsync,
isLoading: isUpdating,
@@ -86,17 +84,12 @@ export const ProfileForm = () => {
useEffect(() => {
if (data) {
form.reset(
{
email: data?.user?.email || "",
password: form.getValues("password") || "",
image: data?.user?.image || "",
currentPassword: form.getValues("currentPassword") || "",
},
{
keepValues: true,
},
);
form.reset({
email: data?.user?.email || "",
password: "",
image: data?.user?.image || "",
currentPassword: "",
});
if (data.user.email) {
generateSHA256Hash(data.user.email).then((hash) => {
@@ -104,7 +97,8 @@ export const ProfileForm = () => {
});
}
}
}, [form, data]);
form.reset();
}, [form, form.reset, data]);
const onSubmit = async (values: Profile) => {
await mutateAsync({
@@ -116,12 +110,7 @@ export const ProfileForm = () => {
.then(async () => {
await refetch();
toast.success("Profile Updated");
form.reset({
email: values.email,
password: "",
image: values.image,
currentPassword: "",
});
form.reset();
})
.catch(() => {
toast.error("Error updating the profile");

View File

@@ -1,6 +1,6 @@
{
"name": "dokploy",
"version": "v0.21.5",
"version": "v0.21.3",
"private": true,
"license": "Apache-2.0",
"type": "module",

View File

@@ -365,9 +365,7 @@ const Project = (
switch (service.type) {
case "application":
await applicationActions.start.mutateAsync({
applicationId: serviceId,
});
await applicationActions.start.mutateAsync({ applicationId: serviceId });
break;
case "compose":
await composeActions.start.mutateAsync({ composeId: serviceId });
@@ -412,9 +410,7 @@ const Project = (
switch (service.type) {
case "application":
await applicationActions.stop.mutateAsync({
applicationId: serviceId,
});
await applicationActions.stop.mutateAsync({ applicationId: serviceId });
break;
case "compose":
await composeActions.stop.mutateAsync({ composeId: serviceId });

View File

@@ -84,7 +84,7 @@ export const buildRailpack = async (
for (const envVar of envVariables) {
const [key, value] = envVar.split("=");
if (key && value) {
buildArgs.push("--secret", `id=${key},env='${key}'`);
buildArgs.push("--secret", `id=${key},env=${key}`);
env[key] = value;
}
}
@@ -132,7 +132,7 @@ export const getRailpackCommand = (
];
for (const env of envVariables) {
prepareArgs.push("--env", `'${env}'`);
prepareArgs.push("--env", env);
}
// Calculate secrets hash for layer invalidation
@@ -164,7 +164,7 @@ export const getRailpackCommand = (
for (const envVar of envVariables) {
const [key, value] = envVar.split("=");
if (key && value) {
buildArgs.push("--secret", `id=${key},env='${key}'`);
buildArgs.push("--secret", `id=${key},env=${key}`);
exportEnvs.push(`export ${key}=${value}`);
}
}

View File

@@ -37,9 +37,9 @@ export const updateServerTraefik = (
servers: [
{
url: `http://dokploy:${process.env.PORT || 3000}`,
passHostHeader: true,
},
],
passHostHeader: true,
},
},
};