Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ elo.js β†’ api.js β†’ state.js β†’ ui.js β†’ app.js
- **ELO source of truth is the match history**, not the stored player ELO values. Always call `recalculateStatsFromHistory()` after loading or deleting matches.
- **Doubles matches** store `winnerId`/`loserId` as comma-separated player ID strings (`"id1,id2"`). Check for commas before parsing.
- **Write operations** require `APP_SECRET`; reads are public. Supabase RLS enforces this via the `x-app-secret` header.
- The service worker (`sw.js`, cache key `speedhennen-v3`) uses cache-first for static assets and network-first for Supabase/CDN. Bump the cache version string when adding new static files to `STATIC_ASSETS`.
- The service worker (`sw.js`, cache key `eloapp-v1`) uses cache-first for static assets and network-first for Supabase/CDN. Bump the cache version string when adding new static files to `STATIC_ASSETS`.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ Alle visuellen Markenwerte werden aus dem `BRANDING`-Objekt in `config.js` geset

| Feld | Beschreibung | Standard |
|------|-------------|---------|
| `name` | App-Name (Titel + H1) | `'SpeedHennen πŸΈπŸ”'` |
| `shortName` | Kurzname fΓΌr iOS-Homescreen | `'SpeedHennen'` |
| `name` | App-Name (Titel + H1) | `'EloApp 🏸'` |
| `shortName` | Kurzname fΓΌr iOS-Homescreen | `'EloApp'` |
| `primaryColor` | Hauptfarbe (Hex) | `'#c51216'` |
| `primaryColorDark` | Hover-Farbe (optional, wird sonst berechnet) | auto |
| `fontHeading` | Überschriften-Schrift (Google Fonts Name) | `'Fredoka One'` |
Expand Down
4 changes: 2 additions & 2 deletions config.example.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ var CONFIG = {

// White-Label-Branding (alle Felder optional β€” weglassen = Standard-Design)
BRANDING: {
name: 'SpeedHennen πŸΈπŸ”', // App-Name (Titel + H1)
shortName: 'SpeedHennen', // Kurzname fΓΌr iOS Homescreen
name: 'EloApp 🏸', // App-Name (Titel + H1)
shortName: 'EloApp', // Kurzname fΓΌr iOS Homescreen

primaryColor: '#c51216', // Hauptfarbe (Hex)
// primaryColorDark: '#a30f12', // optional: Hover-Farbe (wird sonst automatisch berechnet)
Expand Down
18 changes: 9 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SpeedHennen πŸΈπŸ”</title>
<title>EloApp 🏸</title>
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#c51216">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="SpeedHennen">
<meta name="apple-mobile-web-app-title" content="EloApp">
<link rel="apple-touch-icon" href="icons/icon-192.svg">
<link rel="stylesheet" href="style.css">
<link href="https://fonts.googleapis.com/css2?family=Fredoka+One&family=Quicksand:wght@400;700&display=swap" rel="stylesheet">
Expand All @@ -20,7 +20,7 @@
</div>

<div class="header">
<h1>SpeedHennen πŸΈπŸ”</h1>
<h1>EloApp 🏸</h1>
</div>

<div class="status-area">
Expand All @@ -42,7 +42,7 @@ <h1>SpeedHennen πŸΈπŸ”</h1>
<span class="emoji">πŸ“œ</span> Spielverlauf
</div>
<div class="tab" onclick="openTab(this, 'add-player')">
<span class="emoji">πŸ”</span> Neue Henne
<span class="emoji">βž•</span> Spieler
</div>
</div>

Expand All @@ -57,7 +57,7 @@ <h2><span class="emoji">🏸</span> Neues Spiel eintragen</h2>
<!-- Einzel-Spiel Interface -->
<div id="singles-interface">
<div class="form-group">
<label for="player-search">Henne suchen:</label>
<label for="player-search">Spieler suchen:</label>
<input type="text" id="player-search" oninput="filterPlayers()" placeholder="Namen eingeben...">
</div>

Expand Down Expand Up @@ -124,12 +124,12 @@ <h3>Team 2</h3>
</div>

<div id="add-player" class="tab-content">
<h2><span class="emoji">πŸ”</span> Neue Henne hinzufΓΌgen</h2>
<h2><span class="emoji">βž•</span> Neuen Spieler hinzufΓΌgen</h2>
<div class="form-group">
<label for="playerName">Vorname:</label>
<input type="text" id="playerName" placeholder="Vorname eingeben">
</div>
<button onclick="addPlayer()">Henne hinzufΓΌgen</button>
<button onclick="addPlayer()">Spieler hinzufΓΌgen</button>
</div>

<div id="rankings" class="tab-content">
Expand Down Expand Up @@ -180,8 +180,8 @@ <h2><span class="emoji">πŸ…</span> Rangliste</h2>
</div>

<!-- Lade-Overlay -->
<div id="chicken-loader" class="chicken-overlay" aria-live="polite" aria-label="Ladevorgang lΓ€uft...">
<div class="chicken-spinner"></div>
<div id="app-loader" class="app-overlay" aria-live="polite" aria-label="Ladevorgang lΓ€uft...">
<div class="app-spinner"></div>
</div>

<div id="elo-chart" class="tab-content">
Expand Down
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SpeedHennen",
"short_name": "SpeedHennen",
"name": "EloApp",
"short_name": "EloApp",
"description": "Badminton ELO-Ranking fΓΌr Einzel und Doppel",
"start_url": "./",
"display": "standalone",
Expand Down
2 changes: 1 addition & 1 deletion src/branding.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function applyBranding(branding = {}) {
document.head.appendChild(link);
}

const appName = branding.name || 'SpeedHennen πŸΈπŸ”';
const appName = branding.name || 'EloApp 🏸';

document.title = appName;

Expand Down
4 changes: 2 additions & 2 deletions src/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const avatarEmojis = ['😎','🀩','πŸ€“','🀠','πŸ‘»','πŸ€–','πŸ‘½','πŸ¦„','

export function getAvatarEmoji(playerId) {
playerId = String(playerId || '');
if (!playerId) return 'πŸ”';
if (!playerId) return '🏸';
const seed = playerId.charCodeAt(0) + playerId.charCodeAt(playerId.length - 1);
return avatarEmojis[seed % avatarEmojis.length];
}
Expand All @@ -29,7 +29,7 @@ export function showSuccess(message) {
}

export function toggleLoading(show) {
const el = document.querySelector('.chicken-overlay');
const el = document.querySelector('.app-overlay');
if (!el) return;
el.style.display = show ? 'flex' : 'none';
el.style.opacity = show ? 1 : 0;
Expand Down
8 changes: 4 additions & 4 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ tr:hover td { background: #f9f9f9; }

/* ================= LOADING OVERLAY ================= */

.chicken-overlay {
.app-overlay {
display: none;
position: fixed;
inset: 0;
Expand All @@ -456,13 +456,13 @@ tr:hover td { background: #f9f9f9; }
flex-direction: column;
}

.chicken-spinner {
.app-spinner {
font-size: 60px;
animation: spin 0.8s linear infinite;
}

.chicken-spinner::after {
content: 'πŸ”';
.app-spinner::after {
content: '🏸';
}

@keyframes spin {
Expand Down
2 changes: 1 addition & 1 deletion sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const CACHE = 'speedhennen-v3';
const CACHE = 'eloapp-v1';

const STATIC_ASSETS = [
'./',
Expand Down
Loading