Compare commits

..

7 Commits

Author SHA1 Message Date
Mauricio Siu
1c470b8ba7 Merge pull request #1671 from vytenisstaugaitis/canary
fix: correct message on preview deployments disabling
2025-04-12 02:39:47 -06:00
Mauricio Siu
692864ced1 Merge pull request #1687 from Dokploy/git-fetch-origin-git-checkout-1659-environment-variable-parsing-issue-with-character-in-railpack-nuxt-app-or-other
fix(railpack): update environment variable handling to include quotes…
2025-04-12 02:30:47 -06:00
Mauricio Siu
9ca61476d2 Merge pull request #1688 from Dokploy/1675-password-input-on-profile-page-gets-cleared-unepxectedly
fix(profile-form): disable refetch on window focus for user query
2025-04-12 02:28:04 -06:00
Mauricio Siu
773a610be1 fix(profile-form): disable refetch on window focus for user query 2025-04-12 02:27:43 -06:00
Mauricio Siu
37f9e073f0 fix(railpack): update environment variable handling to include quotes for consistency 2025-04-12 02:16:39 -06:00
autofix-ci[bot]
d335a9515d [autofix.ci] apply automated fixes 2025-04-09 15:53:37 +00:00
vytenisstaugaitis
7a5a3de43d fix: correct message on preview deployments disabling 2025-04-09 18:47:34 +03:00
3 changed files with 28 additions and 13 deletions

View File

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

View File

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

View File

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