Update to Fluxon 2.0
Address required changes and immediate deprecations
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
@source "../js";
|
@source "../js";
|
||||||
@source "../../lib/music_library_web";
|
@source "../../lib/music_library_web";
|
||||||
@source "../../deps/fluxon/**/*.*ex";
|
@source "../../deps/fluxon/**/*.*ex";
|
||||||
|
@import "../../deps/fluxon/priv/static/theme";
|
||||||
@source "../../deps/live_toast/lib/**/*.*ex";
|
@source "../../deps/live_toast/lib/**/*.*ex";
|
||||||
|
|
||||||
/* A Tailwind plugin that makes "hero-#{ICON}" classes available.
|
/* A Tailwind plugin that makes "hero-#{ICON}" classes available.
|
||||||
|
|||||||
@@ -290,12 +290,12 @@ defmodule MusicLibraryWeb.BarcodeScannerComponent do
|
|||||||
{gettext("New")}
|
{gettext("New")}
|
||||||
</.badge>
|
</.badge>
|
||||||
<.link :if={@status == :wishlisted} navigate={~p"/wishlist/#{@record_id}"}>
|
<.link :if={@status == :wishlisted} navigate={~p"/wishlist/#{@record_id}"}>
|
||||||
<.badge color="yellow">
|
<.badge color="warning">
|
||||||
{gettext("Wishlisted")}
|
{gettext("Wishlisted")}
|
||||||
</.badge>
|
</.badge>
|
||||||
</.link>
|
</.link>
|
||||||
<.link :if={@status == :collected} navigate={~p"/collection/#{@record_id}"}>
|
<.link :if={@status == :collected} navigate={~p"/collection/#{@record_id}"}>
|
||||||
<.badge color="green">
|
<.badge color="success">
|
||||||
{gettext("Collected")}
|
{gettext("Collected")}
|
||||||
</.badge>
|
</.badge>
|
||||||
</.link>
|
</.link>
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ defmodule MusicLibraryWeb.ReleaseComponent do
|
|||||||
>
|
>
|
||||||
{gettext("Scrobble release")}
|
{gettext("Scrobble release")}
|
||||||
</.button>
|
</.button>
|
||||||
<.button :if={!@can_scrobble?} as="link" size="sm" href={LastFm.auth_url()}>
|
<.button :if={!@can_scrobble?} size="sm" href={LastFm.auth_url()}>
|
||||||
{gettext("Connect your Last.fm account")}
|
{gettext("Connect your Last.fm account")}
|
||||||
</.button>
|
</.button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ defmodule MusicLibraryWeb.ArtistLive.Show do
|
|||||||
href={LastFm.Artist.events_url(@lastfm_artist_info)}
|
href={LastFm.Artist.events_url(@lastfm_artist_info)}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
<.badge variant="pill" class="mr-2">{gettext("On Tour")}</.badge>
|
<.badge variant="soft" class="mr-2">{gettext("On Tour")}</.badge>
|
||||||
</a>
|
</a>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
<.on_tour_link lastfm_artist_info={lastfm_artist_info} />
|
<.on_tour_link lastfm_artist_info={lastfm_artist_info} />
|
||||||
<.play_count play_count={lastfm_artist_info.play_count} />
|
<.play_count play_count={lastfm_artist_info.play_count} />
|
||||||
</.async_result>
|
</.async_result>
|
||||||
<.button variant="solid" as="link" patch={~p"/artists/#{@artist.musicbrainz_id}/import"}>
|
<.button variant="solid" patch={~p"/artists/#{@artist.musicbrainz_id}/import"}>
|
||||||
<.icon name="hero-plus" class="h-4 w-4 mr-2" aria-hidden="true" data-slot="icon" />
|
<.icon name="hero-plus" class="h-4 w-4 mr-2" aria-hidden="true" data-slot="icon" />
|
||||||
{gettext("Add more")}
|
{gettext("Add more")}
|
||||||
</.button>
|
</.button>
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
<.button
|
<.button
|
||||||
class="rounded-l-md rounded-r-none"
|
class="rounded-l-md rounded-r-none"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
as="link"
|
|
||||||
size="sm"
|
size="sm"
|
||||||
patch={~p"/collection/import"}
|
patch={~p"/collection/import"}
|
||||||
>
|
>
|
||||||
@@ -16,7 +15,6 @@
|
|||||||
<.button
|
<.button
|
||||||
class="-ml-px rounded-r-md rounded-l-none"
|
class="-ml-px rounded-r-md rounded-l-none"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
as="link"
|
|
||||||
size="sm"
|
size="sm"
|
||||||
patch={~p"/collection/scan"}
|
patch={~p"/collection/scan"}
|
||||||
>
|
>
|
||||||
@@ -31,7 +29,6 @@
|
|||||||
<span class="isolate inline-flex rounded-md shadow-xs">
|
<span class="isolate inline-flex rounded-md shadow-xs">
|
||||||
<.button
|
<.button
|
||||||
patch={order_path(@record_list_params, :purchase)}
|
patch={order_path(@record_list_params, :purchase)}
|
||||||
as="link"
|
|
||||||
size="sm"
|
size="sm"
|
||||||
class={[
|
class={[
|
||||||
"rounded-l-md rounded-r-none",
|
"rounded-l-md rounded-r-none",
|
||||||
@@ -48,7 +45,6 @@
|
|||||||
</.button>
|
</.button>
|
||||||
<.button
|
<.button
|
||||||
patch={order_path(@record_list_params, :alphabetical)}
|
patch={order_path(@record_list_params, :alphabetical)}
|
||||||
as="link"
|
|
||||||
size="sm"
|
size="sm"
|
||||||
class={[
|
class={[
|
||||||
"-ml-px rounded-r-md rounded-l-none",
|
"-ml-px rounded-r-md rounded-l-none",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<nav class="isolate inline-flex rounded-md shadow-xs">
|
<nav class="isolate inline-flex rounded-md shadow-xs">
|
||||||
<.button variant="solid" as="link" size="sm" patch={~p"/online-store-templates/new"}>
|
<.button variant="solid" size="sm" patch={~p"/online-store-templates/new"}>
|
||||||
<.icon name="hero-plus" class="h-4 w-4 mr-2" aria-hidden="true" data-slot="icon" />
|
<.icon name="hero-plus" class="h-4 w-4 mr-2" aria-hidden="true" data-slot="icon" />
|
||||||
{gettext("New Template")}
|
{gettext("New Template")}
|
||||||
</.button>
|
</.button>
|
||||||
@@ -38,10 +38,10 @@
|
|||||||
<p class="text-sm font-semibold text-gray-900 dark:text-white">
|
<p class="text-sm font-semibold text-gray-900 dark:text-white">
|
||||||
{template.name}
|
{template.name}
|
||||||
</p>
|
</p>
|
||||||
<.badge :if={template.enabled} color="green">
|
<.badge :if={template.enabled} color="success">
|
||||||
{gettext("Enabled")}
|
{gettext("Enabled")}
|
||||||
</.badge>
|
</.badge>
|
||||||
<.badge :if={!template.enabled} color="yellow">
|
<.badge :if={!template.enabled} color="warning">
|
||||||
{gettext("Disabled")}
|
{gettext("Disabled")}
|
||||||
</.badge>
|
</.badge>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -114,8 +114,8 @@ defmodule MusicLibraryWeb.ScrobbleRulesLive.Index do
|
|||||||
|
|
||||||
defp type_badge(assigns) do
|
defp type_badge(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<.badge :if={@type == :album} color="red">{gettext("Album")}</.badge>
|
<.badge :if={@type == :album} color="danger">{gettext("Album")}</.badge>
|
||||||
<.badge :if={@type == :artist} color="cyan">{gettext("Artist")}</.badge>
|
<.badge :if={@type == :artist} color="info">{gettext("Artist")}</.badge>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -123,8 +123,8 @@ defmodule MusicLibraryWeb.ScrobbleRulesLive.Index do
|
|||||||
|
|
||||||
defp status_badge(assigns) do
|
defp status_badge(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<.badge :if={@enabled} color="green">{gettext("Enabled")}</.badge>
|
<.badge :if={@enabled} color="success">{gettext("Enabled")}</.badge>
|
||||||
<.badge :if={!@enabled} color="yellow">{gettext("Disabled")}</.badge>
|
<.badge :if={!@enabled} color="warning">{gettext("Disabled")}</.badge>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
<.button
|
<.button
|
||||||
class="rounded-l-md rounded-r-none"
|
class="rounded-l-md rounded-r-none"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
as="link"
|
|
||||||
size="sm"
|
size="sm"
|
||||||
patch={~p"/scrobble-rules/new"}
|
patch={~p"/scrobble-rules/new"}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -222,7 +222,7 @@
|
|||||||
}
|
}
|
||||||
navigate={~p"/collection/#{record_id}"}
|
navigate={~p"/collection/#{record_id}"}
|
||||||
>
|
>
|
||||||
<.badge color="green">
|
<.badge color="success">
|
||||||
{gettext("Collected")}
|
{gettext("Collected")}
|
||||||
</.badge>
|
</.badge>
|
||||||
</.link>
|
</.link>
|
||||||
@@ -233,7 +233,7 @@
|
|||||||
}
|
}
|
||||||
navigate={~p"/wishlist/#{record_id}"}
|
navigate={~p"/wishlist/#{record_id}"}
|
||||||
>
|
>
|
||||||
<.badge color="yellow">
|
<.badge color="warning">
|
||||||
{gettext("Wishlisted")}
|
{gettext("Wishlisted")}
|
||||||
</.badge>
|
</.badge>
|
||||||
</.link>
|
</.link>
|
||||||
@@ -432,7 +432,7 @@
|
|||||||
}
|
}
|
||||||
navigate={~p"/collection/#{record_id}"}
|
navigate={~p"/collection/#{record_id}"}
|
||||||
>
|
>
|
||||||
<.badge color="green">{gettext("Collected")}</.badge>
|
<.badge color="success">{gettext("Collected")}</.badge>
|
||||||
</.link>
|
</.link>
|
||||||
<.link
|
<.link
|
||||||
:if={
|
:if={
|
||||||
@@ -440,7 +440,7 @@
|
|||||||
}
|
}
|
||||||
navigate={~p"/wishlist/#{record_id}"}
|
navigate={~p"/wishlist/#{record_id}"}
|
||||||
>
|
>
|
||||||
<.badge color="yellow">{gettext("Wishlisted")}</.badge>
|
<.badge color="warning">{gettext("Wishlisted")}</.badge>
|
||||||
</.link>
|
</.link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -142,12 +142,15 @@ defmodule MusicLibraryWeb.StatsLive.TopAlbums do
|
|||||||
}>
|
}>
|
||||||
{album.play_count}
|
{album.play_count}
|
||||||
</.badge>
|
</.badge>
|
||||||
<.badge :if={tracked_record?(@collected_releases, album.album_musicbrainz_id)} color="green">
|
<.badge
|
||||||
|
:if={tracked_record?(@collected_releases, album.album_musicbrainz_id)}
|
||||||
|
color="success"
|
||||||
|
>
|
||||||
{album.play_count}
|
{album.play_count}
|
||||||
</.badge>
|
</.badge>
|
||||||
<.badge
|
<.badge
|
||||||
:if={tracked_record?(@wishlisted_releases, album.album_musicbrainz_id)}
|
:if={tracked_record?(@wishlisted_releases, album.album_musicbrainz_id)}
|
||||||
color="yellow"
|
color="warning"
|
||||||
>
|
>
|
||||||
{album.play_count}
|
{album.play_count}
|
||||||
</.badge>
|
</.badge>
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
<span class="isolate inline-flex rounded-md shadow-xs">
|
<span class="isolate inline-flex rounded-md shadow-xs">
|
||||||
<.button
|
<.button
|
||||||
patch={order_path(@record_list_params, :insertion)}
|
patch={order_path(@record_list_params, :insertion)}
|
||||||
as="link"
|
|
||||||
size="sm"
|
size="sm"
|
||||||
class={[
|
class={[
|
||||||
"rounded-l-md rounded-r-none",
|
"rounded-l-md rounded-r-none",
|
||||||
@@ -35,7 +34,6 @@
|
|||||||
</.button>
|
</.button>
|
||||||
<.button
|
<.button
|
||||||
patch={order_path(@record_list_params, :alphabetical)}
|
patch={order_path(@record_list_params, :alphabetical)}
|
||||||
as="link"
|
|
||||||
size="sm"
|
size="sm"
|
||||||
class={[
|
class={[
|
||||||
"-ml-px rounded-r-md rounded-l-none",
|
"-ml-px rounded-r-md rounded-l-none",
|
||||||
|
|||||||
@@ -279,7 +279,6 @@
|
|||||||
<div class="mt-4 space-y-2">
|
<div class="mt-4 space-y-2">
|
||||||
<.button
|
<.button
|
||||||
:for={template <- @online_store_templates}
|
:for={template <- @online_store_templates}
|
||||||
as="link"
|
|
||||||
href={OnlineStoreTemplates.generate_url(template, @record)}
|
href={OnlineStoreTemplates.generate_url(template, @record)}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ defmodule MusicLibrary.MixProject do
|
|||||||
app: false,
|
app: false,
|
||||||
compile: false,
|
compile: false,
|
||||||
depth: 1},
|
depth: 1},
|
||||||
{:fluxon, "~> 1.2.0", repo: :fluxon},
|
{:fluxon, "~> 2.0.0", repo: :fluxon},
|
||||||
{:flagmojis, "~> 1.0"},
|
{:flagmojis, "~> 1.0"},
|
||||||
{:live_toast, "~> 0.8.0"},
|
{:live_toast, "~> 0.8.0"},
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
"fine": {:hex, :fine, "0.1.4", "b19a89c1476c7c57afb5f9314aed5960b5bc95d5277de4cb5ee8e1d1616ce379", [:mix], [], "hexpm", "be3324cc454a42d80951cf6023b9954e9ff27c6daa255483b3e8d608670303f5"},
|
"fine": {:hex, :fine, "0.1.4", "b19a89c1476c7c57afb5f9314aed5960b5bc95d5277de4cb5ee8e1d1616ce379", [:mix], [], "hexpm", "be3324cc454a42d80951cf6023b9954e9ff27c6daa255483b3e8d608670303f5"},
|
||||||
"flagmojis": {:hex, :flagmojis, "1.0.0", "d2b411d9d2c150180103a4d605ee394cabc23c2b6ddf7a0011a9a55a23575281", [:mix], [], "hexpm", "9d9916575cf9dcbe6f0199b410994bec9d19d47971f70089eb7f210f823cd293"},
|
"flagmojis": {:hex, :flagmojis, "1.0.0", "d2b411d9d2c150180103a4d605ee394cabc23c2b6ddf7a0011a9a55a23575281", [:mix], [], "hexpm", "9d9916575cf9dcbe6f0199b410994bec9d19d47971f70089eb7f210f823cd293"},
|
||||||
"floki": {:hex, :floki, "0.38.0", "62b642386fa3f2f90713f6e231da0fa3256e41ef1089f83b6ceac7a3fd3abf33", [:mix], [], "hexpm", "a5943ee91e93fb2d635b612caf5508e36d37548e84928463ef9dd986f0d1abd9"},
|
"floki": {:hex, :floki, "0.38.0", "62b642386fa3f2f90713f6e231da0fa3256e41ef1089f83b6ceac7a3fd3abf33", [:mix], [], "hexpm", "a5943ee91e93fb2d635b612caf5508e36d37548e84928463ef9dd986f0d1abd9"},
|
||||||
"fluxon": {:hex, :fluxon, "1.2.0", "58e4bc1cb45a8c054d743798caf5db37d3594e77e16e3db18b15b420898dafe8", [:mix], [{:phoenix_live_view, ">= 1.0.0", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}], "fluxon", "33e8d4a6db32c6d2c88915d89e8222b33cd9ba05c114d8a5fda9c44a4c12afbf"},
|
"fluxon": {:hex, :fluxon, "2.0.0", "6a4bff70261584b45a112618a44a1eda8118cdc40fd015cbe6d10ebe83e179c6", [:mix], [{:phoenix_live_view, ">= 1.0.0", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}], "fluxon", "e12c57b3e7c7a35f5ca18d575f70900899185ca1e27bc6f42ded345366ee45fe"},
|
||||||
"gettext": {:hex, :gettext, "0.26.2", "5978aa7b21fada6deabf1f6341ddba50bc69c999e812211903b169799208f2a8", [:mix], [{:expo, "~> 0.5.1 or ~> 1.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "aa978504bcf76511efdc22d580ba08e2279caab1066b76bb9aa81c4a1e0a32a5"},
|
"gettext": {:hex, :gettext, "0.26.2", "5978aa7b21fada6deabf1f6341ddba50bc69c999e812211903b169799208f2a8", [:mix], [{:expo, "~> 0.5.1 or ~> 1.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "aa978504bcf76511efdc22d580ba08e2279caab1066b76bb9aa81c4a1e0a32a5"},
|
||||||
"glob_ex": {:hex, :glob_ex, "0.1.11", "cb50d3f1ef53f6ca04d6252c7fde09fd7a1cf63387714fe96f340a1349e62c93", [:mix], [], "hexpm", "342729363056e3145e61766b416769984c329e4378f1d558b63e341020525de4"},
|
"glob_ex": {:hex, :glob_ex, "0.1.11", "cb50d3f1ef53f6ca04d6252c7fde09fd7a1cf63387714fe96f340a1349e62c93", [:mix], [], "hexpm", "342729363056e3145e61766b416769984c329e4378f1d558b63e341020525de4"},
|
||||||
"heroicons": {:git, "https://github.com/tailwindlabs/heroicons.git", "0435d4ca364a608cc75e2f8683d374e55abbae26", [tag: "v2.2.0", sparse: "optimized", depth: 1]},
|
"heroicons": {:git, "https://github.com/tailwindlabs/heroicons.git", "0435d4ca364a608cc75e2f8683d374e55abbae26", [tag: "v2.2.0", sparse: "optimized", depth: 1]},
|
||||||
|
|||||||
Reference in New Issue
Block a user