towerops/lib/towerops_web/live/changelog_live.ex
Graham McIntie 9e7ee5099d refactor: fix all credo strict issues, format all code, fix broken routes
- Fix broken route paths in dashboard (/discovery, /subscribers/trace, /config-changes)
- Fix insights empty state settings link (org-scoped route)
- Add underscores to all 86400 literals across 6 files
- Alphabetize aliases in search.ex and agent_channel.ex
- Extract changelog parser helper to reduce nesting
- Extract dashboard impact calculation to reduce nesting
- Refactor agent_channel config change detection (pattern match, extract function)
- Combine double Enum.reject into single call in trace.ex
- Fix line length in trace.ex search query
- Replace length/1 > 0 with != [] in trace_live
- Run mix format on all files
2026-02-13 19:34:40 -06:00

38 lines
1.3 KiB
Elixir

defmodule ToweropsWeb.ChangelogLive do
@moduledoc false
use ToweropsWeb, :live_view
@impl true
def mount(_params, _session, socket) do
entries = ToweropsWeb.ChangelogParser.parse()
{:ok, assign(socket, entries: entries, page_title: "What's New", active_page: "changelog")}
end
@impl true
def render(assigns) do
~H"""
<div class="mx-auto max-w-3xl px-4 py-8">
<h1 class="text-3xl font-bold mb-2">What's New</h1>
<p class="text-base-content/60 mb-8">Latest updates and improvements to TowerOps.</p>
<div class="space-y-8">
<div :for={entry <- @entries} class="relative pl-8 border-l-2 border-primary/20">
<div class="absolute -left-[9px] top-1 w-4 h-4 rounded-full bg-primary border-2 border-base-100" />
<div class="mb-1">
<span class="badge badge-ghost badge-sm font-mono">
{Calendar.strftime(entry.date, "%b %d, %Y")}
</span>
</div>
<h2 :if={entry.title} class="text-lg font-semibold mb-2">{entry.title}</h2>
<ul
:if={entry.items != []}
class="list-disc list-inside space-y-1 text-base-content/80 text-sm"
>
<li :for={item <- entry.items}>{item}</li>
</ul>
</div>
</div>
</div>
"""
end
end