MCPcopy Create free account
hub / github.com/baiwumm/react-admin / OsIconMap

Function OsIconMap

Xmw_web/src/utils/index.ts:306–322  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

304
305/** @description: 操作系统图标映射 */
306export const OsIconMap = (text: string): string | undefined => {
307 const iconMap: Record<string, string> = {
308 Windows: 'logos:microsoft-windows-icon',
309 'Mac OS': 'logos:apple',
310 Linux: 'logos:linux-tux',
311 Android: 'logos:android-icon',
312 iOS: 'logos:apple',
313 Chrome: 'logos:chrome',
314 };
315 for (let i = 0; i < keys(iconMap).length; i += 1) {
316 const item = keys(iconMap)[i];
317 if (startsWith(toLower(text), toLower(item))) {
318 return iconMap[item];
319 }
320 }
321 return undefined;
322};

Callers 1

OperationLogFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected