From 890e9e6c53f4b75dab53bc089bbac04bfa9a8951 Mon Sep 17 00:00:00 2001 From: PEDZEO Date: Tue, 20 Jan 2026 02:58:58 +0300 Subject: [PATCH] Add app icons to ConnectionModal: implement custom SVG icons for Happ, ClashMeta, ClashVerge, Shadowrocket, and Streisand. Update icon rendering logic to use new icons based on app names, enhancing visual representation in the modal. --- src/components/ConnectionModal.tsx | 68 +++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/src/components/ConnectionModal.tsx b/src/components/ConnectionModal.tsx index fc5a92d..ae7d8bf 100644 --- a/src/components/ConnectionModal.tsx +++ b/src/components/ConnectionModal.tsx @@ -93,6 +93,72 @@ const platformIconComponents: Record = { appleTV: TvIcon, } +// App icons +const HappIcon = () => ( + + + + + + + + +) + +const ClashMetaIcon = () => ( + + + + + + + + +) + +const ClashVergeIcon = () => ( + + + + + + +) + +const ShadowrocketIcon = () => ( + + + +) + +const StreisandIcon = () => ( + + + +) + +// App icon mapping by name (case-insensitive) +const getAppIcon = (appName: string, isFeatured: boolean): React.ReactNode => { + const name = appName.toLowerCase() + if (name.includes('happ')) { + return + } + if (name.includes('shadowrocket') || name.includes('rocket')) { + return + } + if (name.includes('streisand')) { + return + } + if (name.includes('verge')) { + return + } + if (name.includes('clash') || name.includes('meta')) { + return + } + // Default icons + return isFeatured ? '⭐' : '📦' +} + // Platform order for display const platformOrder = ['ios', 'android', 'windows', 'macos', 'linux', 'androidTV', 'appleTV'] @@ -402,7 +468,7 @@ export default function ConnectionModal({ onClose }: ConnectionModalProps) { >
- {app.isFeatured ? '⭐' : '📦'} + {getAppIcon(app.name, app.isFeatured)}