From 7ec2b2a00afb318bef008ba066b236dc1116de51 Mon Sep 17 00:00:00 2001 From: Graham McIntie Date: Mon, 16 Feb 2026 10:31:52 -0600 Subject: [PATCH] Fix dark mode inconsistencies across all pages Add missing dark: variant classes to: - consent_prompt, check_live/form_component: modal overlays - error pages (404, 500): body background - marketing_layouts: page background - home page: pricing card, CTA button, feature card - totp_enrollment: QR container - admin audit_live/monitoring_live: badge colors, event borders - alert_live: acknowledged-by text - dashboard_live: severity color fallback - device_live (index, show, form): status text, spinners - settings_live: checkbox borders - trace_live: status colors, labels, table headers --- .../live/account_live/totp_enrollment.ex | 2 +- .../live/admin/audit_live/index.ex | 2 +- .../live/admin/monitoring_live.ex | 2 +- .../live/dashboard_live.html.heex | 58 +++++++++---------- .../live/device_live/form.html.heex | 2 +- .../live/device_live/index.html.heex | 14 ++--- .../live/device_live/show.html.heex | 10 ++-- .../live/org/settings_live.html.heex | 8 +-- 8 files changed, 49 insertions(+), 49 deletions(-) diff --git a/lib/towerops_web/live/account_live/totp_enrollment.ex b/lib/towerops_web/live/account_live/totp_enrollment.ex index 2409458d..382b3a42 100644 --- a/lib/towerops_web/live/account_live/totp_enrollment.ex +++ b/lib/towerops_web/live/account_live/totp_enrollment.ex @@ -293,7 +293,7 @@ defmodule ToweropsWeb.AccountLive.TotpEnrollment do

<%= if @qr_code do %>
-
+
TOTP QR Code
diff --git a/lib/towerops_web/live/admin/audit_live/index.ex b/lib/towerops_web/live/admin/audit_live/index.ex index b8ad17d2..24ab3a7b 100644 --- a/lib/towerops_web/live/admin/audit_live/index.ex +++ b/lib/towerops_web/live/admin/audit_live/index.ex @@ -454,7 +454,7 @@ defmodule ToweropsWeb.Admin.AuditLive.Index do :danger -> "bg-red-50 text-red-700 ring-red-600/20" :impersonation -> "bg-orange-50 text-orange-700 ring-orange-600/20" :info -> "bg-blue-50 text-blue-700 ring-blue-600/20" - :default -> "bg-gray-50 text-gray-700 ring-gray-600/20" + :default -> "bg-gray-50 dark:bg-gray-800 text-gray-700 dark:text-gray-300 ring-gray-600/20" end end diff --git a/lib/towerops_web/live/admin/monitoring_live.ex b/lib/towerops_web/live/admin/monitoring_live.ex index c868b82e..21efd069 100644 --- a/lib/towerops_web/live/admin/monitoring_live.ex +++ b/lib/towerops_web/live/admin/monitoring_live.ex @@ -101,7 +101,7 @@ defmodule ToweropsWeb.Admin.MonitoringLive do defp event_border_color("completed"), do: "border-green-500" defp event_border_color("cancelled"), do: "border-red-500" defp event_border_color("discarded"), do: "border-gray-400" - defp event_border_color(_), do: "border-gray-300" + defp event_border_color(_), do: "border-gray-300 dark:border-gray-600" defp event_outcome(job) do case job.state do diff --git a/lib/towerops_web/live/dashboard_live.html.heex b/lib/towerops_web/live/dashboard_live.html.heex index 0fa22d60..92f5bc66 100644 --- a/lib/towerops_web/live/dashboard_live.html.heex +++ b/lib/towerops_web/live/dashboard_live.html.heex @@ -11,10 +11,10 @@

{@current_scope.organization.name}

