Skip to content

Commit c4ea2df

Browse files
committed
feat: improve admin dashboard
1 parent 9ddfc53 commit c4ea2df

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

lib/algora_web/live/admin/admin_live.ex

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,23 @@ defmodule AlgoraWeb.Admin.AdminLive do
6262

6363
def cell(%{value: value} = assigns) when is_binary(value) do
6464
cond do
65-
String.starts_with?(value, "https://github.com") ->
65+
String.starts_with?(value, "https://github.com/") ->
6666
~H"""
67-
<.link href={@value} rel="noopener" class="flex justify-center">
68-
<.icon name="github" class="h-4 w-4" />
69-
</.link>
67+
<div class="flex items-center gap-2 text-sm">
68+
<.link
69+
href={@value}
70+
rel="noopener"
71+
target="_blank"
72+
class="h-8 w-8 rounded-lg bg-muted flex items-center justify-center hover:bg-muted-foreground/40"
73+
>
74+
<.icon name="github" class="h-4 w-4" />
75+
</.link>
76+
{@value |> String.replace("https://github.com/", "")}
77+
</div>
7078
"""
7179

72-
String.starts_with?(value, "https://avatars.githubusercontent.com") or
80+
String.starts_with?(value, "https://algora-console.fly.storage.tigris.dev") or
81+
String.starts_with?(value, "https://avatars.githubusercontent.com") or
7382
String.starts_with?(value, "https://app.algora.io/asset") or
7483
String.starts_with?(value, "https://console.algora.io/asset") or
7584
String.starts_with?(value, "https://algora.io/asset") or
@@ -85,7 +94,7 @@ defmodule AlgoraWeb.Admin.AdminLive do
8594

8695
String.match?(value, ~r/^[^\s]+@[^\s]+$/) && assigns.posthog_project_id ->
8796
~H"""
88-
<div class="flex items-center gap-2">
97+
<div class="flex items-center gap-2 text-sm">
8998
<.link
9099
href={"https://us.posthog.com/project/#{@posthog_project_id}/person/#{@value}#activeTab=sessionRecordings"}
91100
rel="noopener"
@@ -142,7 +151,7 @@ defmodule AlgoraWeb.Admin.AdminLive do
142151
def cell(%{value: {currency, amount}} = assigns) do
143152
~H"""
144153
<div class="font-display font-medium text-base text-emerald-400 tabular-nums text-right">
145-
{Money.new!(currency, amount, no_fraction_if_integer: true)}
154+
{Money.new!(currency, amount)}
146155
</div>
147156
"""
148157
end

0 commit comments

Comments
 (0)