Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ export const AddDomain = ({ id, type, domainId = "", children }: Props) => {
};

const onSubmit = async (data: Domain) => {

const trimData = {
...data,
host: data.host.trim()
}
await mutateAsync({
domainId,
...(data.domainType === "application" && {
Expand All @@ -228,7 +233,7 @@ export const AddDomain = ({ id, type, domainId = "", children }: Props) => {
...(data.domainType === "compose" && {
composeId: id,
}),
...data,
...trimData,
})
.then(async () => {
toast.success(dictionary.success);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { Disable2FA } from "./disable-2fa";
import { Enable2FA } from "./enable-2fa";

const profileSchema = z.object({
name: z.string().optional(),
email: z.string(),
password: z.string().nullable(),
currentPassword: z.string().nullable(),
Expand Down Expand Up @@ -79,6 +80,7 @@ export const ProfileForm = () => {

const form = useForm<Profile>({
defaultValues: {
name: data?.user?.name || "",
email: data?.user?.email || "",
password: "",
image: data?.user?.image || "",
Expand Down Expand Up @@ -114,6 +116,7 @@ export const ProfileForm = () => {

const onSubmit = async (values: Profile) => {
await mutateAsync({
name: values.name,
email: values.email.toLowerCase(),
password: values.password || undefined,
image: values.image,
Expand Down Expand Up @@ -167,6 +170,22 @@ export const ProfileForm = () => {
className="grid gap-4"
>
<div className="space-y-4">
<FormField
control={form.control}
name="name"
render={({ field }) => (
<FormItem>
<FormLabel>{t("Name")}</FormLabel>
<FormControl>
<Input
placeholder={t("name")}
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="email"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const Schema = z.object({
description: z.string().optional(),
ipAddress: z.string().min(1, {
message: "IP Address is required",
}),
}).trim(),
port: z.number().optional(),
username: z.string().optional(),
sshKeyId: z.string().min(1, {
Expand Down
2 changes: 1 addition & 1 deletion apps/dokploy/components/layouts/user-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const UserNav = () => {
<AvatarFallback className="rounded-lg">CN</AvatarFallback>
</Avatar>
<div className="grid flex-1 text-left text-sm leading-tight">
<span className="truncate font-semibold">Account</span>
<span className="truncate font-semibold">Name</span>
<span className="truncate text-xs">{data?.user?.email}</span>
</div>
<ChevronsUpDown className="ml-auto size-4" />
Expand Down
1 change: 1 addition & 0 deletions apps/dokploy/public/locales/en/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"settings.server.webServer.storage.cleanMonitoring": "Clean Monitoring",
"settings.server.webServer.storage.cleanAll": "Clean all",

"settings.profile.name": "Name",
"settings.profile.title": "Account",
"settings.profile.description": "Change the details of your profile here.",
"settings.profile.email": "Email",
Expand Down
Loading