diff --git a/lib/pinchflat/utils/string_utils.ex b/lib/pinchflat/utils/string_utils.ex
index d96d6c1..bee23b5 100644
--- a/lib/pinchflat/utils/string_utils.ex
+++ b/lib/pinchflat/utils/string_utils.ex
@@ -41,4 +41,15 @@ defmodule Pinchflat.Utils.StringUtils do
string
end
end
+
+ @doc """
+ Wraps a string in double braces. Useful as a UI helper now that
+ LiveView 1.0.0 allows `{}` for interpolation so now we can't use braces
+ directly in the view.
+
+ Returns binary()
+ """
+ def double_brace(string) do
+ "{{ #{string} }}"
+ end
end
diff --git a/lib/pinchflat_web.ex b/lib/pinchflat_web.ex
index ef58d00..28d5807 100644
--- a/lib/pinchflat_web.ex
+++ b/lib/pinchflat_web.ex
@@ -100,6 +100,7 @@ defmodule PinchflatWeb do
import PinchflatWeb.CustomComponents.TextComponents
import PinchflatWeb.CustomComponents.TableComponents
import PinchflatWeb.CustomComponents.ButtonComponents
+ import Pinchflat.Utils.StringUtils, only: [double_brace: 1]
alias Pinchflat.Settings
alias Pinchflat.Utils.StringUtils
diff --git a/lib/pinchflat_web/components/core_components.ex b/lib/pinchflat_web/components/core_components.ex
index 8f5ff75..e66e236 100644
--- a/lib/pinchflat_web/components/core_components.ex
+++ b/lib/pinchflat_web/components/core_components.ex
@@ -82,7 +82,7 @@ defmodule PinchflatWeb.CoreComponents do
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
@@ -126,9 +126,9 @@ defmodule PinchflatWeb.CoreComponents do
]}>
- <%= render_slot(@inner_block, f) %>
+ {render_slot(@inner_block, f)}
- <%= render_slot(action, f) %>
+ {render_slot(action, f)}
"""
@@ -297,11 +297,11 @@ defmodule PinchflatWeb.CoreComponents do
class={["rounded focus:ring-0", @inputclass]}
{@rest}
/>
- <%= @label %>
- <%= @label_suffix %>
+ {@label}
+ {@label_suffix}
- <.help :if={@help}><%= if @html_help, do: Phoenix.HTML.raw(@help), else: @help %>
- <.error :for={msg <- @errors}><%= msg %>
+ <.help :if={@help}>{if @html_help, do: Phoenix.HTML.raw(@help), else: @help}
+ <.error :for={msg <- @errors}>{msg}
"""
end
@@ -310,7 +310,7 @@ defmodule PinchflatWeb.CoreComponents do
~H"""
<.label for={@id}>
- <%= @label %>
<%= @label_suffix %>
+ {@label}
{@label_suffix}
@@ -323,12 +323,12 @@ defmodule PinchflatWeb.CoreComponents do
class={["rounded focus:ring-offset-0 ring-offset-0 focus:ring-0 h-5 w-5 ", @inputclass]}
/>
- <%= option_name %>
+ {option_name}
- <.help :if={@help}><%= if @html_help, do: Phoenix.HTML.raw(@help), else: @help %>
- <.error :for={msg <- @errors}><%= msg %>
+ <.help :if={@help}>{if @html_help, do: Phoenix.HTML.raw(@help), else: @help}
+ <.error :for={msg <- @errors}>{msg}
"""
end
@@ -342,8 +342,8 @@ defmodule PinchflatWeb.CoreComponents do
~H"""
<.label :if={@label} for={@id}>
- <%= @label %>
-
<%= @label_suffix %>
+ {@label}
+
{@label_suffix}
@@ -359,8 +359,8 @@ defmodule PinchflatWeb.CoreComponents do
>
- <.help :if={@help}><%= if @html_help, do: Phoenix.HTML.raw(@help), else: @help %>
- <.error :for={msg <- @errors}><%= msg %>
+ <.help :if={@help}>{if @html_help, do: Phoenix.HTML.raw(@help), else: @help}
+ <.error :for={msg <- @errors}>{msg}
"""
@@ -370,7 +370,7 @@ defmodule PinchflatWeb.CoreComponents do
~H"""
<.label :if={@label} for={@id}>
- <%= @label %>
<%= @label_suffix %>
+ {@label}
{@label_suffix}
- <%= @prompt %>
- <%= Phoenix.HTML.Form.options_for_select(@options, @value) %>
+ {@prompt}
+ {Phoenix.HTML.Form.options_for_select(@options, @value)}
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
- <.help :if={@help}><%= if @html_help, do: Phoenix.HTML.raw(@help), else: @help %>
- <.error :for={msg <- @errors}><%= msg %>
+ <.help :if={@help}>{if @html_help, do: Phoenix.HTML.raw(@help), else: @help}
+ <.error :for={msg <- @errors}>{msg}
"""
end
@@ -400,7 +400,7 @@ defmodule PinchflatWeb.CoreComponents do
~H"""
<.label for={@id}>
- <%= @label %><%= @label_suffix %>
+ {@label}{@label_suffix}
- <.help :if={@help}><%= if @html_help, do: Phoenix.HTML.raw(@help), else: @help %>
- <.error :for={msg <- @errors}><%= msg %>
+ <.help :if={@help}>{if @html_help, do: Phoenix.HTML.raw(@help), else: @help}
+ <.error :for={msg <- @errors}>{msg}
"""
end
@@ -425,7 +425,7 @@ defmodule PinchflatWeb.CoreComponents do
~H"""
<.label for={@id}>
- <%= @label %>
<%= @label_suffix %>
+ {@label}
{@label_suffix}
- <%= render_slot(@input_append) %>
+ {render_slot(@input_append)}
- <.help :if={@help}><%= if @html_help, do: Phoenix.HTML.raw(@help), else: @help %>
- <.error :for={msg <- @errors}><%= msg %>
+ <.help :if={@help}>{if @html_help, do: Phoenix.HTML.raw(@help), else: @help}
+ <.error :for={msg <- @errors}>{msg}
"""
end
@@ -458,7 +458,7 @@ defmodule PinchflatWeb.CoreComponents do
def help(assigns) do
~H"""
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
end
@@ -472,7 +472,7 @@ defmodule PinchflatWeb.CoreComponents do
def label(assigns) do
~H"""
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
end
@@ -486,7 +486,7 @@ defmodule PinchflatWeb.CoreComponents do
~H"""
<.icon name="hero-exclamation-circle-mini" class="mt-0.5 h-5 w-5 flex-none" />
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
end
@@ -505,13 +505,13 @@ defmodule PinchflatWeb.CoreComponents do
"""
end
@@ -551,9 +551,9 @@ defmodule PinchflatWeb.CoreComponents do
- <%= col[:label] %>
+ {col[:label]}
- <%= gettext("Actions") %>
+ {gettext("Actions")}
@@ -571,7 +571,7 @@ defmodule PinchflatWeb.CoreComponents do
- <%= render_slot(col, @row_item.(row)) %>
+ {render_slot(col, @row_item.(row))}
@@ -579,7 +579,7 @@ defmodule PinchflatWeb.CoreComponents do
- <%= render_slot(action, @row_item.(row)) %>
+ {render_slot(action, @row_item.(row))}
@@ -608,8 +608,8 @@ defmodule PinchflatWeb.CoreComponents do
-
<%= item.title %>
- <%= render_slot(item) %>
+ {item.title}
+ {render_slot(item)}
@@ -644,12 +644,12 @@ defmodule PinchflatWeb.CoreComponents do
~H"""
- <%= k %>:
+ {k}:
<%= if is_binary(v) && URI.parse(v).scheme && URI.parse(v).scheme =~ "http" do %>
- <%= v %>
+ {v}
<% else %>
- <%= v %>
+ {v}
<% end %>
@@ -672,7 +672,7 @@ defmodule PinchflatWeb.CoreComponents do
<.link href={@href} class="text-sm font-semibold leading-6 text-zinc-900 hover:text-zinc-700">
<.icon name="hero-arrow-left-solid" class="h-3 w-3" />
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
diff --git a/lib/pinchflat_web/components/custom_components/button_components.ex b/lib/pinchflat_web/components/custom_components/button_components.ex
index 61a8ed1..9942ebc 100644
--- a/lib/pinchflat_web/components/custom_components/button_components.ex
+++ b/lib/pinchflat_web/components/custom_components/button_components.ex
@@ -37,7 +37,7 @@ defmodule PinchflatWeb.CustomComponents.ButtonComponents do
disabled={@disabled}
{@rest}
>
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
end
@@ -66,7 +66,7 @@ defmodule PinchflatWeb.CustomComponents.ButtonComponents do
"font-medium text-white hover:bg-opacity-95"
]}
>
- <%= @text %>
+ {@text}
- <%= render_slot(option) %>
+ {render_slot(option)}
@@ -126,7 +126,7 @@ defmodule PinchflatWeb.CustomComponents.ButtonComponents do
>
- <%= @tooltip %>
+ {@tooltip}
"""
diff --git a/lib/pinchflat_web/components/custom_components/tab_components.ex b/lib/pinchflat_web/components/custom_components/tab_components.ex
index 56cfe2a..baade53 100644
--- a/lib/pinchflat_web/components/custom_components/tab_components.ex
+++ b/lib/pinchflat_web/components/custom_components/tab_components.ex
@@ -34,16 +34,16 @@ defmodule PinchflatWeb.CustomComponents.TabComponents do
x-bind:class={"openTab === '#{tab.id}' ? activeClasses : inactiveClasses"}
class="border-b-2 py-4 w-full sm:w-fit text-sm font-medium hover:text-meta-5 md:text-base"
>
- <%= tab.title %>
+ {tab.title}
- <%= render_slot(@tab_append) %>
+ {render_slot(@tab_append)}
- <%= render_slot(tab) %>
+ {render_slot(tab)}
diff --git a/lib/pinchflat_web/components/custom_components/table_components.ex b/lib/pinchflat_web/components/custom_components/table_components.ex
index 464de2e..7c661ba 100644
--- a/lib/pinchflat_web/components/custom_components/table_components.ex
+++ b/lib/pinchflat_web/components/custom_components/table_components.ex
@@ -32,7 +32,7 @@ defmodule PinchflatWeb.CustomComponents.TableComponents do
- <%= col[:label] %>
+ {col[:label]}
@@ -45,7 +45,7 @@ defmodule PinchflatWeb.CustomComponents.TableComponents do
col[:class]
]}
>
- <%= render_slot(col, @row_item.(row)) %>
+ {render_slot(col, @row_item.(row))}
diff --git a/lib/pinchflat_web/components/custom_components/text_components.ex b/lib/pinchflat_web/components/custom_components/text_components.ex
index 9319c55..d2bc8f6 100644
--- a/lib/pinchflat_web/components/custom_components/text_components.ex
+++ b/lib/pinchflat_web/components/custom_components/text_components.ex
@@ -12,7 +12,7 @@ defmodule PinchflatWeb.CustomComponents.TextComponents do
def inline_code(assigns) do
~H"""
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
end
@@ -26,7 +26,7 @@ defmodule PinchflatWeb.CustomComponents.TextComponents do
def inline_link(assigns) do
~H"""
<.link href={@href} target="_blank" class="text-blue-500 hover:text-blue-300">
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
end
@@ -41,7 +41,7 @@ defmodule PinchflatWeb.CustomComponents.TextComponents do
def subtle_link(assigns) do
~H"""
<.link href={@href} target={@target} class="underline decoration-bodydark decoration-1 hover:decoration-white">
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
end
@@ -82,7 +82,7 @@ defmodule PinchflatWeb.CustomComponents.TextComponents do
assigns = Map.put(assigns, :text, formatted_text)
~H"""
- <%= @text %>
+ {@text}
"""
end
@@ -98,7 +98,7 @@ defmodule PinchflatWeb.CustomComponents.TextComponents do
assigns = Map.put(assigns, :timezone, timezone)
~H"""
- <%= Calendar.strftime(Timex.Timezone.convert(@datetime, @timezone), @format) %>
+ {Calendar.strftime(Timex.Timezone.convert(@datetime, @timezone), @format)}
"""
end
@@ -109,7 +109,7 @@ defmodule PinchflatWeb.CustomComponents.TextComponents do
def localized_number(assigns) do
~H"""
- <%= @number %>
+ {@number}
"""
end
@@ -122,7 +122,7 @@ defmodule PinchflatWeb.CustomComponents.TextComponents do
def pluralize(assigns) do
~H"""
- <%= @word %><%= if @count == 1, do: "", else: @suffix %>
+ {@word}{if @count == 1, do: "", else: @suffix}
"""
end
end
diff --git a/lib/pinchflat_web/components/layouts.ex b/lib/pinchflat_web/components/layouts.ex
index fd4e4f4..2dacac2 100644
--- a/lib/pinchflat_web/components/layouts.ex
+++ b/lib/pinchflat_web/components/layouts.ex
@@ -61,7 +61,7 @@ defmodule PinchflatWeb.Layouts do
x-on:click="selected = !selected"
>
- <.icon name={@icon} /> <%= @text %>
+ <.icon name={@icon} /> {@text}
<.icon name="hero-chevron-down" x-bind:class="{ 'rotate-180': selected }" />
@@ -103,7 +103,7 @@ defmodule PinchflatWeb.Layouts do
@class
]}
>
- <.icon :if={@icon} name={@icon} /> <%= @text %>
+ <.icon :if={@icon} name={@icon} /> {@text}
"""
end
diff --git a/lib/pinchflat_web/components/layouts/app.html.heex b/lib/pinchflat_web/components/layouts/app.html.heex
index 63762ff..491035c 100644
--- a/lib/pinchflat_web/components/layouts/app.html.heex
+++ b/lib/pinchflat_web/components/layouts/app.html.heex
@@ -6,7 +6,7 @@
<.flash_group flash={@flash} />
- <%= @inner_content %>
+ {@inner_content}
diff --git a/lib/pinchflat_web/components/layouts/onboarding.html.heex b/lib/pinchflat_web/components/layouts/onboarding.html.heex
index b2b4e97..e7f24d9 100644
--- a/lib/pinchflat_web/components/layouts/onboarding.html.heex
+++ b/lib/pinchflat_web/components/layouts/onboarding.html.heex
@@ -11,7 +11,7 @@
<.flash_group flash={@flash} />
- <%= @inner_content %>
+ {@inner_content}
diff --git a/lib/pinchflat_web/components/layouts/partials/sidebar.html.heex b/lib/pinchflat_web/components/layouts/partials/sidebar.html.heex
index 2d7ae0d..e5e5b39 100644
--- a/lib/pinchflat_web/components/layouts/partials/sidebar.html.heex
+++ b/lib/pinchflat_web/components/layouts/partials/sidebar.html.heex
@@ -67,7 +67,7 @@
class="group relative flex items-center gap-2.5 px-4 pt-2 text-sm"
x-on:click={"markVersionAsSeen('#{Application.spec(:pinchflat)[:vsn]}')"}
>
- Pinchflat <%= Application.spec(:pinchflat)[:vsn] %>
+ Pinchflat {Application.spec(:pinchflat)[:vsn]}
- yt-dlp <%= Settings.get!(:yt_dlp_version) %>
+ yt-dlp {Settings.get!(:yt_dlp_version)}
diff --git a/lib/pinchflat_web/components/layouts/partials/upgrade_modal.heex b/lib/pinchflat_web/components/layouts/partials/upgrade_modal.heex
index 6422618..cbf5bc4 100644
--- a/lib/pinchflat_web/components/layouts/partials/upgrade_modal.heex
+++ b/lib/pinchflat_web/components/layouts/partials/upgrade_modal.heex
@@ -25,6 +25,6 @@
into the text box and press the button.
- <%= live_render(@conn, Pinchflat.UpgradeButtonLive) %>
+ {live_render(@conn, Pinchflat.UpgradeButtonLive)}
diff --git a/lib/pinchflat_web/components/layouts/root.html.heex b/lib/pinchflat_web/components/layouts/root.html.heex
index ba87086..4068d74 100644
--- a/lib/pinchflat_web/components/layouts/root.html.heex
+++ b/lib/pinchflat_web/components/layouts/root.html.heex
@@ -5,7 +5,7 @@
<.live_title>
- <%= assigns[:page_title] || "Pinchflat" %>
+ {assigns[:page_title] || "Pinchflat"}
@@ -21,7 +21,7 @@
class="dark text-bodydark bg-boxdark-2"
data-socket-path={Path.join(Application.get_env(:pinchflat, :base_route_path), "/live")}
>
- <%= @inner_content %>
+ {@inner_content}
<.donate_modal conn={@conn} />
diff --git a/lib/pinchflat_web/controllers/media_items/media_item_html/edit.html.heex b/lib/pinchflat_web/controllers/media_items/media_item_html/edit.html.heex
index 0924a77..c834602 100644
--- a/lib/pinchflat_web/controllers/media_items/media_item_html/edit.html.heex
+++ b/lib/pinchflat_web/controllers/media_items/media_item_html/edit.html.heex
@@ -1,6 +1,6 @@
- Editing "<%= StringUtils.truncate(@media_item.title, 35) %>"
+ Editing "{StringUtils.truncate(@media_item.title, 35)}"
diff --git a/lib/pinchflat_web/controllers/media_items/media_item_html/show.html.heex b/lib/pinchflat_web/controllers/media_items/media_item_html/show.html.heex
index 76f8124..881b34d 100644
--- a/lib/pinchflat_web/controllers/media_items/media_item_html/show.html.heex
+++ b/lib/pinchflat_web/controllers/media_items/media_item_html/show.html.heex
@@ -4,7 +4,7 @@
<.icon name="hero-arrow-left" class="w-10 h-10 hover:dark:text-white" />
- <%= StringUtils.truncate(@media_item.title, 35) %>
+ {StringUtils.truncate(@media_item.title, 35)}
@@ -31,8 +31,8 @@
<.media_preview media_item={@media_item} />
- <%= @media_item.title %>
- Uploaded: <%= DateTime.to_date(@media_item.uploaded_at) %>
+ {@media_item.title}
+ Uploaded: {DateTime.to_date(@media_item.uploaded_at)}
<.subtle_link href={@media_item.original_url} target="_blank">Open Original
@@ -58,7 +58,7 @@
Source:
<.subtle_link href={~p"/sources/#{@media_item.source_id}"}>
- <%= @media_item.source.custom_name %>
+ {@media_item.source.custom_name}
<.list_items_from_map map={Map.from_struct(@media_item)} />
@@ -68,10 +68,10 @@
<%= if match?([_|_], @media_item.tasks) do %>
<.table rows={@media_item.tasks} table_class="text-black dark:text-white">
<:col :let={task} label="Worker">
- <%= task.job.worker %>
+ {task.job.worker}
<:col :let={task} label="State">
- <%= task.job.state %>
+ {task.job.state}
<:col :let={task} label="Scheduled At">
<.datetime_in_zone datetime={task.job.scheduled_at} />
diff --git a/lib/pinchflat_web/controllers/media_profiles/media_profile_html/edit.html.heex b/lib/pinchflat_web/controllers/media_profiles/media_profile_html/edit.html.heex
index a56fea8..c663f57 100644
--- a/lib/pinchflat_web/controllers/media_profiles/media_profile_html/edit.html.heex
+++ b/lib/pinchflat_web/controllers/media_profiles/media_profile_html/edit.html.heex
@@ -3,7 +3,7 @@
<.icon name="hero-arrow-left" class="w-10 h-10 hover:dark:text-white" />
- Editing "<%= @media_profile.name %>"
+ Editing "{@media_profile.name}"
diff --git a/lib/pinchflat_web/controllers/media_profiles/media_profile_html/index.html.heex b/lib/pinchflat_web/controllers/media_profiles/media_profile_html/index.html.heex
index cff9635..fedfa74 100644
--- a/lib/pinchflat_web/controllers/media_profiles/media_profile_html/index.html.heex
+++ b/lib/pinchflat_web/controllers/media_profiles/media_profile_html/index.html.heex
@@ -16,11 +16,11 @@
<.table rows={@media_profiles} table_class="text-black dark:text-white">
<:col :let={media_profile} label="Name">
<.subtle_link href={~p"/media_profiles/#{media_profile.id}"}>
- <%= media_profile.name %>
+ {media_profile.name}
<:col :let={media_profile} label="Preferred Resolution">
- <%= media_profile.preferred_resolution %>
+ {media_profile.preferred_resolution}
<:col :let={media_profile} label="Sources">
<.subtle_link href={~p"/media_profiles/#{media_profile.id}/#tab-sources"}>
diff --git a/lib/pinchflat_web/controllers/media_profiles/media_profile_html/output_template_help.html.heex b/lib/pinchflat_web/controllers/media_profiles/media_profile_html/output_template_help.html.heex
index e3a1300..e17e846 100644
--- a/lib/pinchflat_web/controllers/media_profiles/media_profile_html/output_template_help.html.heex
+++ b/lib/pinchflat_web/controllers/media_profiles/media_profile_html/output_template_help.html.heex
@@ -6,7 +6,9 @@
Liquid-style:
- <.inline_code>/{{ channel }}/{{ title }} - {{ id }}.{{ ext }}
+ <.inline_code>
+ {"/#{double_brace("channel")}/#{double_brace("title")} - #{double_brace("id")}.#{double_brace("ext")}"}
+
yt-dlp-style
@@ -17,7 +19,7 @@
Any bare words:
- <.inline_code>/videos/1080p/{{ id }}.{{ ext }}
+ <.inline_code>{"/videos/1080p/#{double_brace("id")}.#{double_brace("ext")}"}
@@ -25,7 +27,7 @@
any
single-word yt-dlp
option can be used as liquid-style and it's automatically made filepath-safe. For example, the
- <.inline_code>{{ duration }}
+ <.inline_code>{double_brace("duration")}
option is translated to
<.inline_code>%(duration)S
@@ -33,12 +35,14 @@
Major 🔑:
these syntaxes can be mixed and matched freely! I prefer to use liquid-style and bare words
but I'll include yt-dlp-style when I need more control. For example:
- <.inline_code>/1080p/{{ channel }}/{{ title }}-(%(subtitles.en.-1.ext)s).{{ ext }}
+ <.inline_code>
+ {"/1080p/#{double_brace("channel")}/#{double_brace("title")}-(%(subtitles.en.-1.ext)s).#{double_brace("ext")}"}
+
NOTE:
Your template must
- end with an extension option (<.inline_code>.{{ ext }}
+ end with an extension option (<.inline_code>.{double_brace("ext")}
or
<.inline_code>.%(ext)S).
Downloading won't work as expected without it.
@@ -59,21 +63,21 @@
Media Center Custom Aliases
- <.inline_code>{{ <%= k %> }}
- - <%= html_escape({:safe, v}) %>
+ <.inline_code>{double_brace(k)}
+ - {html_escape({:safe, v})}
Other Custom Aliases
- <.inline_code>{{ <%= k %> }}
- - <%= html_escape({:safe, v}) %>
+ <.inline_code>{double_brace(k)}
+ - {html_escape({:safe, v})}
Common Options
- <.inline_code>{{ <%= opt %> }}
+ <.inline_code>{double_brace(opt)}
diff --git a/lib/pinchflat_web/controllers/media_profiles/media_profile_html/show.html.heex b/lib/pinchflat_web/controllers/media_profiles/media_profile_html/show.html.heex
index ef0629f..892926a 100644
--- a/lib/pinchflat_web/controllers/media_profiles/media_profile_html/show.html.heex
+++ b/lib/pinchflat_web/controllers/media_profiles/media_profile_html/show.html.heex
@@ -4,7 +4,7 @@
<.icon name="hero-arrow-left" class="w-10 h-10 hover:dark:text-white" />
- <%= @media_profile.name %>
+ {@media_profile.name}
@@ -33,10 +33,10 @@
<.table rows={@sources} table_class="text-black dark:text-white">
<:col :let={source} label="Name">
<.subtle_link href={~p"/sources/#{source.id}"}>
- <%= source.custom_name || source.collection_name %>
+ {source.custom_name || source.collection_name}
- <:col :let={source} label="Type"><%= source.collection_type %>
+ <:col :let={source} label="Type">{source.collection_type}
<:col :let={source} label="Should Download?">
<.icon name={if source.download_media, do: "hero-check", else: "hero-x-mark"} />
diff --git a/lib/pinchflat_web/controllers/pages/page_html.ex b/lib/pinchflat_web/controllers/pages/page_html.ex
index c96a6c9..f4f2665 100644
--- a/lib/pinchflat_web/controllers/pages/page_html.ex
+++ b/lib/pinchflat_web/controllers/pages/page_html.ex
@@ -17,7 +17,7 @@ defmodule PinchflatWeb.Pages.PageHTML do
})
~H"""
- <.localized_number number={@num} /> <%= @suffix %>
+ <.localized_number number={@num} /> {@suffix}
"""
end
end
diff --git a/lib/pinchflat_web/controllers/pages/page_html/history_table_live.ex b/lib/pinchflat_web/controllers/pages/page_html/history_table_live.ex
index 13919ab..ae4748b 100644
--- a/lib/pinchflat_web/controllers/pages/page_html/history_table_live.ex
+++ b/lib/pinchflat_web/controllers/pages/page_html/history_table_live.ex
@@ -30,21 +30,21 @@ defmodule Pinchflat.Pages.HistoryTableLive do
<.table rows={@records} table_class="text-white">
<:col :let={media_item} label="Title">
<.subtle_link href={~p"/sources/#{media_item.source_id}/media/#{media_item}"}>
- <%= StringUtils.truncate(media_item.title, 35) %>
+ {StringUtils.truncate(media_item.title, 35)}
<:col :let={media_item} label="Upload Date">
- <%= DateTime.to_date(media_item.uploaded_at) %>
+ {DateTime.to_date(media_item.uploaded_at)}
<:col :let={media_item} label="Indexed At">
- <%= format_datetime(media_item.inserted_at) %>
+ {format_datetime(media_item.inserted_at)}
<:col :let={media_item} label="Downloaded At">
- <%= format_datetime(media_item.media_downloaded_at) %>
+ {format_datetime(media_item.media_downloaded_at)}
<:col :let={media_item} label="Source">
<.subtle_link href={~p"/sources/#{media_item.source_id}"}>
- <%= StringUtils.truncate(media_item.source.custom_name, 35) %>
+ {StringUtils.truncate(media_item.source.custom_name, 35)}
diff --git a/lib/pinchflat_web/controllers/pages/page_html/home.html.heex b/lib/pinchflat_web/controllers/pages/page_html/home.html.heex
index 34a99cf..bd74446 100644
--- a/lib/pinchflat_web/controllers/pages/page_html/home.html.heex
+++ b/lib/pinchflat_web/controllers/pages/page_html/home.html.heex
@@ -42,13 +42,13 @@
Media History
- <%= live_render(@conn, Pinchflat.Pages.HistoryTableLive) %>
+ {live_render(@conn, Pinchflat.Pages.HistoryTableLive)}
Active Tasks
- <%= live_render(@conn, Pinchflat.Pages.JobTableLive) %>
+ {live_render(@conn, Pinchflat.Pages.JobTableLive)}
diff --git a/lib/pinchflat_web/controllers/pages/page_html/job_table_live.ex b/lib/pinchflat_web/controllers/pages/page_html/job_table_live.ex
index d65f724..4c3c4d4 100644
--- a/lib/pinchflat_web/controllers/pages/page_html/job_table_live.ex
+++ b/lib/pinchflat_web/controllers/pages/page_html/job_table_live.ex
@@ -19,18 +19,18 @@ defmodule Pinchflat.Pages.JobTableLive do
<.table rows={@tasks} table_class="text-white">
<:col :let={task} label="Task">
- <%= worker_to_task_name(task.job.worker) %>
+ {worker_to_task_name(task.job.worker)}
<:col :let={task} label="Subject">
<.subtle_link href={task_to_link(task)}>
- <%= StringUtils.truncate(task_to_record_name(task), 35) %>
+ {StringUtils.truncate(task_to_record_name(task), 35)}
<:col :let={task} label="Attempt No.">
- <%= task.job.attempt %>
+ {task.job.attempt}
<:col :let={task} label="Started At">
- <%= format_datetime(task.job.attempted_at) %>
+ {format_datetime(task.job.attempted_at)}
diff --git a/lib/pinchflat_web/controllers/searches/search_html.ex b/lib/pinchflat_web/controllers/searches/search_html.ex
index 1e049be..eea90e3 100644
--- a/lib/pinchflat_web/controllers/searches/search_html.ex
+++ b/lib/pinchflat_web/controllers/searches/search_html.ex
@@ -14,7 +14,7 @@ defmodule PinchflatWeb.Searches.SearchHTML do
~H"""
<%= for fragment <- @split_string do %>
- <%= render_fragment(fragment) %>
+ {render_fragment(fragment)}
<% end %>
"""
end
diff --git a/lib/pinchflat_web/controllers/searches/search_html/show.html.heex b/lib/pinchflat_web/controllers/searches/search_html/show.html.heex
index 47a09fb..310cc5c 100644
--- a/lib/pinchflat_web/controllers/searches/search_html/show.html.heex
+++ b/lib/pinchflat_web/controllers/searches/search_html/show.html.heex
@@ -1,6 +1,6 @@
- Results for "<%= StringUtils.truncate(@search_term, 50) %>"
+ Results for "{StringUtils.truncate(@search_term, 50)}"
@@ -11,7 +11,7 @@
<.table rows={@search_results} table_class="text-black dark:text-white">
<:col :let={result} label="Title">
<.subtle_link href={~p"/sources/#{result.source_id}/media/#{result.id}"}>
- <%= StringUtils.truncate(result.title, 35) %>
+ {StringUtils.truncate(result.title, 35)}
<:col :let={result} label="Excerpt">
diff --git a/lib/pinchflat_web/controllers/settings/setting_html/setting_form.html.heex b/lib/pinchflat_web/controllers/settings/setting_html/setting_form.html.heex
index 2cf1701..7fe2c94 100644
--- a/lib/pinchflat_web/controllers/settings/setting_html/setting_form.html.heex
+++ b/lib/pinchflat_web/controllers/settings/setting_html/setting_form.html.heex
@@ -19,11 +19,11 @@
- <%= live_render(
+ {live_render(
@conn,
Pinchflat.Settings.AppriseServerLive,
session: %{"value" => f[:apprise_server].value}
- ) %>
+ )}
diff --git a/lib/pinchflat_web/controllers/sources/source_html/edit.html.heex b/lib/pinchflat_web/controllers/sources/source_html/edit.html.heex
index e85cf1e..1ce327a 100644
--- a/lib/pinchflat_web/controllers/sources/source_html/edit.html.heex
+++ b/lib/pinchflat_web/controllers/sources/source_html/edit.html.heex
@@ -3,7 +3,7 @@
<.icon name="hero-arrow-left" class="w-10 h-10 hover:dark:text-white" />
- Editing "<%= @source.custom_name %>"
+ Editing "{@source.custom_name}"
diff --git a/lib/pinchflat_web/controllers/sources/source_html/index.html.heex b/lib/pinchflat_web/controllers/sources/source_html/index.html.heex
index 55cd45a..b6be923 100644
--- a/lib/pinchflat_web/controllers/sources/source_html/index.html.heex
+++ b/lib/pinchflat_web/controllers/sources/source_html/index.html.heex
@@ -12,7 +12,7 @@
- <%= live_render(@conn, PinchflatWeb.Sources.IndexTableLive) %>
+ {live_render(@conn, PinchflatWeb.Sources.IndexTableLive)}
diff --git a/lib/pinchflat_web/controllers/sources/source_html/index_table_live.ex b/lib/pinchflat_web/controllers/sources/source_html/index_table_live.ex
index 9c4992d..bd2051c 100644
--- a/lib/pinchflat_web/controllers/sources/source_html/index_table_live.ex
+++ b/lib/pinchflat_web/controllers/sources/source_html/index_table_live.ex
@@ -13,7 +13,7 @@ defmodule PinchflatWeb.Sources.IndexTableLive do
<.table rows={@sources} table_class="text-white">
<:col :let={source} label="Name">
<.subtle_link href={~p"/sources/#{source.id}"}>
- <%= StringUtils.truncate(source.custom_name || source.collection_name, 35) %>
+ {StringUtils.truncate(source.custom_name || source.collection_name, 35)}
<:col :let={source} label="Pending">
@@ -36,7 +36,7 @@ defmodule PinchflatWeb.Sources.IndexTableLive do
<:col :let={source} label="Media Profile">
<.subtle_link href={~p"/media_profiles/#{source.media_profile_id}"}>
- <%= source.media_profile.name %>
+ {source.media_profile.name}
<:col :let={source} label="Enabled?">
diff --git a/lib/pinchflat_web/controllers/sources/source_html/media_item_table_live.ex b/lib/pinchflat_web/controllers/sources/source_html/media_item_table_live.ex
index 678bf55..2f0fda5 100644
--- a/lib/pinchflat_web/controllers/sources/source_html/media_item_table_live.ex
+++ b/lib/pinchflat_web/controllers/sources/source_html/media_item_table_live.ex
@@ -48,14 +48,14 @@ defmodule PinchflatWeb.Sources.MediaItemTableLive do
<.table rows={@records} table_class="text-white">
<:col :let={media_item} label="Title">
<.subtle_link href={~p"/sources/#{@source.id}/media/#{media_item.id}"}>
- <%= StringUtils.truncate(media_item.title, 50) %>
+ {StringUtils.truncate(media_item.title, 50)}
<:col :let={media_item} :if={@media_state == "other"} label="Manually Ignored?">
<.icon name={if media_item.prevent_download, do: "hero-check", else: "hero-x-mark"} />
<:col :let={media_item} label="Upload Date">
- <%= DateTime.to_date(media_item.uploaded_at) %>
+ {DateTime.to_date(media_item.uploaded_at)}
<:col :let={media_item} label="" class="flex justify-end">
<.icon_link href={~p"/sources/#{@source.id}/media/#{media_item.id}/edit"} icon="hero-pencil-square" class="mr-4" />
diff --git a/lib/pinchflat_web/controllers/sources/source_html/show.html.heex b/lib/pinchflat_web/controllers/sources/source_html/show.html.heex
index f232f42..01ce6a0 100644
--- a/lib/pinchflat_web/controllers/sources/source_html/show.html.heex
+++ b/lib/pinchflat_web/controllers/sources/source_html/show.html.heex
@@ -4,7 +4,7 @@
<.icon name="hero-arrow-left" class="w-10 h-10 hover:dark:text-white" />
- <%= @source.custom_name %>
+ {@source.custom_name}
@@ -29,7 +29,7 @@
Media Profile:
<.subtle_link href={~p"/media_profiles/#{@source.media_profile_id}"}>
- <%= @source.media_profile.name %>
+ {@source.media_profile.name}
@@ -37,34 +37,34 @@
<:tab title="Pending" id="pending">
- <%= live_render(
+ {live_render(
@conn,
PinchflatWeb.Sources.MediaItemTableLive,
session: %{"source_id" => @source.id, "media_state" => "pending"}
- ) %>
+ )}
<:tab title="Downloaded" id="downloaded">
- <%= live_render(
+ {live_render(
@conn,
PinchflatWeb.Sources.MediaItemTableLive,
session: %{"source_id" => @source.id, "media_state" => "downloaded"}
- ) %>
+ )}
<:tab title="Other" id="other">
- <%= live_render(
+ {live_render(
@conn,
PinchflatWeb.Sources.MediaItemTableLive,
session: %{"source_id" => @source.id, "media_state" => "other"}
- ) %>
+ )}
<:tab title="Tasks" id="tasks">
<%= if match?([_|_], @pending_tasks) do %>
<.table rows={@pending_tasks} table_class="text-black dark:text-white">
<:col :let={task} label="Worker">
- <%= task.job.worker %>
+ {task.job.worker}
<:col :let={task} label="State">
- <%= task.job.state %>
+ {task.job.state}
<:col :let={task} label="Scheduled At">
<.datetime_in_zone datetime={task.job.scheduled_at} />
diff --git a/mix.exs b/mix.exs
index d8c0a1d..ce57f21 100644
--- a/mix.exs
+++ b/mix.exs
@@ -54,8 +54,8 @@ defmodule Pinchflat.MixProject do
{:ecto_sqlite3_extras, "~> 1.2.0"},
{:phoenix_html, "~> 3.3"},
{:phoenix_live_reload, "~> 1.2", only: :dev},
- {:phoenix_live_view, "~> 0.20.1"},
- {:floki, ">= 0.30.0", only: :test},
+ {:phoenix_live_view, "~> 1.0.0"},
+ {:floki, ">= 0.36.0", only: :test},
{:phoenix_live_dashboard, "~> 0.8.2"},
{:esbuild, "~> 0.8", runtime: Mix.env() == :dev},
{:tailwind, "~> 0.2.0", runtime: Mix.env() == :dev},
diff --git a/mix.lock b/mix.lock
index a176feb..3f6847f 100644
--- a/mix.lock
+++ b/mix.lock
@@ -1,6 +1,6 @@
%{
"bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"},
- "castore": {:hex, :castore, "1.0.8", "dedcf20ea746694647f883590b82d9e96014057aff1d44d03ec90f36a5c0dc6e", [:mix], [], "hexpm", "0b2b66d2ee742cb1d9cb8c8be3b43c3a70ee8651f37b75a8b982e036752983f1"},
+ "castore": {:hex, :castore, "1.0.10", "43bbeeac820f16c89f79721af1b3e092399b3a1ecc8df1a472738fd853574911", [:mix], [], "hexpm", "1b0b7ea14d889d9ea21202c43a4fa015eb913021cb535e8ed91946f4b77a8848"},
"cc_precompiler": {:hex, :cc_precompiler, "0.1.10", "47c9c08d8869cf09b41da36538f62bc1abd3e19e41701c2cea2675b53c704258", [:mix], [{:elixir_make, "~> 0.7", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "f6e046254e53cd6b41c6bacd70ae728011aa82b2742a80d6e2214855c6e06b22"},
"certifi": {:hex, :certifi, "2.12.0", "2d1cca2ec95f59643862af91f001478c9863c2ac9cb6e2f89780bfd8de987329", [:rebar3], [], "hexpm", "ee68d85df22e554040cdb4be100f33873ac6051387baf6a8f6ce82272340ff1c"},
"combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [], "hexpm", "1b1dbc1790073076580d0d1d64e42eae2366583e7aecd455d1215b0d16f2451b"},
@@ -10,7 +10,7 @@
"credo": {:hex, :credo, "1.7.7", "771445037228f763f9b2afd612b6aa2fd8e28432a95dbbc60d8e03ce71ba4446", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "8bc87496c9aaacdc3f90f01b7b0582467b69b4bd2441fe8aae3109d843cc2f2e"},
"credo_naming": {:hex, :credo_naming, "2.1.0", "d44ad58890d4db552e141ce64756a74ac1573665af766d1ac64931aa90d47744", [:make, :mix], [{:credo, "~> 1.6", [hex: :credo, repo: "hexpm", optional: false]}], "hexpm", "830e23b3fba972e2fccec49c0c089fe78c1e64bc16782a2682d78082351a2909"},
"db_connection": {:hex, :db_connection, "2.7.0", "b99faa9291bb09892c7da373bb82cba59aefa9b36300f6145c5f201c7adf48ec", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "dcf08f31b2701f857dfc787fbad78223d61a32204f217f15e881dd93e4bdd3ff"},
- "decimal": {:hex, :decimal, "2.1.1", "5611dca5d4b2c3dd497dec8f68751f1f1a54755e8ed2a966c2633cf885973ad6", [:mix], [], "hexpm", "53cfe5f497ed0e7771ae1a475575603d77425099ba5faef9394932b35020ffcc"},
+ "decimal": {:hex, :decimal, "2.2.0", "df3d06bb9517e302b1bd265c1e7f16cda51547ad9d99892049340841f3e15836", [:mix], [], "hexpm", "af8daf87384b51b7e611fb1a1f2c4d4876b65ef968fa8bd3adf44cff401c7f21"},
"dns_cluster": {:hex, :dns_cluster, "0.1.2", "3eb5be824c7888dadf9781018e1a5f1d3d1113b333c50bce90fb1b83df1015f2", [:mix], [], "hexpm", "7494272040f847637bbdb01bcdf4b871e82daf09b813e7d3cb3b84f112c6f2f8"},
"ecto": {:hex, :ecto, "3.12.3", "1a9111560731f6c3606924c81c870a68a34c819f6d4f03822f370ea31a582208", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "9efd91506ae722f95e48dc49e70d0cb632ede3b7a23896252a60a14ac6d59165"},
"ecto_sql": {:hex, :ecto_sql, "3.12.0", "73cea17edfa54bde76ee8561b30d29ea08f630959685006d9c6e7d1e59113b7d", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.12", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.7", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.19 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "dc9e4d206f274f3947e96142a8fdc5f69a2a6a9abb4649ef5c882323b6d512f0"},
@@ -24,7 +24,7 @@
"faker": {:hex, :faker, "0.17.0", "671019d0652f63aefd8723b72167ecdb284baf7d47ad3a82a15e9b8a6df5d1fa", [:mix], [], "hexpm", "a7d4ad84a93fd25c5f5303510753789fc2433ff241bf3b4144d3f6f291658a6a"},
"file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"},
"finch": {:hex, :finch, "0.17.0", "17d06e1d44d891d20dbd437335eebe844e2426a0cd7e3a3e220b461127c73f70", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.3", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.6 or ~> 1.0", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "8d014a661bb6a437263d4b5abf0bcbd3cf0deb26b1e8596f2a271d22e48934c7"},
- "floki": {:hex, :floki, "0.35.2", "87f8c75ed8654b9635b311774308b2760b47e9a579dabf2e4d5f1e1d42c39e0b", [:mix], [], "hexpm", "6b05289a8e9eac475f644f09c2e4ba7e19201fd002b89c28c1293e7bd16773d9"},
+ "floki": {:hex, :floki, "0.36.3", "1102f93b16a55bc5383b85ae3ec470f82dee056eaeff9195e8afdf0ef2a43c30", [:mix], [], "hexpm", "fe0158bff509e407735f6d40b3ee0d7deb47f3f3ee7c6c182ad28599f9f6b27a"},
"gettext": {:hex, :gettext, "0.24.0", "6f4d90ac5f3111673cbefc4ebee96fe5f37a114861ab8c7b7d5b30a1108ce6d8", [:mix], [{:expo, "~> 0.5.1", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "bdf75cdfcbe9e4622dd18e034b227d77dd17f0f133853a1c73b97b3d6c770e8b"},
"hackney": {:hex, :hackney, "1.20.1", "8d97aec62ddddd757d128bfd1df6c5861093419f8f7a4223823537bad5d064e2", [:rebar3], [{:certifi, "~> 2.12.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~> 6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~> 1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~> 1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.4.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~> 1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "fe9094e5f1a2a2c0a7d10918fee36bfec0ec2a979994cff8cfe8058cd9af38e3"},
"hpax": {:hex, :hpax, "0.1.2", "09a75600d9d8bbd064cdd741f21fc06fc1f4cf3d0fcc335e5aa19be1a7235c84", [:mix], [], "hexpm", "2c87843d5a23f5f16748ebe77969880e29809580efdaccd615cd3bed628a8c13"},
@@ -40,12 +40,12 @@
"nimble_pool": {:hex, :nimble_pool, "1.0.0", "5eb82705d138f4dd4423f69ceb19ac667b3b492ae570c9f5c900bb3d2f50a847", [:mix], [], "hexpm", "80be3b882d2d351882256087078e1b1952a28bf98d0a287be87e4a24a710b67a"},
"oban": {:hex, :oban, "2.18.3", "1608c04f8856c108555c379f2f56bc0759149d35fa9d3b825cb8a6769f8ae926", [:mix], [{:ecto_sql, "~> 3.10", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:ecto_sqlite3, "~> 0.9", [hex: :ecto_sqlite3, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.16", [hex: :postgrex, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "36ca6ca84ef6518f9c2c759ea88efd438a3c81d667ba23b02b062a0aa785475e"},
"parse_trans": {:hex, :parse_trans, "3.4.1", "6e6aa8167cb44cc8f39441d05193be6e6f4e7c2946cb2759f015f8c56b76e5ff", [:rebar3], [], "hexpm", "620a406ce75dada827b82e453c19cf06776be266f5a67cff34e1ef2cbb60e49a"},
- "phoenix": {:hex, :phoenix, "1.7.14", "a7d0b3f1bc95987044ddada111e77bd7f75646a08518942c72a8440278ae7825", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.7", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "c7859bc56cc5dfef19ecfc240775dae358cbaa530231118a9e014df392ace61a"},
+ "phoenix": {:hex, :phoenix, "1.7.17", "2fcdceecc6fb90bec26fab008f96abbd0fd93bc9956ec7985e5892cf545152ca", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.7", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "50e8ad537f3f7b0efb1509b2f75b5c918f697be6a45d48e49a30d3b7c0e464c9"},
"phoenix_ecto": {:hex, :phoenix_ecto, "4.4.3", "86e9878f833829c3f66da03d75254c155d91d72a201eb56ae83482328dc7ca93", [:mix], [{:ecto, "~> 3.5", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "d36c401206f3011fefd63d04e8ef626ec8791975d9d107f9a0817d426f61ac07"},
"phoenix_html": {:hex, :phoenix_html, "3.3.4", "42a09fc443bbc1da37e372a5c8e6755d046f22b9b11343bf885067357da21cb3", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "0249d3abec3714aff3415e7ee3d9786cb325be3151e6c4b3021502c585bf53fb"},
"phoenix_live_dashboard": {:hex, :phoenix_live_dashboard, "0.8.3", "7ff51c9b6609470f681fbea20578dede0e548302b0c8bdf338b5a753a4f045bf", [:mix], [{:ecto, "~> 3.6.2 or ~> 3.7", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_mysql_extras, "~> 0.5", [hex: :ecto_mysql_extras, repo: "hexpm", optional: true]}, {:ecto_psql_extras, "~> 0.7", [hex: :ecto_psql_extras, repo: "hexpm", optional: true]}, {:ecto_sqlite3_extras, "~> 1.1.7 or ~> 1.2.0", [hex: :ecto_sqlite3_extras, repo: "hexpm", optional: true]}, {:mime, "~> 1.6 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.19 or ~> 1.0", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:telemetry_metrics, "~> 0.6 or ~> 1.0", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}], "hexpm", "f9470a0a8bae4f56430a23d42f977b5a6205fdba6559d76f932b876bfaec652d"},
"phoenix_live_reload": {:hex, :phoenix_live_reload, "1.4.1", "2aff698f5e47369decde4357ba91fc9c37c6487a512b41732818f2204a8ef1d3", [:mix], [{:file_system, "~> 0.2.1 or ~> 0.3", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "9bffb834e7ddf08467fe54ae58b5785507aaba6255568ae22b4d46e2bb3615ab"},
- "phoenix_live_view": {:hex, :phoenix_live_view, "0.20.3", "8b6406bc0a451f295407d7acff7f234a6314be5bbe0b3f90ed82b07f50049878", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a8e4385e05618b424779f894ed2df97d3c7518b7285fcd11979077ae6226466b"},
+ "phoenix_live_view": {:hex, :phoenix_live_view, "1.0.0", "3a10dfce8f87b2ad4dc65de0732fc2a11e670b2779a19e8d3281f4619a85bce4", [:mix], [{:floki, "~> 0.36", [hex: :floki, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "254caef0028765965ca6bd104cc7d68dcc7d57cc42912bef92f6b03047251d99"},
"phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.3", "3168d78ba41835aecad272d5e8cd51aa87a7ac9eb836eabc42f6e57538e3731d", [:mix], [], "hexpm", "bba06bc1dcfd8cb086759f0edc94a8ba2bc8896d5331a1e2c2902bf8e36ee502"},
"phoenix_template": {:hex, :phoenix_template, "1.0.4", "e2092c132f3b5e5b2d49c96695342eb36d0ed514c5b252a77048d5969330d639", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "2c0c81f0e5c6753faf5cca2f229c9709919aba34fab866d3bc05060c9c444206"},
"plug": {:hex, :plug, "1.16.1", "40c74619c12f82736d2214557dedec2e9762029b2438d6d175c5074c933edc9d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a13ff6b9006b03d7e33874945b2755253841b238c34071ed85b0e86057f8cddc"},
@@ -64,5 +64,5 @@
"tzdata": {:hex, :tzdata, "1.1.2", "45e5f1fcf8729525ec27c65e163be5b3d247ab1702581a94674e008413eef50b", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "cec7b286e608371602318c414f344941d5eb0375e14cfdab605cca2fe66cba8b"},
"unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"},
"websock": {:hex, :websock, "0.5.3", "2f69a6ebe810328555b6fe5c831a851f485e303a7c8ce6c5f675abeb20ebdadc", [:mix], [], "hexpm", "6105453d7fac22c712ad66fab1d45abdf049868f253cf719b625151460b8b453"},
- "websock_adapter": {:hex, :websock_adapter, "0.5.7", "65fa74042530064ef0570b75b43f5c49bb8b235d6515671b3d250022cb8a1f9e", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "d0f478ee64deddfec64b800673fd6e0c8888b079d9f3444dd96d2a98383bdbd1"},
+ "websock_adapter": {:hex, :websock_adapter, "0.5.8", "3b97dc94e407e2d1fc666b2fb9acf6be81a1798a2602294aac000260a7c4a47d", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "315b9a1865552212b5f35140ad194e67ce31af45bcee443d4ecb96b5fd3f3782"},
}
diff --git a/test/pinchflat/utils/string_utils_test.exs b/test/pinchflat/utils/string_utils_test.exs
index 374b293..e0af7ce 100644
--- a/test/pinchflat/utils/string_utils_test.exs
+++ b/test/pinchflat/utils/string_utils_test.exs
@@ -41,4 +41,10 @@ defmodule Pinchflat.Utils.StringUtilsTest do
assert StringUtils.truncate("hello", 10) == "hello"
end
end
+
+ describe "double_brace/1" do
+ test "wraps a string in double braces" do
+ assert StringUtils.double_brace("hello") == "{{ hello }}"
+ end
+ end
end