Skip to content

Commit 009cb05

Browse files
[autofix.ci] apply automated fixes
1 parent e0470d6 commit 009cb05

File tree

6 files changed

+52
-36
lines changed

6 files changed

+52
-36
lines changed

apps/dokploy/components/dashboard/settings/user-interface/user-interface-form.tsx

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ const userInterfaceSchema = z.object({
3333
type UserInterfaceForm = z.infer<typeof userInterfaceSchema>;
3434

3535
export const UserInterfaceForm = () => {
36-
const { data, refetch, isLoading } = api.settings.getUserInterfaceSettings.useQuery();
37-
const { mutateAsync, isLoading: isUpdating } = api.settings.updateUserInterfaceSettings.useMutation();
36+
const { data, refetch, isLoading } =
37+
api.settings.getUserInterfaceSettings.useQuery();
38+
const { mutateAsync, isLoading: isUpdating } =
39+
api.settings.updateUserInterfaceSettings.useMutation();
3840

3941
const form = useForm<UserInterfaceForm>({
4042
defaultValues: {
@@ -56,7 +58,7 @@ export const UserInterfaceForm = () => {
5658
await mutateAsync({
5759
loginPageImage: values.loginPageImage || null,
5860
});
59-
61+
6062
toast.success("User interface settings updated successfully");
6163
await refetch();
6264
} catch (error) {
@@ -79,7 +81,10 @@ export const UserInterfaceForm = () => {
7981
</CardHeader>
8082
<CardContent className="space-y-6 py-8 border-t">
8183
<Form {...form}>
82-
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-6">
84+
<form
85+
onSubmit={form.handleSubmit(onSubmit)}
86+
className="space-y-6"
87+
>
8388
<FormField
8489
control={form.control}
8590
name="loginPageImage"
@@ -94,38 +99,41 @@ export const UserInterfaceForm = () => {
9499
/>
95100
</FormControl>
96101
<FormDescription>
97-
URL of the background image to display on login page. Leave empty to use default.
102+
URL of the background image to display on login page.
103+
Leave empty to use default.
98104
</FormDescription>
99105
<FormMessage />
100106
</FormItem>
101107
)}
102108
/>
103-
109+
104110
{form.watch("loginPageImage") && (
105111
<div className="rounded-md border p-4">
106-
<p className="text-sm text-muted-foreground mb-2">Preview:</p>
112+
<p className="text-sm text-muted-foreground mb-2">
113+
Preview:
114+
</p>
107115
<div className="relative w-20 rounded-sm overflow-hidden bg-muted">
108116
<img
109117
src={form.watch("loginPageImage")}
110118
alt="Login page background preview"
111119
className="h-full w-full object-cover"
112120
onError={(e) => {
113-
e.currentTarget.style.display = 'none';
114-
(e.currentTarget.nextElementSibling as HTMLElement).style.display = 'flex';
121+
e.currentTarget.style.display = "none";
122+
(
123+
e.currentTarget.nextElementSibling as HTMLElement
124+
).style.display = "flex";
115125
}}
116126
/>
117-
<div
118-
className="hidden h-full w-full items-center justify-center text-sm text-muted-foreground"
119-
>
127+
<div className="hidden h-full w-full items-center justify-center text-sm text-muted-foreground">
120128
Failed to load image
121129
</div>
122130
</div>
123131
</div>
124132
)}
125133

126134
<div className="flex justify-end">
127-
<Button
128-
type="submit"
135+
<Button
136+
type="submit"
129137
isLoading={isUpdating}
130138
disabled={isLoading}
131139
>
@@ -139,4 +147,4 @@ export const UserInterfaceForm = () => {
139147
</Card>
140148
</div>
141149
);
142-
};
150+
};

apps/dokploy/components/layouts/onboarding-layout.tsx

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,37 +16,45 @@ export const OnboardingLayout = ({ children }: Props) => {
1616
return (
1717
<div className="container relative min-h-svh flex-col items-center justify-center flex lg:max-w-none lg:grid lg:grid-cols-2 lg:px-0 w-full">
1818
<div className="relative hidden h-full flex-col p-10 text-primary dark:border-r lg:flex">
19-
<div
19+
<div
2020
className="absolute inset-0"
2121
style={{
22-
backgroundImage: backgroundImage ? `url(${backgroundImage})` : undefined,
23-
backgroundSize: 'cover',
24-
backgroundPosition: 'center',
25-
backgroundRepeat: 'no-repeat',
22+
backgroundImage: backgroundImage
23+
? `url(${backgroundImage})`
24+
: undefined,
25+
backgroundSize: "cover",
26+
backgroundPosition: "center",
27+
backgroundRepeat: "no-repeat",
2628
}}
2729
>
28-
<div className={cn(
29-
"absolute inset-0",
30-
backgroundImage ? "bg-black/40" : "bg-muted"
31-
)} />
30+
<div
31+
className={cn(
32+
"absolute inset-0",
33+
backgroundImage ? "bg-black/40" : "bg-muted",
34+
)}
35+
/>
3236
</div>
3337
<Link
3438
href="https://dokploy.com"
3539
className="relative z-20 flex items-center text-lg font-medium gap-4 text-primary"
3640
>
3741
<Logo className="size-10" />
38-
<span className={cn(
39-
backgroundImage ? "text-white drop-shadow-lg" : "text-primary"
40-
)}>
42+
<span
43+
className={cn(
44+
backgroundImage ? "text-white drop-shadow-lg" : "text-primary",
45+
)}
46+
>
4147
Dokploy
4248
</span>
4349
</Link>
4450
<div className="relative z-20 mt-auto">
4551
<blockquote className="space-y-2">
46-
<p className={cn(
47-
"text-lg",
48-
backgroundImage ? "text-white drop-shadow-lg" : "text-primary"
49-
)}>
52+
<p
53+
className={cn(
54+
"text-lg",
55+
backgroundImage ? "text-white drop-shadow-lg" : "text-primary",
56+
)}
57+
>
5058
&ldquo;The Open Source alternative to Netlify, Vercel,
5159
Heroku.&rdquo;
5260
</p>

apps/dokploy/pages/dashboard/settings/user-interface.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ export async function getServerSideProps(
5050
...(await serverSideTranslations(locale, ["settings"])),
5151
},
5252
};
53-
}
53+
}

apps/dokploy/server/api/routers/settings.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -930,11 +930,11 @@ export const settingsRouter = createTRPCRouter({
930930
if (IS_CLOUD) {
931931
return null;
932932
}
933-
933+
934934
const settings = await updateUserInterfaceSettings({
935935
loginPageImage: input.loginPageImage,
936936
});
937-
937+
938938
return {
939939
loginPageImage: settings?.loginPageImage || null,
940940
};

packages/server/src/db/schema/user-interface-settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ const createSchema = createInsertSchema(userInterfaceSettings, {
2626

2727
export const apiUpdateUserInterfaceSettings = createSchema.partial().extend({
2828
loginPageImage: z.string().url().optional().nullable(),
29-
});
29+
});

packages/server/src/services/user-interface-settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ export const updateUserInterfaceSettings = async (
4141
.returning();
4242

4343
return updated;
44-
};
44+
};

0 commit comments

Comments
 (0)