From 46ad6caefd830bf73a9eb6ee06ff8ad3ab58a116 Mon Sep 17 00:00:00 2001
From: GitG0r0 <145980798+GitG0r0@users.noreply.github.com>
Date: Wed, 22 Oct 2025 19:52:45 +0200
Subject: [PATCH] =?UTF-8?q?refactor(deck-creator):=20statisztika=20panel?=
=?UTF-8?q?=20elt=C3=A1vol=C3=ADt=C3=A1sa=20=C3=A9s=20layout=20optimaliz?=
=?UTF-8?q?=C3=A1l=C3=A1sa?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Statisztika panel eltávolítva
- Grid elrendezés egyszerűsítve
- Felesleges kód eltávolítva
- Jobb helykihasználás az űrlap elemeknek
---
.../src/components/DeckCreator/DeckHeader.jsx | 289 ++++++++----------
1 file changed, 127 insertions(+), 162 deletions(-)
diff --git a/SerpentRace_Frontend/src/components/DeckCreator/DeckHeader.jsx b/SerpentRace_Frontend/src/components/DeckCreator/DeckHeader.jsx
index 408b0251..22d8dcd1 100644
--- a/SerpentRace_Frontend/src/components/DeckCreator/DeckHeader.jsx
+++ b/SerpentRace_Frontend/src/components/DeckCreator/DeckHeader.jsx
@@ -44,10 +44,7 @@ export default function DeckHeader({ deck, onUpdate, onSave, onBack }) {
onUpdate({ [field]: value })
}
- const cardsCount = deck.cards?.length || 0
- const taskCards = deck.cards?.filter(card => card.type === 'task')?.length || 0
- const jokerCards = deck.cards?.filter(card => card.type === 'joker')?.length || 0
- const luckCards = deck.cards?.filter(card => card.type === 'luck')?.length || 0
+ // Remove unused card count variables
return (
@@ -77,172 +74,140 @@ export default function DeckHeader({ deck, onUpdate, onSave, onBack }) {
{/* Main Content Row */}
-
- {/* Deck Basic Info */}
-
- {/* Deck Name */}
+
+ {/* Deck Name */}
+
+
+ handleInputChange('name', e.target.value)}
+ className="w-full px-4 py-2 rounded-xl bg-[color:var(--color-background)] border border-[color:var(--color-surface-selected)] text-[color:var(--color-text)] focus:ring-2 focus:ring-[color:var(--color-success)] focus:border-transparent outline-none transition-all duration-200"
+ placeholder="Add meg a pakli nevét..."
+ />
+
+
+ {/* Type, Privacy and Description Row */}
+
+ {/* Deck Type */}
+
+
+
+ {isTypeDropdownOpen && (
+
+ {deckTypes.map(type => (
+
+ ))}
+
+ )}
+
+
+
+ {/* Privacy */}
+
+
+
+
+
+ {isPrivacyDropdownOpen && (
+
+ {privacyOptions.map(option => (
+
+ ))}
+
+ )}
+
+
+
+ {/* Description */}
+
+
handleInputChange('name', e.target.value)}
+ value={deck.description}
+ onChange={(e) => handleInputChange('description', e.target.value)}
className="w-full px-4 py-2 rounded-xl bg-[color:var(--color-background)] border border-[color:var(--color-surface-selected)] text-[color:var(--color-text)] focus:ring-2 focus:ring-[color:var(--color-success)] focus:border-transparent outline-none transition-all duration-200"
- placeholder="Add meg a pakli nevét..."
+ placeholder="Rövid leírás..."
/>
-
- {/* Type and Privacy Row */}
-
- {/* Deck Type */}
-
-
-
-
-
- {isTypeDropdownOpen && (
-
- {deckTypes.map(type => (
-
- ))}
-
- )}
-
-
-
- {/* Privacy */}
-
-
-
-
-
- {isPrivacyDropdownOpen && (
-
- {privacyOptions.map(option => (
-
- ))}
-
- )}
-
-
-
- {/* Description */}
-
-
- handleInputChange('description', e.target.value)}
- className="w-full px-4 py-2 rounded-xl bg-[color:var(--color-background)] border border-[color:var(--color-surface-selected)] text-[color:var(--color-text)] focus:ring-2 focus:ring-[color:var(--color-success)] focus:border-transparent outline-none transition-all duration-200"
- placeholder="Rövid leírás..."
- />
-
-
-
-
- {/* Stats Panel */}
-
-
- 📊 Statisztikák
-
-
-
-
- Összes kártya:
- {cardsCount}
-
-
-
- 📋 Feladat:
- {taskCards}
-
-
-
- 🃏 Joker:
- {jokerCards}
-
-
-
- 🎲 Szerencse:
- {luckCards}
-
-