From 59265c77980aaaea1b3b07b4a5045154189d3b15 Mon Sep 17 00:00:00 2001 From: efigueroa Date: Sat, 6 Sep 2025 23:04:55 -0700 Subject: [PATCH] Fix refresh button 404 and add clickable league names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added missing POST route for refresh button at ///refresh - Fixed 404 error by redirecting refresh POST to dashboard route - Made league names clickable links to Sleeper league pages - Added CSS styling for league name links with hover effects - Sleeper URLs work on both web and mobile (app deep links) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- app.py | 6 ++++++ static/style.css | 14 ++++++++++++++ templates/dashboard.html | 4 +++- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 078206f..34e131c 100644 --- a/app.py +++ b/app.py @@ -95,6 +95,12 @@ def dashboard_week(username, week): print(f"DEBUG: Dashboard week - username: '{username}', week: {week}", flush=True) return dashboard(username, week) +@app.route('///refresh', methods=['POST']) +def refresh_scores(username, week): + """Server-side refresh scores - redirect back to dashboard""" + print(f"DEBUG: Refresh scores POST - username: '{username}', week: {week}", flush=True) + return redirect(url_for('dashboard_week', username=username, week=week)) + def dashboard(username, week): """Main dashboard logic - fetch and display user's fantasy data""" print(f"DEBUG: Dashboard function START - username: '{username}', week: {week}", flush=True) diff --git a/static/style.css b/static/style.css index 78305d1..8fbd47c 100644 --- a/static/style.css +++ b/static/style.css @@ -255,6 +255,20 @@ font-size: 14px; } +.league-name-link { + text-decoration: none; + color: inherit; + transition: color 0.2s ease; +} + +.league-name-link:hover { + color: var(--accent); +} + +.league-name-link:hover .league-name { + color: var(--accent); +} + /* League color dots */ .league-dot { width: 8px; diff --git a/templates/dashboard.html b/templates/dashboard.html index 2cc9a79..29a08ab 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -27,7 +27,9 @@
- {{ league_info.league.name }} + + {{ league_info.league.name }} +