Skip to content

Commit

Permalink
💄 fix: add Windows Phone, iPadOS, BlackBerry OS, Linux OS and Chrome …
Browse files Browse the repository at this point in the history
…OS sync icons (#2139)
  • Loading branch information
MapleEve authored Apr 22, 2024
1 parent 4268d8b commit 8ed1f07
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/app/settings/sync/components/SystemIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SiAndroid, SiApple, SiWindows11 } from '@icons-pack/react-simple-icons';
import {SiAndroid, SiApple, SiBlackberry, SiGooglechrome, SiLinux, SiWindows11} from '@icons-pack/react-simple-icons';
import { memo } from 'react';

// TODO: 等 simple icons 修复类型,移除 ignore
Expand All @@ -7,14 +7,23 @@ const SystemIcon = memo<{ title?: string }>(({ title }) => {
if (!title) return;

// @ts-ignore
if (['Mac OS', 'iOS'].includes(title)) return <SiApple size={32} />;
if (['Mac OS', 'iOS', 'iPadOS'].includes(title)) return <SiApple size={32} />;

// @ts-ignore
if (title === 'Windows') return <SiWindows11 size={32} />;
if (['Windows'].includes(title))return <SiWindows11 size={32} />;

// @ts-ignore
if (title === 'Android') return <SiAndroid size={32} />;

// @ts-ignore
if (['BlackBerry'].includes(title))return <SiBlackberry size={32} />;

// @ts-ignore
if (title === 'Linux') return <SiLinux size={32} />;

// @ts-ignore
if (title === 'Chrome OS') return <SiGooglechrome size={32} />;

return null;
});

Expand Down

0 comments on commit 8ed1f07

Please sign in to comment.