Fix icons, add Anki, exclude dashboard self-reference

- Extend Tailwind source scan to lib/homelab_dashboard/ so icon classes
  in services_sync.ex are included in compiled CSS
- Add Anki service (hero-academic-cap) to icon and description maps
- Exclude 'devbox' (the dashboard itself) from the rendered service list

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
adyrem
2026-05-19 15:12:43 +02:00
parent 9461285318
commit 3a54366468
2 changed files with 9 additions and 2 deletions
+1
View File
@@ -5,6 +5,7 @@
@source "../css";
@source "../js";
@source "../../lib/homelab_dashboard_web";
@source "../../lib/homelab_dashboard";
/* A Tailwind plugin that makes "hero-#{ICON}" classes available.
The heroicons installation itself is managed by your mix.exs */
+8 -2
View File
@@ -16,7 +16,8 @@ defmodule HomelabDashboard.ServicesSync do
"radarr" => "hero-film",
"sonarr" => "hero-tv",
"prowlarr" => "hero-funnel",
"qbittorrent" => "hero-cloud-arrow-down"
"qbittorrent" => "hero-cloud-arrow-down",
"anki" => "hero-academic-cap"
}
@descriptions %{
@@ -30,7 +31,8 @@ defmodule HomelabDashboard.ServicesSync do
"radarr" => "Movie collection manager",
"sonarr" => "TV series collection manager",
"prowlarr" => "Indexer manager",
"qbittorrent" => "Torrent client"
"qbittorrent" => "Torrent client",
"anki" => "Flashcard study tool"
}
@display_names %{
@@ -43,6 +45,9 @@ defmodule HomelabDashboard.ServicesSync do
"pihole" => "/admin"
}
# Services to omit from the dashboard (e.g. the dashboard itself)
@excluded_services ~w(devbox)
def start_link(opts \\ []) do
GenServer.start_link(__MODULE__, opts, name: __MODULE__)
end
@@ -113,6 +118,7 @@ defmodule HomelabDashboard.ServicesSync do
end
defp parse_services(services) do
services = Enum.reject(services, &(&1["name"] in @excluded_services))
{public_raw, internal_raw} = Enum.split_with(services, &Map.has_key?(&1, "public_host"))
public =