Skip to content

Commit a56edae

Browse files
committed
chore(code): Fix pnpm lint
1 parent 283850b commit a56edae

File tree

8 files changed

+103
-53
lines changed

8 files changed

+103
-53
lines changed

src/components/icons/appearance-icon.tsx

Lines changed: 72 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,79 @@ export function AppearanceIcon({ className }: { className?: string }) {
1818
fill="none"
1919
/>
2020
{/* Sun rays */}
21-
<line x1="11" y1="2" x2="11" y2="4" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
22-
<line x1="11" y1="18" x2="11" y2="20" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
23-
<line x1="2" y1="11" x2="4" y2="11" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
24-
<line x1="18" y1="11" x2="20" y2="11" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
21+
<line
22+
x1="11"
23+
y1="2"
24+
x2="11"
25+
y2="4"
26+
stroke="currentColor"
27+
strokeWidth="1.5"
28+
strokeLinecap="round"
29+
/>
30+
<line
31+
x1="11"
32+
y1="18"
33+
x2="11"
34+
y2="20"
35+
stroke="currentColor"
36+
strokeWidth="1.5"
37+
strokeLinecap="round"
38+
/>
39+
<line
40+
x1="2"
41+
y1="11"
42+
x2="4"
43+
y2="11"
44+
stroke="currentColor"
45+
strokeWidth="1.5"
46+
strokeLinecap="round"
47+
/>
48+
<line
49+
x1="18"
50+
y1="11"
51+
x2="20"
52+
y2="11"
53+
stroke="currentColor"
54+
strokeWidth="1.5"
55+
strokeLinecap="round"
56+
/>
2557
{/* Diagonal rays */}
26-
<line x1="4.5" y1="4.5" x2="6" y2="6" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
27-
<line x1="16" y1="16" x2="17.5" y2="17.5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
28-
<line x1="4.5" y1="17.5" x2="6" y2="16" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
29-
<line x1="16" y1="6" x2="17.5" y2="4.5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
58+
<line
59+
x1="4.5"
60+
y1="4.5"
61+
x2="6"
62+
y2="6"
63+
stroke="currentColor"
64+
strokeWidth="1.5"
65+
strokeLinecap="round"
66+
/>
67+
<line
68+
x1="16"
69+
y1="16"
70+
x2="17.5"
71+
y2="17.5"
72+
stroke="currentColor"
73+
strokeWidth="1.5"
74+
strokeLinecap="round"
75+
/>
76+
<line
77+
x1="4.5"
78+
y1="17.5"
79+
x2="6"
80+
y2="16"
81+
stroke="currentColor"
82+
strokeWidth="1.5"
83+
strokeLinecap="round"
84+
/>
85+
<line
86+
x1="16"
87+
y1="6"
88+
x2="17.5"
89+
y2="4.5"
90+
stroke="currentColor"
91+
strokeWidth="1.5"
92+
strokeLinecap="round"
93+
/>
3094
{/* Moon crescent overlay (right side) */}
3195
<path
3296
d="M14 8C14 8 16 9.5 16 12C16 14.5 14 16 14 16C15.5 15.5 17 13.5 17 11C17 8.5 15.5 6.5 14 8Z"

src/page/sidebar/switcher/form/email-validate.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,7 @@ function EmailInputStep({
7474
</div>
7575

7676
<Form {...form}>
77-
<form
78-
onSubmit={form.handleSubmit(handleSubmit)}
79-
className="w-full"
80-
>
77+
<form onSubmit={form.handleSubmit(handleSubmit)} className="w-full">
8178
<FormField
8279
control={form.control}
8380
name="email"
@@ -282,7 +279,9 @@ export default function EmailValidate(props: IProps) {
282279
setStep('code');
283280
toast.success(t('email.code_sent'), { position: 'bottom-right' });
284281
} catch (error: any) {
285-
toast.error(error.message || t('email.send_failed'), { position: 'bottom-right' });
282+
toast.error(error.message || t('email.send_failed'), {
283+
position: 'bottom-right',
284+
});
286285
} finally {
287286
setSubmitting(false);
288287
}
@@ -293,7 +292,9 @@ export default function EmailValidate(props: IProps) {
293292
await http.post('/user/email/send-code', { email: newEmail });
294293
toast.success(t('email.code_sent'), { position: 'bottom-right' });
295294
} catch (error: any) {
296-
toast.error(error.message || t('email.send_failed'), { position: 'bottom-right' });
295+
toast.error(error.message || t('email.send_failed'), {
296+
position: 'bottom-right',
297+
});
297298
}
298299
};
299300

src/page/sidebar/switcher/form/phone-validate.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,9 @@ export default function PhoneValidate(props: IProps) {
273273
setStep('code');
274274
toast.success(t('phone.code_sent'), { position: 'bottom-right' });
275275
} catch (error: any) {
276-
toast.error(error.message || t('phone.send_failed'), { position: 'bottom-right' });
276+
toast.error(error.message || t('phone.send_failed'), {
277+
position: 'bottom-right',
278+
});
277279
} finally {
278280
setSubmitting(false);
279281
}
@@ -284,7 +286,9 @@ export default function PhoneValidate(props: IProps) {
284286
await http.post('/user/phone/send-code', { phone });
285287
toast.success(t('phone.code_sent'), { position: 'bottom-right' });
286288
} catch (error: any) {
287-
toast.error(error.message || t('phone.send_failed'), { position: 'bottom-right' });
289+
toast.error(error.message || t('phone.send_failed'), {
290+
position: 'bottom-right',
291+
});
288292
}
289293
};
290294

@@ -295,7 +299,9 @@ export default function PhoneValidate(props: IProps) {
295299
toast.success(t('phone.bind_success'), { position: 'bottom-right' });
296300
onFinish();
297301
} catch (error: any) {
298-
toast.error(error.message || t('phone.bind_failed'), { position: 'bottom-right' });
302+
toast.error(error.message || t('phone.bind_failed'), {
303+
position: 'bottom-right',
304+
});
299305
} finally {
300306
setSubmitting(false);
301307
}

src/page/sidebar/switcher/manage/group/data.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ interface GroupProps extends Group {
2525
}
2626

2727
export default function GroupData(props: GroupProps) {
28-
const { id, title, member, namespace_id, refetch, invitation_id } =
29-
props;
28+
const { id, title, member, namespace_id, refetch, invitation_id } = props;
3029
const { t } = useTranslation();
3130
const [fold, onFold] = useState(false);
3231
const [loading, setLoading] = useState(false);

src/page/sidebar/switcher/manage/tasks/task-type-badge.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ interface TaskTypeBadgeProps {
1616
const taskTypeConfig: Record<
1717
string,
1818
{
19-
icon: React.ComponentType<{ className?: string; style?: React.CSSProperties }>;
19+
icon: React.ComponentType<{
20+
className?: string;
21+
style?: React.CSSProperties;
22+
}>;
2023
labelKey: string;
2124
}
2225
> = {

src/page/sidebar/switcher/setting.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { VisuallyHidden } from '@radix-ui/react-visually-hidden';
2-
import { Settings, X } from 'lucide-react';
2+
import { Settings } from 'lucide-react';
33
import { useEffect, useState } from 'react';
44
import { useTranslation } from 'react-i18next';
55

@@ -10,7 +10,6 @@ import {
1010
DialogDescription,
1111
DialogHeader,
1212
DialogTitle,
13-
DialogClose,
1413
} from '@/components/ui/dialog';
1514
import useApp from '@/hooks/use-app';
1615

@@ -59,7 +58,11 @@ export default function Setting() {
5958
<DialogDescription></DialogDescription>
6059
</DialogHeader>
6160
</VisuallyHidden>
62-
<SettingWrapper initialTab={initialTab} autoAction={autoAction} onClose={() => setOpen(false)} />
61+
<SettingWrapper
62+
initialTab={initialTab}
63+
autoAction={autoAction}
64+
onClose={() => setOpen(false)}
65+
/>
6366
</DialogContent>
6467
</Dialog>
6568
);

src/page/user/email/icon.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,7 @@ export function EmailIcon() {
77
className="size-5"
88
>
99
{/* Blue envelope icon matching Figma */}
10-
<rect
11-
x="2"
12-
y="4"
13-
width="16"
14-
height="12"
15-
rx="2"
16-
fill="#38bdf8"
17-
/>
10+
<rect x="2" y="4" width="16" height="12" rx="2" fill="#38bdf8" />
1811
<path
1912
d="M2 6L10 11L18 6"
2013
stroke="#ffffff"

src/page/user/phone/icon.tsx

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,9 @@ export function PhoneIcon() {
77
className="size-5"
88
>
99
{/* Simple gray phone icon matching Figma */}
10-
<rect
11-
x="5"
12-
y="2"
13-
width="10"
14-
height="16"
15-
rx="2"
16-
fill="#a3a3a3"
17-
/>
18-
<rect
19-
x="6.5"
20-
y="3.5"
21-
width="7"
22-
height="11"
23-
rx="0.5"
24-
fill="#d4d4d4"
25-
/>
26-
<circle
27-
cx="10"
28-
cy="16"
29-
r="1"
30-
fill="#d4d4d4"
31-
/>
10+
<rect x="5" y="2" width="10" height="16" rx="2" fill="#a3a3a3" />
11+
<rect x="6.5" y="3.5" width="7" height="11" rx="0.5" fill="#d4d4d4" />
12+
<circle cx="10" cy="16" r="1" fill="#d4d4d4" />
3213
</svg>
3314
);
3415
}

0 commit comments

Comments
 (0)