From afaf2561a76c7d2665928fc79763d7fb4f55269e Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Sun, 22 Jan 2023 23:03:12 -0500 Subject: [PATCH] improvement: fix build/format/other small issues --- Dockerfile | 1 - lib/ash_hq_web/components/forum/attachment.ex | 4 +--- lib/ash_hq_web/pages/forum.ex | 4 +--- lib/ash_hq_web/pages/media.ex | 5 +++-- lib/ash_hq_web/templates/layout/root.html.eex | 4 +++- mix.exs | 6 ++---- mix.lock | 1 - 7 files changed, 10 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7031df4..4072590 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,7 +38,6 @@ RUN mix assets.deploy RUN mix compile COPY ./config/runtime.exs config/runtime.exs COPY ./rel ./rel -RUN mix ua_inspector.download RUN mix release --overwrite RUN mkdir indexes CMD ["_build/prod/rel/ash_hq/bin/ash_hq", "start"] diff --git a/lib/ash_hq_web/components/forum/attachment.ex b/lib/ash_hq_web/components/forum/attachment.ex index 68a190d..d36998f 100644 --- a/lib/ash_hq_web/components/forum/attachment.ex +++ b/lib/ash_hq_web/components/forum/attachment.ex @@ -12,10 +12,8 @@ defmodule AshHqWeb.Components.Forum.Attachment do - {#match {:image, _mime}} - - + {#match _} other {/case} diff --git a/lib/ash_hq_web/pages/forum.ex b/lib/ash_hq_web/pages/forum.ex index 0db6dff..9163be7 100644 --- a/lib/ash_hq_web/pages/forum.ex +++ b/lib/ash_hq_web/pages/forum.ex @@ -241,14 +241,12 @@ defmodule AshHqWeb.Pages.Forum do defp assign_tags(socket) do tags = AshHq.Discord.Tag - # TODO: use distinct - # |> Ash.Query.distinct(:name) + |> Ash.Query.distinct(:name) |> Ash.Query.filter(channel_id == ^socket.assigns.channel.id) |> Ash.Query.select(:name) |> Ash.Query.sort(:name) |> AshHq.Discord.read!() |> Enum.map(&to_string(&1.name)) - |> Enum.uniq_by(&String.downcase/1) assign(socket, :tags, tags) end diff --git a/lib/ash_hq_web/pages/media.ex b/lib/ash_hq_web/pages/media.ex index aa374b8..f3acd6a 100644 --- a/lib/ash_hq_web/pages/media.ex +++ b/lib/ash_hq_web/pages/media.ex @@ -41,7 +41,8 @@ defmodule AshHqWeb.Pages.Media do class="twitter-timeline" data-height="560px" href="https://twitter.com/AshFramework/lists/1604385682176327681?ref_src=twsrc%5Etfw" - >Twitter Feed... + >Loading Twitter Feed... +
@@ -58,7 +59,7 @@ defmodule AshHqWeb.Pages.Media do
-
Example Open Source Projects
+
Example Projects