From c54b5d81bbc5074ce0c7ce1f23ca2d99ef4e6ceb Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Tue, 20 Jan 2026 17:23:11 -0600 Subject: [PATCH] more dark mode --- .../components/core_components.ex | 28 +- lib/towerops_web/components/layouts.ex | 44 +- .../controllers/api_docs_html/index.html.heex | 278 ++--- .../api_docs_html/index.html.heex.bak | 1075 ----------------- .../user_session_html/new.html.heex | 8 +- .../user_settings_html/edit.html.heex | 62 +- .../live/admin/dashboard_live.html.heex | 32 +- .../live/admin/org_live/index.html.heex | 8 +- .../live/admin/user_live/index.html.heex | 10 +- .../live/agent_live/edit.html.heex | 12 +- lib/towerops_web/live/agent_live/helpers.ex | 4 +- .../live/agent_live/index.html.heex | 58 +- lib/towerops_web/live/agent_live/show.ex | 2 +- .../live/agent_live/show.html.heex | 108 +- .../live/alert_live/index.html.heex | 24 +- .../live/dashboard_live.html.heex | 70 +- .../live/device_live/form.html.heex | 28 +- .../live/device_live/index.html.heex | 18 +- .../live/device_live/show.html.heex | 344 +++--- .../live/graph_live/show.html.heex | 20 +- lib/towerops_web/live/mobile_qr_live.ex | 28 +- .../live/org/settings_live.html.heex | 18 +- .../live/org_live/index.html.heex | 12 +- .../live/site_live/form.html.heex | 36 +- .../live/site_live/index.html.heex | 14 +- .../live/site_live/show.html.heex | 40 +- lib/towerops_web/live/user_settings_live.ex | 34 +- 27 files changed, 673 insertions(+), 1742 deletions(-) delete mode 100644 lib/towerops_web/controllers/api_docs_html/index.html.heex.bak diff --git a/lib/towerops_web/components/core_components.ex b/lib/towerops_web/components/core_components.ex index bba3d64c..43251f83 100644 --- a/lib/towerops_web/components/core_components.ex +++ b/lib/towerops_web/components/core_components.ex @@ -124,7 +124,7 @@ defmodule ToweropsWeb.CoreComponents do "primary" => "bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500 dark:bg-blue-500 dark:hover:bg-blue-600", "danger" => "bg-red-600 text-white hover:bg-red-700 focus:ring-red-500 dark:bg-red-500 dark:hover:bg-red-600", nil => - "bg-white text-zinc-900 ring-1 ring-inset ring-zinc-300 hover:bg-zinc-50 focus:ring-blue-500 dark:bg-zinc-800 dark:text-zinc-100 dark:ring-zinc-700 dark:hover:bg-zinc-700" + "bg-white text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:ring-blue-500 dark:bg-gray-800 dark:text-white dark:ring-gray-700 dark:hover:bg-gray-700" } assigns = @@ -254,11 +254,11 @@ defmodule ToweropsWeb.CoreComponents do checked={@checked} class={ @class || - "h-4 w-4 rounded border-zinc-300 text-blue-600 focus:ring-blue-500 dark:border-zinc-600 dark:bg-zinc-800" + "h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-800" } {@rest} /> - {@label} + {@label} <.error :for={msg <- @errors}>{msg} @@ -313,7 +313,7 @@ defmodule ToweropsWeb.CoreComponents do ~H"""
-

+

Click the text box to select all data, then copy with Cmd+C or Ctrl+C

<% else %> -
-

+

+

No raw discovery data available. Run discovery again to collect debug data.

@@ -874,7 +874,7 @@
<% _ -> %>
-

Tab not found

+

Tab not found

<% end %> diff --git a/lib/towerops_web/live/graph_live/show.html.heex b/lib/towerops_web/live/graph_live/show.html.heex index 9ca170f1..cf65a8d4 100644 --- a/lib/towerops_web/live/graph_live/show.html.heex +++ b/lib/towerops_web/live/graph_live/show.html.heex @@ -11,19 +11,19 @@
<.link navigate={~p"/devices/#{@device_id}"} - class="text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100" + class="text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white" > <.icon name="hero-arrow-left" class="h-5 w-5" />
-

{@chart_title}

-

{@device.name}

+

{@chart_title}

+

{@device.name}

- Time Range: + Time Range:
<%= for {label, value} <- [{"1 Hour", "1h"}, {"6 Hours", "6h"}, {"12 Hours", "12h"}, {"24 Hours", "24h"}, {"7 Days", "7d"}, {"30 Days", "30d"}] do %>
<%= if @chart_data do %> -
+
<% else %> -
+
- <.icon name="hero-chart-bar" class="mx-auto h-12 w-12 text-zinc-400" /> -

+ <.icon name="hero-chart-bar" class="mx-auto h-12 w-12 text-gray-400" /> +

No sensor data available

-

+

This device doesn't have any sensors of this type.

diff --git a/lib/towerops_web/live/mobile_qr_live.ex b/lib/towerops_web/live/mobile_qr_live.ex index 7ac8e5cb..138e2924 100644 --- a/lib/towerops_web/live/mobile_qr_live.ex +++ b/lib/towerops_web/live/mobile_qr_live.ex @@ -92,13 +92,13 @@ defmodule ToweropsWeb.MobileQRLive do
-
+
-

+

Scan with Mobile App

-

+

Open the Towerops mobile app and scan this QR code to log in

@@ -112,17 +112,17 @@ defmodule ToweropsWeb.MobileQRLive do
-

+

This QR code expires in 5 minutes

-

+

Waiting for mobile app to scan...

- Checking... + Checking...
@@ -164,23 +164,23 @@ defmodule ToweropsWeb.MobileQRLive do

-
+
-
Device Name
-
+
Device Name
+
{@mobile_session.device_name || "Unknown"}
-
Device OS
-
+
Device OS
+
{@mobile_session.device_os || "Unknown"}
-
App Version
-
+
App Version
+
{@mobile_session.app_version || "Unknown"}
@@ -200,7 +200,7 @@ defmodule ToweropsWeb.MobileQRLive do
<.link navigate={~p"/orgs"} - class="text-sm font-medium text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100" + class="text-sm font-medium text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white" > ← Back to Organizations diff --git a/lib/towerops_web/live/org/settings_live.html.heex b/lib/towerops_web/live/org/settings_live.html.heex index 6d304e9d..20b2b897 100644 --- a/lib/towerops_web/live/org/settings_live.html.heex +++ b/lib/towerops_web/live/org/settings_live.html.heex @@ -6,7 +6,7 @@
<.link navigate={~p"/orgs/#{@organization.slug}"} - class="inline-flex items-center gap-1 text-sm text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100" + class="inline-flex items-center gap-1 text-sm text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white" > <.icon name="hero-arrow-left" class="h-4 w-4" /> Back to Dashboard @@ -25,7 +25,7 @@

SNMP Configuration

-

+

Set default SNMP settings for all devices in this organization. These can be overridden at the site or device level.

@@ -44,7 +44,7 @@ placeholder="e.g., public" /> -

+

<.icon name="hero-information-circle" class="h-4 w-4 inline" /> SNMP configuration hierarchy: Device > Site > Organization

@@ -72,7 +72,7 @@ <%= if @available_agents != [] do %>

Default Agent

-

+

Select a default agent for SNMP polling. This will be used for all devices in this organization unless overridden at the site or device level.

@@ -84,11 +84,11 @@ options={Enum.map(@available_agents, &{&1.name, &1.id})} /> -
-

+

+

Current Device Assignment:

-
+
<.icon name="hero-server" class="h-4 w-4" /> @@ -115,7 +115,7 @@
-

+

<.icon name="hero-information-circle" class="h-4 w-4 inline" /> Agent assignment hierarchy: Device > Site > Organization

@@ -142,7 +142,7 @@ <% else %>

Default Agent

-

+

No agents configured yet. <.link navigate={~p"/orgs/#{@organization.slug}/agents"} diff --git a/lib/towerops_web/live/org_live/index.html.heex b/lib/towerops_web/live/org_live/index.html.heex index 375b1c85..6a17fb86 100644 --- a/lib/towerops_web/live/org_live/index.html.heex +++ b/lib/towerops_web/live/org_live/index.html.heex @@ -17,10 +17,10 @@ <.link :for={org <- @organizations} navigate={~p"/orgs/#{org.slug}"} - class="relative overflow-hidden rounded-lg border border-zinc-200 bg-white p-6 shadow-sm hover:shadow-md transition-shadow dark:border-zinc-800 dark:bg-zinc-900 cursor-pointer" + class="relative overflow-hidden rounded-lg border border-gray-200 bg-white p-6 shadow-sm hover:shadow-md transition-shadow dark:border-white/10 dark:bg-gray-800/50 cursor-pointer" > -

{org.name}

-

+

{org.name}

+

{Enum.find(org.memberships, &(&1.user_id == @current_scope.user.id)).role |> to_string() |> String.capitalize()} @@ -29,9 +29,9 @@

- <.icon name="hero-building-office" class="mx-auto h-12 w-12 text-zinc-400 dark:text-zinc-600" /> -

No organizations

-

+ <.icon name="hero-building-office" class="mx-auto h-12 w-12 text-gray-400 dark:text-gray-600" /> +

No organizations

+

Get started by creating a new organization.

diff --git a/lib/towerops_web/live/site_live/form.html.heex b/lib/towerops_web/live/site_live/form.html.heex index ac4e4b16..9aa4724d 100644 --- a/lib/towerops_web/live/site_live/form.html.heex +++ b/lib/towerops_web/live/site_live/form.html.heex @@ -11,7 +11,7 @@ do: ~p"/sites/#{@site.id}", else: ~p"/sites" } - class="inline-flex items-center gap-1 text-sm text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100" + class="inline-flex items-center gap-1 text-sm text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white" > <.icon name="hero-arrow-left" class="h-4 w-4" /> {if @live_action == :edit, do: "Back to Site", else: "Back to Sites"} @@ -33,14 +33,14 @@
@@ -84,9 +84,9 @@

Agent Configuration - (optional) + (optional)

-

+

Set a default agent for SNMP polling at this site. This will override the organization default for all devices at this site. Leave blank to inherit from organization.

@@ -123,12 +123,12 @@
<% else %> <%= if Map.get(assigns, :org_agent) do %> -

+

<.icon name="hero-building-office-2" class="h-4 w-4" /> Currently inheriting organization default: {@org_agent.name}

<% else %> -

+

Set a default agent for all devices at this site. Device can override this setting individually.

<% end %> @@ -139,9 +139,9 @@

SNMP Configuration - (optional) + (optional)

-

+

Override organization SNMP defaults for all devices at this site. Leave blank to inherit from organization.

@@ -187,9 +187,9 @@ <%= if @live_action == :edit do %> -
+

Danger Zone

-

+

Once you delete a site, there is no going back. This will also delete all devices at this site.

<.button diff --git a/lib/towerops_web/live/site_live/index.html.heex b/lib/towerops_web/live/site_live/index.html.heex index 79764d68..d8995418 100644 --- a/lib/towerops_web/live/site_live/index.html.heex +++ b/lib/towerops_web/live/site_live/index.html.heex @@ -19,10 +19,10 @@
<.icon name="hero-building-office" - class="mx-auto h-12 w-12 text-zinc-400 dark:text-zinc-600" + class="mx-auto h-12 w-12 text-gray-400 dark:text-gray-500" /> -

No sites

-

+

No sites

+

Get started by creating your first site.

@@ -36,16 +36,16 @@ <.link :for={site <- @sites} navigate={~p"/sites/#{site.id}"} - class="relative overflow-hidden rounded-lg border border-zinc-200 bg-white p-6 shadow-sm hover:shadow-md transition-shadow dark:border-zinc-800 dark:bg-zinc-900 cursor-pointer" + class="relative overflow-hidden rounded-lg border border-gray-200 bg-white p-6 shadow-sm hover:shadow-md transition-shadow dark:border-white/10 dark:bg-gray-800/50 cursor-pointer" > -

{site.name}

+

{site.name}

<%= if site.location do %> -

+

<.icon name="hero-map-pin" class="h-4 w-4" /> {site.location}

<% end %> <%= if site.parent_site do %> -

+

Parent: {site.parent_site.name}

<% end %> diff --git a/lib/towerops_web/live/site_live/show.html.heex b/lib/towerops_web/live/site_live/show.html.heex index c6092344..7f667615 100644 --- a/lib/towerops_web/live/site_live/show.html.heex +++ b/lib/towerops_web/live/site_live/show.html.heex @@ -26,11 +26,11 @@
-

Site Details

+

Site Details

<%= if @site.parent_site do %>
-
Parent Site
+
Parent Site
<.link navigate={~p"/sites/#{@site.parent_site.id}"} @@ -43,21 +43,21 @@ <% end %> <%= if @site.location do %>
-
Location
-
{@site.location}
+
Location
+
{@site.location}
<% end %> <%= if @site.description do %>
-
Description
-
{@site.description}
+
Description
+
{@site.description}
<% end %>
<%= if @site.child_sites != [] do %>
-

Child Sites

+

Child Sites

  • <.link @@ -74,7 +74,7 @@
    -

    Device

    +

    Device

    <.button navigate={~p"/devices/new?site_id=#{@site.id}"} variant="primary" @@ -84,15 +84,15 @@
    <%= if @device == [] do %> -
    - <.icon name="hero-server" class="mx-auto h-12 w-12 text-zinc-400 dark:text-zinc-600" /> -

    +
    + <.icon name="hero-server" class="mx-auto h-12 w-12 text-gray-400 dark:text-gray-500" /> +

    Add your first device

    -

    +

    Start monitoring by adding network devices to this site.

    -

    +

    You can add routers, switches, servers, or any device with an IP address.

    @@ -109,11 +109,11 @@ <.link :for={eq <- @device} navigate={~p"/devices/#{eq.id}"} - class="flex items-center justify-between rounded-lg border border-zinc-200 bg-white p-4 dark:border-zinc-800 dark:bg-zinc-900 hover:border-zinc-300 dark:hover:border-zinc-700 hover:bg-zinc-50 dark:hover:bg-zinc-800 transition-colors cursor-pointer" + class="flex items-center justify-between rounded-lg border border-gray-200 bg-white p-4 dark:border-white/10 dark:bg-gray-800/50 hover:border-gray-300 dark:hover:border-white/20 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors cursor-pointer" >
    -

    {eq.name}

    -

    {eq.ip_address}

    +

    {eq.name}

    +

    {eq.ip_address}

    {eq.status |> to_string() |> String.upcase()} @@ -133,9 +133,9 @@ <%= if @latency_chart_data do %>
    -
    -
    -

    +
    +
    +

    Site Latency - Last 24 Hours

    diff --git a/lib/towerops_web/live/user_settings_live.ex b/lib/towerops_web/live/user_settings_live.ex index f78ddf2c..d6b95798 100644 --- a/lib/towerops_web/live/user_settings_live.ex +++ b/lib/towerops_web/live/user_settings_live.ex @@ -916,7 +916,7 @@ defmodule ToweropsWeb.UserSettingsLive do
    @@ -927,7 +927,7 @@ defmodule ToweropsWeb.UserSettingsLive do ​ -
    +
    <.form for={%{}} as={:token} phx-submit="create_api_token">
    @@ -935,13 +935,13 @@ defmodule ToweropsWeb.UserSettingsLive do

    Create API Token

    -

    +

    Give this token a name and select the organization it will have access to.

    @@ -990,7 +990,7 @@ defmodule ToweropsWeb.UserSettingsLive do @@ -1013,7 +1013,7 @@ defmodule ToweropsWeb.UserSettingsLive do
    @@ -1024,7 +1024,7 @@ defmodule ToweropsWeb.UserSettingsLive do ​ -
    +
    <.icon name="hero-check" class="h-6 w-6 text-green-600 dark:text-green-400" /> @@ -1032,18 +1032,18 @@ defmodule ToweropsWeb.UserSettingsLive do

    API Token Created

    -

    +

    Copy this token now. You won't be able to see it again.

    -
    - +
    + {@created_token}
    @@ -1074,7 +1074,7 @@ defmodule ToweropsWeb.UserSettingsLive do >
    @@ -1085,20 +1085,20 @@ defmodule ToweropsWeb.UserSettingsLive do ​ -
    +
    <.icon name="hero-key" class="h-6 w-6 text-blue-600 dark:text-blue-400" />

    Add Passkey

    -

    +

    Give this passkey a name to help you identify it later (e.g., "MacBook Touch ID", "iPhone").

    @@ -1107,7 +1107,7 @@ defmodule ToweropsWeb.UserSettingsLive do type="text" id="passkey-name-input" placeholder="e.g., MacBook Touch ID" - class="block w-full rounded-lg border-zinc-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-100 sm:text-sm" + class="block w-full rounded-lg border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 dark:border-white/10 dark:bg-gray-800/50 dark:text-white sm:text-sm" />
    Cancel