mirror of
https://github.com/yusufipk/distromatch.git
synced 2026-09-11 18:56:06 +00:00
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
This commit is contained in:
@@ -10,11 +10,14 @@ interface DECardProps {
|
|||||||
resourceUsage: string;
|
resourceUsage: string;
|
||||||
customization: string;
|
customization: string;
|
||||||
colorPalette: string[];
|
colorPalette: string[];
|
||||||
|
image?: string;
|
||||||
};
|
};
|
||||||
onSwipe: (direction: 'left' | 'right' | 'super') => void;
|
onSwipe: (direction: 'left' | 'right' | 'super') => void;
|
||||||
isTop: boolean;
|
isTop: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const deImages: Record<string, string> = {};
|
||||||
|
|
||||||
const styleIcons: Record<string, typeof Monitor> = {
|
const styleIcons: Record<string, typeof Monitor> = {
|
||||||
'modern': Settings,
|
'modern': Settings,
|
||||||
'minimalist': Feather,
|
'minimalist': Feather,
|
||||||
@@ -113,16 +116,35 @@ export default function DECard({ de, onSwipe, isTop }: DECardProps) {
|
|||||||
GEÇ
|
GEÇ
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|
||||||
<div className="relative z-10 flex flex-col items-center justify-center p-12 text-center">
|
<div className="relative z-10 flex flex-col items-center justify-center p-8 text-center">
|
||||||
<div
|
{de.image ? (
|
||||||
className="mb-6 flex h-24 w-24 items-center justify-center rounded-2xl"
|
<div
|
||||||
style={{
|
className="mb-6 w-full max-w-lg h-48 rounded-xl overflow-hidden"
|
||||||
background: `linear-gradient(135deg, ${primaryColor}, ${secondaryColor})`,
|
style={{
|
||||||
boxShadow: `0 10px 40px ${primaryColor}50`,
|
boxShadow: `0 10px 40px ${primaryColor}50`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<StyleIcon className="h-12 w-12 text-white" />
|
<img
|
||||||
</div>
|
src={`/de_screenshots/${de.image}`}
|
||||||
|
alt={de.name}
|
||||||
|
className="w-full h-full object-cover"
|
||||||
|
onError={(e) => {
|
||||||
|
e.currentTarget.style.display = 'none';
|
||||||
|
e.currentTarget.parentElement!.style.display = 'none';
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div
|
||||||
|
className="mb-6 flex h-24 w-24 items-center justify-center rounded-2xl"
|
||||||
|
style={{
|
||||||
|
background: `linear-gradient(135deg, ${primaryColor}, ${secondaryColor})`,
|
||||||
|
boxShadow: `0 10px 40px ${primaryColor}50`,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<StyleIcon className="h-12 w-12 text-white" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<h2
|
<h2
|
||||||
className="mb-3 font-['Space_Grotesk'] text-4xl font-bold"
|
className="mb-3 font-['Space_Grotesk'] text-4xl font-bold"
|
||||||
|
|||||||
@@ -636,7 +636,8 @@
|
|||||||
"style": "modern",
|
"style": "modern",
|
||||||
"resourceUsage": "medium-high",
|
"resourceUsage": "medium-high",
|
||||||
"customization": "extreme",
|
"customization": "extreme",
|
||||||
"colorPalette": ["#1D99F3", "#3DAEE9", "#0D5A8F"]
|
"colorPalette": ["#1D99F3", "#3DAEE9", "#0D5A8F"],
|
||||||
|
"image": "kde.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "gnome",
|
"id": "gnome",
|
||||||
@@ -645,7 +646,8 @@
|
|||||||
"style": "minimalist",
|
"style": "minimalist",
|
||||||
"resourceUsage": "medium-high",
|
"resourceUsage": "medium-high",
|
||||||
"customization": "limited",
|
"customization": "limited",
|
||||||
"colorPalette": ["#4A86CF", "#3584E4", "#1C71D8"]
|
"colorPalette": ["#4A86CF", "#3584E4", "#1C71D8"],
|
||||||
|
"image": "gnome.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "xfce",
|
"id": "xfce",
|
||||||
@@ -654,7 +656,8 @@
|
|||||||
"style": "traditional",
|
"style": "traditional",
|
||||||
"resourceUsage": "low",
|
"resourceUsage": "low",
|
||||||
"customization": "moderate",
|
"customization": "moderate",
|
||||||
"colorPalette": ["#2EB8E6", "#00AAD4", "#007EA8"]
|
"colorPalette": ["#2EB8E6", "#00AAD4", "#007EA8"],
|
||||||
|
"image": "xfce.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "cinnamon",
|
"id": "cinnamon",
|
||||||
@@ -663,7 +666,8 @@
|
|||||||
"style": "traditional",
|
"style": "traditional",
|
||||||
"resourceUsage": "medium",
|
"resourceUsage": "medium",
|
||||||
"customization": "good",
|
"customization": "good",
|
||||||
"colorPalette": ["#87CF3E", "#6BBD2B", "#4E9A1A"]
|
"colorPalette": ["#87CF3E", "#6BBD2B", "#4E9A1A"],
|
||||||
|
"image": "cinnamon.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "mate",
|
"id": "mate",
|
||||||
@@ -672,7 +676,8 @@
|
|||||||
"style": "traditional",
|
"style": "traditional",
|
||||||
"resourceUsage": "low-medium",
|
"resourceUsage": "low-medium",
|
||||||
"customization": "good",
|
"customization": "good",
|
||||||
"colorPalette": ["#6CAD54", "#4E8A3A", "#356425"]
|
"colorPalette": ["#6CAD54", "#4E8A3A", "#356425"],
|
||||||
|
"image": "mate.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "lxqt",
|
"id": "lxqt",
|
||||||
@@ -681,7 +686,8 @@
|
|||||||
"style": "minimal",
|
"style": "minimal",
|
||||||
"resourceUsage": "very-low",
|
"resourceUsage": "very-low",
|
||||||
"customization": "moderate",
|
"customization": "moderate",
|
||||||
"colorPalette": ["#0099CC", "#0077AA", "#005588"]
|
"colorPalette": ["#0099CC", "#0077AA", "#005588"],
|
||||||
|
"image": "lxqt.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "budgie",
|
"id": "budgie",
|
||||||
@@ -690,7 +696,8 @@
|
|||||||
"style": "modern",
|
"style": "modern",
|
||||||
"resourceUsage": "medium",
|
"resourceUsage": "medium",
|
||||||
"customization": "moderate",
|
"customization": "moderate",
|
||||||
"colorPalette": ["#6BCA81", "#4CAF50", "#388E3C"]
|
"colorPalette": ["#6BCA81", "#4CAF50", "#388E3C"],
|
||||||
|
"image": "budgie.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "pantheon",
|
"id": "pantheon",
|
||||||
@@ -699,7 +706,8 @@
|
|||||||
"style": "mac-like",
|
"style": "mac-like",
|
||||||
"resourceUsage": "medium",
|
"resourceUsage": "medium",
|
||||||
"customization": "very-limited",
|
"customization": "very-limited",
|
||||||
"colorPalette": ["#64BAFF", "#3689E6", "#0D52BF"]
|
"colorPalette": ["#64BAFF", "#3689E6", "#0D52BF"],
|
||||||
|
"image": "pantheon.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "cosmic",
|
"id": "cosmic",
|
||||||
@@ -708,7 +716,8 @@
|
|||||||
"style": "modern",
|
"style": "modern",
|
||||||
"resourceUsage": "medium",
|
"resourceUsage": "medium",
|
||||||
"customization": "good",
|
"customization": "good",
|
||||||
"colorPalette": ["#FAA41A", "#48B9C7", "#574F4A"]
|
"colorPalette": ["#FAA41A", "#48B9C7", "#574F4A"],
|
||||||
|
"image": "cosmic.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "dde",
|
"id": "dde",
|
||||||
@@ -717,7 +726,8 @@
|
|||||||
"style": "beautiful",
|
"style": "beautiful",
|
||||||
"resourceUsage": "medium-high",
|
"resourceUsage": "medium-high",
|
||||||
"customization": "moderate",
|
"customization": "moderate",
|
||||||
"colorPalette": ["#0082FC", "#006DD9", "#0052A3"]
|
"colorPalette": ["#0082FC", "#006DD9", "#0052A3"],
|
||||||
|
"image": "dde.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "i3",
|
"id": "i3",
|
||||||
@@ -726,7 +736,8 @@
|
|||||||
"style": "minimal-tiling",
|
"style": "minimal-tiling",
|
||||||
"resourceUsage": "very-low",
|
"resourceUsage": "very-low",
|
||||||
"customization": "extreme",
|
"customization": "extreme",
|
||||||
"colorPalette": ["#285577", "#1C3D5A", "#122A40"]
|
"colorPalette": ["#285577", "#1C3D5A", "#122A40"],
|
||||||
|
"image": "i3.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "hyprland",
|
"id": "hyprland",
|
||||||
@@ -735,7 +746,8 @@
|
|||||||
"style": "minimal-tiling",
|
"style": "minimal-tiling",
|
||||||
"resourceUsage": "low",
|
"resourceUsage": "low",
|
||||||
"customization": "extreme",
|
"customization": "extreme",
|
||||||
"colorPalette": ["#00D4AA", "#00B894", "#009874"]
|
"colorPalette": ["#00D4AA", "#00B894", "#009874"],
|
||||||
|
"image": "hyprland.png"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"criticalQuestions": [
|
"criticalQuestions": [
|
||||||
|
|||||||
Reference in New Issue
Block a user