Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
thebugcatcher committed Oct 28, 2023
1 parent a92cbad commit fd5dd9c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 20 deletions.
1 change: 0 additions & 1 deletion config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ if config_env() == :prod do
secret_key_base: secret_key_base
end


if config_env() != :test do
config :heimdall, Heimdall.SecretsPruner,
enabled: System.get_env("PRUNE_OLD_SECRETS", "true") == "true",
Expand Down
20 changes: 12 additions & 8 deletions lib/heimdall/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ defmodule Heimdall.Application do

@impl true
def start(_type, _args) do
children = Enum.reject([
HeimdallWeb.Telemetry,
Heimdall.Repo,
maybe_start_pruner(),
{Phoenix.PubSub, name: Heimdall.PubSub},
{Finch, name: Heimdall.Finch},
HeimdallWeb.Endpoint
], &is_nil/1)
children =
Enum.reject(
[
HeimdallWeb.Telemetry,
Heimdall.Repo,
maybe_start_pruner(),
{Phoenix.PubSub, name: Heimdall.PubSub},
{Finch, name: Heimdall.Finch},
HeimdallWeb.Endpoint
],
&is_nil/1
)

opts = [strategy: :one_for_one, name: Heimdall.Supervisor]
Supervisor.start_link(children, opts)
Expand Down
3 changes: 1 addition & 2 deletions lib/heimdall_web/components/layouts/app.html.heex
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<header class="py-6 bg-gray-200">
<div class="text-center text-xl text-gray-700">
Heimdall
<.icon name="hero-lock-closed" class="-mt-1.5 h-6 w-6" />
Heimdall <.icon name="hero-lock-closed" class="-mt-1.5 h-6 w-6" />
</div>
</header>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/clipboard.min.js"></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/clipboard.min.js"
>
</script>

<div class="text-center">
Secret "<strong><%= @secret.title %></strong>" successfully created

<div class="mt-2 grid grid-cols-10">
<div class="col-span-9">
<.input name="urlToCopy" id="urlToCopy" value={ url(~p"/secrets/#{@secret.id}") } readonly />
<.input
name="urlToCopy"
id="urlToCopy"
value={url(~p"/secrets/#{@secret.id}")}
readonly
/>
</div>

<div class="mt-4">
<span
class="cursor-pointer clipit"
data-clipboard-target="#urlToCopy"
>
<span class="cursor-pointer clipit" data-clipboard-target="#urlToCopy">
<.icon name="hero-document-duplicate-solid" class="h-5 w-5" />
</span>
</div>
Expand All @@ -26,5 +30,4 @@
alert("Copied to clipboard");
e.clearSelection();
});
</script>
</script>

0 comments on commit fd5dd9c

Please sign in to comment.