refactor: consolidate game components and add toast notifications

- Remove EndlosGame support and GameDetail141.jsx component
- Add Toast notification system with CSS styling
- Refactor GameCompletionModal with enhanced styling
- Improve GameDetail component structure and styling
- Add BaseLayout.astro for consistent page structure
- Update gameService with cleaner logic
- Enhance global styles and remove unused constants
- Streamline navigation components
This commit is contained in:
Frank Schwenk
2025-10-28 16:30:39 +01:00
parent d1e1616faa
commit 8bbe3b9b70
15 changed files with 532 additions and 433 deletions

View File

@@ -479,7 +479,7 @@ const Player3Step = ({ playerNameHistory, onNext, onCancel, initialValue = '' })
*/
const GameTypeStep = ({ onNext, onCancel, initialValue = '' }) => {
const [gameType, setGameType] = useState(initialValue);
const gameTypes = ['8-Ball', '9-Ball', '10-Ball', '14/1 endlos'];
const gameTypes = ['8-Ball', '9-Ball', '10-Ball'];
const handleSelect = (selectedType) => {
setGameType(selectedType);
@@ -561,14 +561,8 @@ const GameTypeStep = ({ onNext, onCancel, initialValue = '' }) => {
* @returns {import('preact').VNode}
*/
const RaceToStep = ({ onNext, onCancel, initialValue = '', gameType }) => {
let quickPicks, defaultValue;
if (gameType === '14/1 endlos') {
quickPicks = [60, 70, 80, 90, 100];
defaultValue = 80;
} else {
quickPicks = [1, 2, 3, 4, 5, 6, 7, 8, 9];
defaultValue = 5;
}
const quickPicks = [1, 2, 3, 4, 5, 6, 7, 8, 9];
const defaultValue = 5;
const [raceTo, setRaceTo] = useState(initialValue !== '' ? initialValue : defaultValue);
useEffect(() => {