From 4f600634e0b8ff160a40f3a41931c6c32b0a338f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Feb 2026 17:13:58 +0000 Subject: [PATCH 1/8] Initial plan From c1146c7df99747865ef96120b0c0f1af8aae562b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Feb 2026 17:16:53 +0000 Subject: [PATCH 2/8] Add theme-specific flash message overrides for all themes Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com> --- static/css/change_tuner.css | 189 ++++++++++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) diff --git a/static/css/change_tuner.css b/static/css/change_tuner.css index 74aff13..bfa4238 100644 --- a/static/css/change_tuner.css +++ b/static/css/change_tuner.css @@ -400,3 +400,192 @@ body.light .flash-message.flash-info { background: rgba(59, 130, 246, 0.1); color: rgb(37, 99, 235); } + +/* Dark theme adjustments - High contrast on dark background */ +body.dark .flash-message.flash-success, +body.dark .flash-message.flash-default { + background: rgba(34, 197, 94, 0.2); + border: 1px solid rgba(34, 197, 94, 0.4); + color: rgb(74, 222, 128); +} + +body.dark .flash-message.flash-warning { + background: rgba(251, 191, 36, 0.2); + border: 1px solid rgba(251, 191, 36, 0.4); + color: rgb(253, 224, 71); +} + +body.dark .flash-message.flash-error, +body.dark .flash-message.flash-danger { + background: rgba(239, 68, 68, 0.2); + border: 1px solid rgba(239, 68, 68, 0.4); + color: rgb(252, 165, 165); +} + +body.dark .flash-message.flash-info { + background: rgba(59, 130, 246, 0.2); + border: 1px solid rgba(59, 130, 246, 0.4); + color: rgb(147, 197, 253); +} + +/* RetroIPTV theme adjustments - Match warm retro palette */ +body.retroiptv .flash-message.flash-success, +body.retroiptv .flash-message.flash-default { + background: rgba(34, 197, 94, 0.12); + border: 2px solid rgba(34, 197, 94, 0.5); + color: rgb(22, 163, 74); +} + +body.retroiptv .flash-message.flash-warning { + background: rgba(251, 191, 36, 0.12); + border: 2px solid rgba(251, 191, 36, 0.5); + color: rgb(161, 98, 7); +} + +body.retroiptv .flash-message.flash-error, +body.retroiptv .flash-message.flash-danger { + background: rgba(239, 68, 68, 0.12); + border: 2px solid rgba(239, 68, 68, 0.5); + color: rgb(185, 28, 28); +} + +body.retroiptv .flash-message.flash-info { + background: rgba(63, 183, 176, 0.12); + border: 2px solid rgba(63, 183, 176, 0.5); + color: rgb(14, 116, 144); +} + +/* Retro Magazine theme adjustments - Black text on white background theme */ +body.retro-magazine .flash-message.flash-success, +body.retro-magazine .flash-message.flash-default { + background: rgba(34, 197, 94, 0.15); + border: 2px solid rgba(34, 197, 94, 0.6); + color: rgb(21, 128, 61); +} + +body.retro-magazine .flash-message.flash-warning { + background: rgba(251, 191, 36, 0.15); + border: 2px solid rgba(251, 191, 36, 0.6); + color: rgb(161, 98, 7); +} + +body.retro-magazine .flash-message.flash-error, +body.retro-magazine .flash-message.flash-danger { + background: rgba(239, 68, 68, 0.15); + border: 2px solid rgba(239, 68, 68, 0.6); + color: rgb(153, 27, 27); +} + +body.retro-magazine .flash-message.flash-info { + background: rgba(59, 130, 246, 0.15); + border: 2px solid rgba(59, 130, 246, 0.6); + color: rgb(29, 78, 216); +} + +/* DirecTV theme adjustments - Match blue corporate palette */ +body.directv .flash-message.flash-success, +body.directv .flash-message.flash-default { + background: rgba(34, 197, 94, 0.2); + border: 2px solid rgba(34, 197, 94, 0.5); + color: rgb(74, 222, 128); +} + +body.directv .flash-message.flash-warning { + background: rgba(255, 204, 0, 0.2); + border: 2px solid rgba(255, 204, 0, 0.5); + color: rgb(255, 215, 0); +} + +body.directv .flash-message.flash-error, +body.directv .flash-message.flash-danger { + background: rgba(239, 68, 68, 0.2); + border: 2px solid rgba(239, 68, 68, 0.5); + color: rgb(252, 165, 165); +} + +body.directv .flash-message.flash-info { + background: rgba(176, 220, 255, 0.2); + border: 2px solid rgba(176, 220, 255, 0.5); + color: rgb(216, 235, 255); +} + +/* Comcast theme adjustments - Match blue/navy palette */ +body.comcast .flash-message.flash-success, +body.comcast .flash-message.flash-default { + background: rgba(34, 197, 94, 0.2); + border: 2px solid rgba(34, 197, 94, 0.5); + color: rgb(74, 222, 128); +} + +body.comcast .flash-message.flash-warning { + background: rgba(255, 204, 0, 0.2); + border: 2px solid rgba(255, 204, 0, 0.5); + color: rgb(255, 224, 102); +} + +body.comcast .flash-message.flash-error, +body.comcast .flash-message.flash-danger { + background: rgba(239, 68, 68, 0.2); + border: 2px solid rgba(239, 68, 68, 0.5); + color: rgb(252, 165, 165); +} + +body.comcast .flash-message.flash-info { + background: rgba(188, 216, 255, 0.2); + border: 2px solid rgba(188, 216, 255, 0.5); + color: rgb(188, 216, 255); +} + +/* Retro AOL theme adjustments - Match teal/cyan and yellow palette */ +body.retro-aol .flash-message.flash-success, +body.retro-aol .flash-message.flash-default { + background: rgba(51, 204, 204, 0.2); + border: 2px solid rgba(51, 204, 204, 0.5); + color: rgb(102, 255, 255); +} + +body.retro-aol .flash-message.flash-warning { + background: rgba(255, 204, 0, 0.2); + border: 2px solid rgba(255, 204, 0, 0.5); + color: rgb(255, 204, 1); +} + +body.retro-aol .flash-message.flash-error, +body.retro-aol .flash-message.flash-danger { + background: rgba(239, 68, 68, 0.2); + border: 2px solid rgba(239, 68, 68, 0.5); + color: rgb(252, 165, 165); +} + +body.retro-aol .flash-message.flash-info { + background: rgba(51, 204, 204, 0.2); + border: 2px solid rgba(51, 204, 204, 0.5); + color: rgb(51, 204, 204); +} + +/* TV Guide 1990 theme adjustments - Black/white newspaper style */ +body.tvguide1990 .flash-message.flash-success, +body.tvguide1990 .flash-message.flash-default { + background: rgba(34, 197, 94, 0.15); + border: 2px solid rgba(34, 197, 94, 0.6); + color: rgb(21, 128, 61); +} + +body.tvguide1990 .flash-message.flash-warning { + background: rgba(251, 191, 36, 0.15); + border: 2px solid rgba(251, 191, 36, 0.6); + color: rgb(146, 64, 14); +} + +body.tvguide1990 .flash-message.flash-error, +body.tvguide1990 .flash-message.flash-danger { + background: rgba(239, 68, 68, 0.15); + border: 2px solid rgba(239, 68, 68, 0.6); + color: rgb(153, 27, 27); +} + +body.tvguide1990 .flash-message.flash-info { + background: rgba(59, 130, 246, 0.15); + border: 2px solid rgba(59, 130, 246, 0.6); + color: rgb(29, 78, 216); +} From 0dde2ff0fe413c588af40000db99bb4ed3fd19b3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Feb 2026 17:18:55 +0000 Subject: [PATCH 3/8] Fix retro-aol theme color issues from code review Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com> --- static/css/change_tuner.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/css/change_tuner.css b/static/css/change_tuner.css index bfa4238..f471b3a 100644 --- a/static/css/change_tuner.css +++ b/static/css/change_tuner.css @@ -547,7 +547,7 @@ body.retro-aol .flash-message.flash-default { body.retro-aol .flash-message.flash-warning { background: rgba(255, 204, 0, 0.2); border: 2px solid rgba(255, 204, 0, 0.5); - color: rgb(255, 204, 1); + color: rgb(255, 204, 0); } body.retro-aol .flash-message.flash-error, @@ -560,7 +560,7 @@ body.retro-aol .flash-message.flash-danger { body.retro-aol .flash-message.flash-info { background: rgba(51, 204, 204, 0.2); border: 2px solid rgba(51, 204, 204, 0.5); - color: rgb(51, 204, 204); + color: rgb(102, 255, 255); } /* TV Guide 1990 theme adjustments - Black/white newspaper style */ From 6d5089369cff38a90236f608fb117d69cb4f68cb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Feb 2026 17:20:07 +0000 Subject: [PATCH 4/8] Improve retro-aol flash message contrast and distinctiveness Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com> --- static/css/change_tuner.css | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/static/css/change_tuner.css b/static/css/change_tuner.css index f471b3a..fb90100 100644 --- a/static/css/change_tuner.css +++ b/static/css/change_tuner.css @@ -545,9 +545,9 @@ body.retro-aol .flash-message.flash-default { } body.retro-aol .flash-message.flash-warning { - background: rgba(255, 204, 0, 0.2); - border: 2px solid rgba(255, 204, 0, 0.5); - color: rgb(255, 204, 0); + background: rgba(255, 204, 1, 0.2); + border: 2px solid rgba(255, 204, 1, 0.5); + color: rgb(255, 221, 85); } body.retro-aol .flash-message.flash-error, @@ -558,9 +558,9 @@ body.retro-aol .flash-message.flash-danger { } body.retro-aol .flash-message.flash-info { - background: rgba(51, 204, 204, 0.2); - border: 2px solid rgba(51, 204, 204, 0.5); - color: rgb(102, 255, 255); + background: rgba(102, 204, 255, 0.2); + border: 2px solid rgba(102, 204, 255, 0.5); + color: rgb(153, 238, 255); } /* TV Guide 1990 theme adjustments - Black/white newspaper style */ From 659ace212367b6c59b3b9b2bea0d71b283b0d690 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Feb 2026 19:12:53 +0000 Subject: [PATCH 5/8] Fix flash message text colors to #48494a for retroiptv and retro-magazine themes Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com> --- static/css/change_tuner.css | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/static/css/change_tuner.css b/static/css/change_tuner.css index fb90100..6454744 100644 --- a/static/css/change_tuner.css +++ b/static/css/change_tuner.css @@ -433,26 +433,26 @@ body.retroiptv .flash-message.flash-success, body.retroiptv .flash-message.flash-default { background: rgba(34, 197, 94, 0.12); border: 2px solid rgba(34, 197, 94, 0.5); - color: rgb(22, 163, 74); + color: #48494a; } body.retroiptv .flash-message.flash-warning { background: rgba(251, 191, 36, 0.12); border: 2px solid rgba(251, 191, 36, 0.5); - color: rgb(161, 98, 7); + color: #48494a; } body.retroiptv .flash-message.flash-error, body.retroiptv .flash-message.flash-danger { background: rgba(239, 68, 68, 0.12); border: 2px solid rgba(239, 68, 68, 0.5); - color: rgb(185, 28, 28); + color: #48494a; } body.retroiptv .flash-message.flash-info { background: rgba(63, 183, 176, 0.12); border: 2px solid rgba(63, 183, 176, 0.5); - color: rgb(14, 116, 144); + color: #48494a; } /* Retro Magazine theme adjustments - Black text on white background theme */ @@ -460,26 +460,26 @@ body.retro-magazine .flash-message.flash-success, body.retro-magazine .flash-message.flash-default { background: rgba(34, 197, 94, 0.15); border: 2px solid rgba(34, 197, 94, 0.6); - color: rgb(21, 128, 61); + color: #48494a; } body.retro-magazine .flash-message.flash-warning { background: rgba(251, 191, 36, 0.15); border: 2px solid rgba(251, 191, 36, 0.6); - color: rgb(161, 98, 7); + color: #48494a; } body.retro-magazine .flash-message.flash-error, body.retro-magazine .flash-message.flash-danger { background: rgba(239, 68, 68, 0.15); border: 2px solid rgba(239, 68, 68, 0.6); - color: rgb(153, 27, 27); + color: #48494a; } body.retro-magazine .flash-message.flash-info { background: rgba(59, 130, 246, 0.15); border: 2px solid rgba(59, 130, 246, 0.6); - color: rgb(29, 78, 216); + color: #48494a; } /* DirecTV theme adjustments - Match blue corporate palette */ From c70296d74eab0ea39ecae095612194d15a6ebf9d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Feb 2026 19:20:22 +0000 Subject: [PATCH 6/8] Add #e8f3f3 background color for RetroIPTV info flash messages Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com> --- static/css/change_tuner.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/css/change_tuner.css b/static/css/change_tuner.css index 6454744..1383329 100644 --- a/static/css/change_tuner.css +++ b/static/css/change_tuner.css @@ -450,7 +450,7 @@ body.retroiptv .flash-message.flash-danger { } body.retroiptv .flash-message.flash-info { - background: rgba(63, 183, 176, 0.12); + background: #e8f3f3; border: 2px solid rgba(63, 183, 176, 0.5); color: #48494a; } From b86e6cf45de57c89a2f7aef6f1a9392d7861e7a2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Feb 2026 19:28:36 +0000 Subject: [PATCH 7/8] Remove #e8f3f3 color - revert to semi-transparent info background Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com> --- static/css/change_tuner.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/css/change_tuner.css b/static/css/change_tuner.css index 1383329..6454744 100644 --- a/static/css/change_tuner.css +++ b/static/css/change_tuner.css @@ -450,7 +450,7 @@ body.retroiptv .flash-message.flash-danger { } body.retroiptv .flash-message.flash-info { - background: #e8f3f3; + background: rgba(63, 183, 176, 0.12); border: 2px solid rgba(63, 183, 176, 0.5); color: #48494a; } From 9c30875d76566f32ae7a22970cf8fe671c51b1df Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Feb 2026 19:38:07 +0000 Subject: [PATCH 8/8] Add flash message categories for consistent theme styling Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com> --- app.py | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/app.py b/app.py index 2071553..974eaef 100644 --- a/app.py +++ b/app.py @@ -603,11 +603,11 @@ def change_password(): (generate_password_hash(new), current_user.id)) conn.commit() log_event(current_user.username, "Changed password") - flash("Password updated successfully.") + flash("Password updated successfully.", "success") return redirect(url_for('guide')) else: log_event(current_user.username, "Failed password change attempt (invalid old password)") - flash("Old password incorrect.") + flash("Old password incorrect.", "error") return render_template("change_password.html", current_tuner=get_current_tuner()) @app.route('/add_user', methods=['GET','POST']) @@ -627,11 +627,11 @@ def add_user_route(): (new_username, generate_password_hash(new_password))) conn.commit() log_event(current_user.username, f"Added user {new_username}") - flash(f"User {new_username} added successfully.") + flash(f"User {new_username} added successfully.", "success") return redirect(url_for('guide')) except sqlite3.IntegrityError: log_event(current_user.username, f"Failed to add user {new_username} (duplicate)") - flash("Username already exists.") + flash("Username already exists.", "warning") return render_template("add_user.html", current_tuner=get_current_tuner()) @app.route('/delete_user', methods=['GET','POST']) @@ -645,7 +645,7 @@ def delete_user(): del_username = request.form['username'] if del_username == 'admin': log_event(current_user.username, "Attempted to delete admin user (blocked)") - flash("You cannot delete the admin account.") + flash("You cannot delete the admin account.", "warning") return redirect(url_for('delete_user')) with sqlite3.connect(DATABASE, timeout=10) as conn: @@ -653,7 +653,7 @@ def delete_user(): c.execute('DELETE FROM users WHERE username=?', (del_username,)) conn.commit() log_event(current_user.username, f"Deleted user {del_username}") - flash(f"User {del_username} deleted (if they existed).") + flash(f"User {del_username} deleted (if they existed).", "success") return redirect(url_for('guide')) with sqlite3.connect(DATABASE, timeout=10) as conn: @@ -675,7 +675,7 @@ def manage_users(): if current_user.username != 'admin' or is_tv: # Log unauthorized or TV-based attempt log_event(current_user.username, f"Unauthorized attempt to access /manage_users from UA: {ua}") - flash("Unauthorized access.") + flash("Unauthorized access.", "warning") return redirect(url_for('guide')) # ---- Normal admin logic below ---- @@ -691,7 +691,7 @@ def manage_users(): if action == 'add': if not username or not password: - flash("Please provide both username and password.") + flash("Please provide both username and password.", "warning") else: try: with sqlite3.connect(DATABASE, timeout=10) as conn: @@ -700,25 +700,25 @@ def manage_users(): (username, generate_password_hash(password))) conn.commit() log_event(current_user.username, f"Added user {username}") - flash(f"✅ User '{username}' added successfully.") + flash(f"✅ User '{username}' added successfully.", "success") except sqlite3.IntegrityError: - flash("⚠️ Username already exists.") + flash("⚠️ Username already exists.", "warning") elif action == 'delete': if username == 'admin': - flash("❌ Cannot delete the admin account.") + flash("❌ Cannot delete the admin account.", "error") else: with sqlite3.connect(DATABASE, timeout=10) as conn: c = conn.cursor() c.execute('DELETE FROM users WHERE username=?', (username,)) conn.commit() log_event(current_user.username, f"Deleted user {username}") - flash(f"🗑 Deleted user '{username}'.") + flash(f"🗑 Deleted user '{username}'.", "success") elif action == 'signout': revoke_user_sessions(username) log_event(current_user.username, f"Revoked sessions for {username}") - flash(f"🚪 Signed out all active logins for '{username}'.") + flash(f"🚪 Signed out all active logins for '{username}'.", "success") return redirect(url_for('manage_users')) @@ -811,7 +811,7 @@ def change_tuner(): new_tuner = request.form["tuner"] set_current_tuner(new_tuner) log_event(current_user.username, f"Switched active tuner to {new_tuner}") - flash(f"Active tuner switched to {new_tuner}") + flash(f"Active tuner switched to {new_tuner}", "success") # ✅ Refresh cached guide data immediately global cached_channels, cached_epg @@ -832,7 +832,7 @@ def change_tuner(): try: update_tuner_urls(tuner, xml_url, m3u_url) log_event(current_user.username, f"Updated URLs for tuner {tuner}") - flash(f"Updated URLs for tuner {tuner}") + flash(f"Updated URLs for tuner {tuner}", "success") # ✅ Validate inputs (DNS/reachability check) if xml_url: @@ -851,7 +851,7 @@ def change_tuner(): else: delete_tuner(tuner) log_event(current_user.username, f"Deleted tuner {tuner}") - flash(f"Tuner {tuner} deleted.") + flash(f"Tuner {tuner} deleted.", "success") elif action == "rename_tuner": old_name = request.form["tuner"] # matches HTML