Skip to content

Commit 18caa9c

Browse files
author
ppanel-web
committed
Merge branch 'revert/ced5c1d-liquid-glass'
2 parents 5224826 + 0ab2388 commit 18caa9c

File tree

18 files changed

+51
-609
lines changed

18 files changed

+51
-609
lines changed

apps/admin/src/sections/auth-control/forms/apple-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ export default function AppleForm() {
287287
<FormDescription>
288288
{t(
289289
"apple.redirectUriDescription",
290-
"Backend API callback URL that Apple will POST to (e.g. https://api.example.com/v1/auth/oauth/callback/apple). Must be registered in Apple Developer Portal."
290+
"API address for redirect URL after successful Apple authentication. Do not end with /"
291291
)}
292292
</FormDescription>
293293
<FormMessage />

apps/admin/src/sections/auth-control/forms/google-form.tsx

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,15 @@ import { toast } from "sonner";
3333
import { z } from "zod";
3434

3535
const googleSchema = z.object({
36-
enabled: z.boolean(),
37-
client_id: z.string().optional(),
38-
client_secret: z.string().optional(),
36+
id: z.number(),
37+
method: z.string().default("google").optional(),
38+
enabled: z.boolean().default(false).optional(),
39+
config: z
40+
.object({
41+
client_id: z.string().optional(),
42+
client_secret: z.string().optional(),
43+
})
44+
.optional(),
3945
});
4046

4147
type GoogleFormData = z.infer<typeof googleSchema>;
@@ -59,34 +65,26 @@ export default function GoogleForm() {
5965
const form = useForm<GoogleFormData>({
6066
resolver: zodResolver(googleSchema),
6167
defaultValues: {
68+
id: 0,
69+
method: "google",
6270
enabled: false,
63-
client_id: "",
64-
client_secret: "",
71+
config: {
72+
client_id: "",
73+
client_secret: "",
74+
},
6575
},
6676
});
6777

6878
useEffect(() => {
6979
if (data) {
70-
form.reset({
71-
enabled: data.enabled,
72-
client_id: data.config?.client_id || "",
73-
client_secret: data.config?.client_secret || "",
74-
});
80+
form.reset(data);
7581
}
7682
}, [data, form]);
7783

7884
async function onSubmit(values: GoogleFormData) {
7985
setLoading(true);
8086
try {
81-
await updateAuthMethodConfig({
82-
...data,
83-
enabled: values.enabled,
84-
config: {
85-
...data?.config,
86-
client_id: values.client_id,
87-
client_secret: values.client_secret,
88-
},
89-
} as API.UpdateAuthMethodConfigRequest);
87+
await updateAuthMethodConfig(values as API.UpdateAuthMethodConfigRequest);
9088
toast.success(t("common.saveSuccess", "Saved successfully"));
9189
refetch();
9290
setOpen(false);
@@ -157,7 +155,7 @@ export default function GoogleForm() {
157155

158156
<FormField
159157
control={form.control}
160-
name="client_id"
158+
name="config.client_id"
161159
render={({ field }) => (
162160
<FormItem>
163161
<FormLabel>{t("google.clientId", "Client ID")}</FormLabel>
@@ -181,7 +179,7 @@ export default function GoogleForm() {
181179

182180
<FormField
183181
control={form.control}
184-
name="client_secret"
182+
name="config.client_secret"
185183
render={({ field }) => (
186184
<FormItem>
187185
<FormLabel>

apps/user/src/components/not-found.tsx

Lines changed: 0 additions & 23 deletions
This file was deleted.

apps/user/src/components/route-error.tsx

Lines changed: 0 additions & 30 deletions
This file was deleted.

apps/user/src/layout/header.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,7 @@ export default function Header() {
2020
</Link>
2121
);
2222
return (
23-
<header
24-
className="sticky top-0 z-50 border-b"
25-
style={{
26-
background: "var(--glass-bg)",
27-
backdropFilter: "var(--glass-blur)",
28-
WebkitBackdropFilter: "var(--glass-blur)",
29-
borderBottomColor: "var(--glass-border)",
30-
boxShadow: "var(--glass-shadow)",
31-
}}
32-
>
23+
<header className="sticky top-0 z-50 border-b backdrop-blur-md">
3324
<div className="container flex h-16 items-center justify-between">
3425
<nav className="flex-col gap-6 font-medium text-lg md:flex md:flex-row md:items-center md:gap-5 md:text-sm lg:gap-6">
3526
{Logo}

0 commit comments

Comments
 (0)