From 0897417d7c9120a74c2dbf99040b60ea290c54c8 Mon Sep 17 00:00:00 2001
From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com>
Date: Sun, 4 Jan 2026 17:01:40 +0000
Subject: [PATCH] [autofix.ci] apply automated fixes
---
.../settings/profile/profile-form.tsx | 10 +++++++--
apps/dokploy/lib/avatar-utils.ts | 22 +++++++++++--------
2 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx b/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx
index 58c4c868c..ad66aa0fa 100644
--- a/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx
+++ b/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx
@@ -375,9 +375,15 @@ export const ProfileForm = () => {
colorInputRef.current?.click()}
+ onClick={() =>
+ colorInputRef.current?.click()
+ }
>
{!isSolidColorAvatar(field.value) && (
diff --git a/apps/dokploy/lib/avatar-utils.ts b/apps/dokploy/lib/avatar-utils.ts
index 7b632b44f..c21c0e681 100644
--- a/apps/dokploy/lib/avatar-utils.ts
+++ b/apps/dokploy/lib/avatar-utils.ts
@@ -1,26 +1,30 @@
/**
* Checks if the given avatar value represents a solid color in hexadecimal format.
- *
+ *
* @param value Avatar value to check.
- *
+ *
* @return True if the avatar is a solid color, false otherwise.
*/
export function isSolidColorAvatar(value?: string | null) {
- return (value?.startsWith("#") && /^#[0-9A-Fa-f]{6}$/.test(value)) || value?.startsWith("color:") || false;
-};
+ return (
+ (value?.startsWith("#") && /^#[0-9A-Fa-f]{6}$/.test(value)) ||
+ value?.startsWith("color:") ||
+ false
+ );
+}
/**
* Gets the avatar type for form selection (RadioGroup value).
- *
+ *
* @param value Avatar value.
- *
+ *
* @return "upload" for base64 images, "color" for solid colors, or the original value for other types.
*/
export function getAvatarType(value?: string | null) {
if (!value) return "";
-
+
if (value.startsWith("data:")) return "upload";
if (isSolidColorAvatar(value)) return "color";
-
+
return value;
-};
+}