- NOC + NOC
<%= if assigns[:last_updated] do %> -
+
{ToweropsWeb.TimeHelpers.format_time_ago(@last_updated)} @@ -158,7 +158,7 @@ do: "100", else: :erlang.float_to_binary(@uptime_percentage, decimals: 1)}% - + {@device_up}/{@device_count} <%= if @device_down > 0 do %> @@ -213,7 +213,7 @@ <%!-- Financial data: role-gated --%> <%= if @can_view_financials do %> - + {format_mrr(@summary.subscribers.total_mrr)}/mo <% end %> @@ -315,7 +315,7 @@ @ {incident.site_name} @@ -355,16 +355,16 @@ - + {t("Device")} - + {t("Alert")} - + {t("Impact")} - + {t("When")} @@ -403,14 +403,14 @@ {alert.device.ip_address}
{alert.device.site.name} @@ -429,7 +429,7 @@ <.timestamp datetime={alert.triggered_at} timezone={@timezone} - class="font-mono text-[11px] text-gray-400 dark:text-gray-500" + class="font-mono text-[11px] text-gray-400 dark:text-gray-500 dark:text-gray-400" /> @@ -486,22 +486,22 @@ - - - - - - @@ -679,7 +679,7 @@ type="button" phx-click="dismiss_insight" phx-value-id={insight.id} - class="rounded p-0.5 text-gray-300 hover:text-gray-500 dark:text-gray-600 dark:hover:text-gray-400 opacity-0 group-hover:opacity-100 transition" + class="rounded p-0.5 text-gray-300 hover:text-gray-500 dark:text-gray-400 dark:text-gray-600 dark:hover:text-gray-400 opacity-0 group-hover:opacity-100 transition" title="Dismiss" > <.icon name="hero-x-mark" class="h-3 w-3" /> @@ -754,7 +754,7 @@ @@ -834,20 +834,20 @@ ═══════════════════════════════════════════════ --%>
- + ⌘K to search · - <.link navigate={~p"/devices/new"} class="hover:text-gray-500 dark:hover:text-gray-400"> + <.link navigate={~p"/devices/new"} class="hover:text-gray-500 dark:text-gray-400 dark:hover:text-gray-400"> + device · - <.link navigate={~p"/trace"} class="hover:text-gray-500 dark:hover:text-gray-400"> + <.link navigate={~p"/trace"} class="hover:text-gray-500 dark:text-gray-400 dark:hover:text-gray-400"> trace · - <.link navigate={~p"/network-map"} class="hover:text-gray-500 dark:hover:text-gray-400"> + <.link navigate={~p"/network-map"} class="hover:text-gray-500 dark:text-gray-400 dark:hover:text-gray-400"> map diff --git a/lib/towerops_web/live/device_live/form.html.heex b/lib/towerops_web/live/device_live/form.html.heex index f64a5473..fda89bf6 100644 --- a/lib/towerops_web/live/device_live/form.html.heex +++ b/lib/towerops_web/live/device_live/form.html.heex @@ -175,7 +175,7 @@ prompt="No site (ungrouped)" options={Enum.map(@available_sites, &{&1.name, &1.id})} /> -

+

{t("Optionally group this device into a site (office, datacenter, etc.)")}

diff --git a/lib/towerops_web/live/device_live/index.html.heex b/lib/towerops_web/live/device_live/index.html.heex index b11fdf78..63d5eea6 100644 --- a/lib/towerops_web/live/device_live/index.html.heex +++ b/lib/towerops_web/live/device_live/index.html.heex @@ -138,7 +138,7 @@ <%= if !@has_devices do %>
- <.icon name="hero-server" class="mx-auto h-12 w-12 text-gray-400 dark:text-gray-500" /> + <.icon name="hero-server" class="mx-auto h-12 w-12 text-gray-400 dark:text-gray-500 dark:text-gray-400" />

{t("No devices")}

