feat: add real OS logo icons for 16 operating systems

Replace Phosphor generic icons with branded logos from
ngeenx/operating-system-logos. Covers Windows, macOS, Linux, Android,
iOS, ChromeOS, HarmonyOS, KaiOS, Tizen, webOS, FreeBSD, OpenBSD,
NetBSD, PlayStation, Xbox, and Nintendo.
This commit is contained in:
Usman Baig
2026-03-19 11:23:29 +01:00
parent a7ac2cb9d7
commit 1696e428ab
17 changed files with 22 additions and 11 deletions

View File

@@ -1,10 +1,6 @@
import React from 'react' import React from 'react'
import { import {
Globe, Globe,
WindowsLogo,
AppleLogo,
LinuxLogo,
AndroidLogo,
Question, Question,
DeviceMobile, DeviceMobile,
DeviceTablet, DeviceTablet,
@@ -62,15 +58,30 @@ export function getBrowserIcon(browserName: string) {
return <img src={src} alt={browserName} width={18} height={18} className="inline-block" style={{ verticalAlign: '-0.125em' }} /> return <img src={src} alt={browserName} width={18} height={18} className="inline-block" style={{ verticalAlign: '-0.125em' }} />
} }
const OS_ICON_MAP: Record<string, string> = {
'windows': 'windows',
'macos': 'macos',
'linux': 'linux',
'android': 'android',
'ios': 'ios',
'chromeos': 'chromeos',
'harmonyos': 'harmonyos',
'kaios': 'kaios',
'tizen': 'tizen',
'webos': 'webos',
'freebsd': 'freebsd',
'openbsd': 'openbsd',
'netbsd': 'netbsd',
'playstation': 'playstation',
'xbox': 'xbox',
'nintendo': 'nintendo',
}
export function getOSIcon(osName: string) { export function getOSIcon(osName: string) {
if (!osName) return <Question className="text-neutral-400" /> if (!osName) return <Question className="text-neutral-400" />
const lower = osName.toLowerCase() const file = OS_ICON_MAP[osName.toLowerCase()]
if (lower.includes('win')) return <WindowsLogo className="text-blue-500" /> if (!file) return <Question className="text-neutral-400" />
if (lower.includes('mac') || lower.includes('ios')) return <AppleLogo className="text-neutral-800 dark:text-neutral-200" /> return <img src={`/icons/os/${file}.png`} alt={osName} width={18} height={18} className="inline-block" style={{ verticalAlign: '-0.125em' }} />
if (lower.includes('linux') || lower.includes('ubuntu') || lower.includes('debian')) return <LinuxLogo className="text-neutral-800 dark:text-neutral-200" />
if (lower.includes('android')) return <AndroidLogo className="text-green-500" />
return <Question className="text-neutral-400" />
} }
export function getDeviceIcon(deviceName: string) { export function getDeviceIcon(deviceName: string) {

BIN
public/icons/os/android.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
public/icons/os/freebsd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
public/icons/os/ios.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
public/icons/os/kaios.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
public/icons/os/linux.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
public/icons/os/macos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
public/icons/os/netbsd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
public/icons/os/openbsd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
public/icons/os/tizen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
public/icons/os/webos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
public/icons/os/windows.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
public/icons/os/xbox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB