update custom domains

This commit is contained in:
nate 2026-04-10 05:38:42 +04:00
parent 1f63dd5546
commit 22d62d0df5
2 changed files with 6 additions and 2 deletions

View File

@ -684,7 +684,7 @@ export const dashboard = new Elysia()
const resolved = await getAccountId(cookie, headers);
if (!resolved?.accountId) return redirect("/dashboard");
const pages = await sql`
SELECT id, slug, title, description, theme
SELECT id, slug, title, description, theme, custom_domain
FROM status_pages WHERE account_id = ${resolved.accountId}
ORDER BY created_at DESC
`;

View File

@ -25,7 +25,11 @@
<h2 class="text-sm font-semibold text-gray-200 truncate"><%= p.title %></h2>
<span class="text-xs px-2 py-0.5 rounded-full bg-gray-800/50 border border-border-subtle text-gray-400 font-mono"><%= p.theme %></span>
</div>
<a href="https://status.pingql.com/<%= p.slug %>" target="_blank" class="text-xs text-blue-400 hover:text-blue-300 font-mono break-all">status.pingql.com/<%= p.slug %></a>
<% if (p.custom_domain) { %>
<a href="https://<%= p.custom_domain %>" target="_blank" class="text-xs text-blue-400 hover:text-blue-300 font-mono break-all"><%= p.custom_domain %></a>
<% } else { %>
<a href="https://status.pingql.com/<%= p.slug %>" target="_blank" class="text-xs text-blue-400 hover:text-blue-300 font-mono break-all">status.pingql.com/<%= p.slug %></a>
<% } %>
<% if (p.description) { %><p class="text-xs text-gray-500 mt-1"><%= p.description %></p><% } %>
</div>
<div class="flex items-center gap-2 shrink-0">