From 87f57a85e1362955e21f425ead144114912b29fe Mon Sep 17 00:00:00 2001 From: yusufipk <50673822-yusufipk@users.noreply.replit.com> Date: Wed, 17 Dec 2025 14:21:55 +0000 Subject: [PATCH] Add placeholder images for desktop environments to the application Adds an `image` field to the `desktopEnvironments` in `distros.json` and updates the `DECard` component to display these images, falling back to a default icon if an image is not found. Replit-Commit-Author: Agent Replit-Commit-Session-Id: e522d728-b28a-437f-b576-83935afe7ea0 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: ad671a81-adaf-4a94-80c6-c25afcaf1677 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/55e426a8-5a2b-421b-8bd4-30481ae0063b/e522d728-b28a-437f-b576-83935afe7ea0/LmuYLyP Replit-Helium-Checkpoint-Created: true --- client/src/components/DECard.tsx | 42 ++++++++++++++++++++++++-------- client/src/data/distros.json | 36 ++++++++++++++++++--------- 2 files changed, 56 insertions(+), 22 deletions(-) diff --git a/client/src/components/DECard.tsx b/client/src/components/DECard.tsx index 8093c68..07afa99 100644 --- a/client/src/components/DECard.tsx +++ b/client/src/components/DECard.tsx @@ -10,11 +10,14 @@ interface DECardProps { resourceUsage: string; customization: string; colorPalette: string[]; + image?: string; }; onSwipe: (direction: 'left' | 'right' | 'super') => void; isTop: boolean; } +const deImages: Record = {}; + const styleIcons: Record = { 'modern': Settings, 'minimalist': Feather, @@ -113,16 +116,35 @@ export default function DECard({ de, onSwipe, isTop }: DECardProps) { GEÇ -
-
- -
+
+ {de.image ? ( +
+ {de.name} { + e.currentTarget.style.display = 'none'; + e.currentTarget.parentElement!.style.display = 'none'; + }} + /> +
+ ) : ( +
+ +
+ )}