Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
pompurin404 committed Oct 9, 2024
1 parent 72c1acd commit 14075c6
Showing 1 changed file with 27 additions and 24 deletions.
51 changes: 27 additions & 24 deletions src/renderer/src/components/settings/general-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,31 +196,34 @@ const GeneralConfig: React.FC = () => {
}}
/>
</SettingItem>
<SettingItem title="根据网速旋转悬浮窗图标" divider>
<Switch
size="sm"
isSelected={spinFloatingIcon}
onValueChange={async (v) => {
await patchAppConfig({ spinFloatingIcon: v })
window.electron.ipcRenderer.send('updateFloatingWindow')
}}
/>
</SettingItem>

{showFloating && (
<SettingItem title="禁用托盘图标" divider>
<Switch
size="sm"
isSelected={disableTray}
onValueChange={async (v) => {
await patchAppConfig({ disableTray: v })
if (v) {
closeTrayIcon()
} else {
showTrayIcon()
}
}}
/>
</SettingItem>
<>
<SettingItem title="根据网速旋转悬浮窗图标" divider>
<Switch
size="sm"
isSelected={spinFloatingIcon}
onValueChange={async (v) => {
await patchAppConfig({ spinFloatingIcon: v })
window.electron.ipcRenderer.send('updateFloatingWindow')
}}
/>
</SettingItem>
<SettingItem title="禁用托盘图标" divider>
<Switch
size="sm"
isSelected={disableTray}
onValueChange={async (v) => {
await patchAppConfig({ disableTray: v })
if (v) {
closeTrayIcon()
} else {
showTrayIcon()
}
}}
/>
</SettingItem>
</>
)}
{platform !== 'linux' && (
<>
Expand Down

0 comments on commit 14075c6

Please sign in to comment.