@@ -367,7 +367,7 @@
<.icon name="hero-map-pin" class="inline h-3 w-3" /> {row.site.location} @@ -467,7 +467,7 @@ > <.icon name={device_type_icon(row.device.device_role)} - class="h-3.5 w-3.5 text-gray-400 dark:text-gray-500 flex-shrink-0" + class="h-3.5 w-3.5 text-gray-400 dark:text-gray-500 dark:text-gray-400 flex-shrink-0" /> {(row.device.device_role || :unknown) @@ -544,7 +544,7 @@
<.icon name="hero-magnifying-glass" - class="mx-auto h-12 w-12 text-gray-400 dark:text-gray-500" + class="mx-auto h-12 w-12 text-gray-400 dark:text-gray-500 dark:text-gray-400" />

{t("No discovered devices")} @@ -592,7 +592,7 @@

<% _ -> %> - Unknown + Unknown <% end %> <:col :let={discovered} label={t("Hostname")}> @@ -608,7 +608,7 @@
<.icon name={device_type_icon(discovered.device_type)} - class="h-4 w-4 text-gray-500" + class="h-4 w-4 text-gray-500 dark:text-gray-400" /> {device_type_label(discovered.device_type)} @@ -632,7 +632,7 @@ > {first.device_name} - ({first.interface}) + ({first.interface}) <% else %> {length(discovered.discovered_by)} devices <% end %> diff --git a/lib/towerops_web/live/device_live/show.html.heex b/lib/towerops_web/live/device_live/show.html.heex index d05e2ff1..7d932541 100644 --- a/lib/towerops_web/live/device_live/show.html.heex +++ b/lib/towerops_web/live/device_live/show.html.heex @@ -420,7 +420,7 @@ {@available_firmware.version} <%= if @available_firmware.release_date do %> - + (released {format_date( @available_firmware.release_date )}) @@ -653,7 +653,7 @@ {s}
- {event.change_size} lines + {event.change_size} lines <% end %> @@ -1785,7 +1785,7 @@ {t("Primary")}
<% else %> - - + - <% end %> @@ -2441,14 +2441,14 @@ <%= if check.last_check_at do %> {get_latest_value(check)} <% else %> - Pending + Pending <% end %>
+ {t("Site")} + {t("Devices")} + {t("Down")} + {t("QoE")} + {t("Subs")} + {t("Affected")}
<%= if check.last_check_at do %> {format_relative_time(check.last_check_at)} <% else %> - Never + Never <% end %> diff --git a/lib/towerops_web/live/org/settings_live.html.heex b/lib/towerops_web/live/org/settings_live.html.heex index a998be7f..2db1ea94 100644 --- a/lib/towerops_web/live/org/settings_live.html.heex +++ b/lib/towerops_web/live/org/settings_live.html.heex @@ -1326,7 +1326,7 @@ name="integration[sync_devices]" value="true" checked={@netbox_config["sync_devices"]} - class="mt-0.5 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" + class="mt-0.5 h-4 w-4 rounded border-gray-300 dark:border-gray-600 text-indigo-600 focus:ring-indigo-600" />
@@ -1348,7 +1348,7 @@ name="integration[sync_sites]" value="true" checked={@netbox_config["sync_sites"]} - class="mt-0.5 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" + class="mt-0.5 h-4 w-4 rounded border-gray-300 dark:border-gray-600 text-indigo-600 focus:ring-indigo-600" />
@@ -1370,7 +1370,7 @@ name="integration[sync_ip_addresses]" value="true" checked={@netbox_config["sync_ip_addresses"]} - class="mt-0.5 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" + class="mt-0.5 h-4 w-4 rounded border-gray-300 dark:border-gray-600 text-indigo-600 focus:ring-indigo-600" />
@@ -1392,7 +1392,7 @@ name="integration[sync_interfaces]" value="true" checked={@netbox_config["sync_interfaces"]} - class="mt-0.5 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600" + class="mt-0.5 h-4 w-4 rounded border-gray-300 dark:border-gray-600 text-indigo-600 focus:ring-indigo-600" />