Skip to content

Commit a7a8578

Browse files
author
pompurin404
committed
fix style
1 parent 644390f commit a7a8578

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

src/renderer/src/pages/tun.tsx

+20-18
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,25 @@ const Tun: React.FC = () => {
6565
}
6666
>
6767
<SettingCard>
68+
{platform === 'win32' && (
69+
<SettingItem title="重设防火墙" divider>
70+
<Button
71+
size="sm"
72+
color="primary"
73+
isLoading={loading}
74+
onPress={() => {
75+
setLoading(true)
76+
setupFirewall()
77+
.then(() => {
78+
new Notification('防火墙重设成功')
79+
})
80+
.finally(() => setLoading(false))
81+
}}
82+
>
83+
重设防火墙
84+
</Button>
85+
</SettingItem>
86+
)}
6887
<SettingItem title="Tun 模式堆栈" divider>
6988
<Tabs
7089
size="sm"
@@ -135,7 +154,7 @@ const Tun: React.FC = () => {
135154
}}
136155
/>
137156
</SettingItem>
138-
<SettingItem title="DNS 劫持" divider>
157+
<SettingItem title="DNS 劫持">
139158
<Input
140159
size="sm"
141160
className="w-[50%]"
@@ -145,23 +164,6 @@ const Tun: React.FC = () => {
145164
}}
146165
/>
147166
</SettingItem>
148-
<SettingItem title="重设防火墙">
149-
<Button
150-
size="sm"
151-
color="primary"
152-
isLoading={loading}
153-
onPress={() => {
154-
setLoading(true)
155-
setupFirewall()
156-
.then(() => {
157-
new Notification('防火墙重设成功')
158-
})
159-
.finally(() => setLoading(false))
160-
}}
161-
>
162-
重设防火墙
163-
</Button>
164-
</SettingItem>
165167
</SettingCard>
166168
</BasePage>
167169
)

0 commit comments

Comments
 (0)