diff --git a/assets/css/app.css b/assets/css/app.css index 39f9677c..12417166 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -3,6 +3,7 @@ @source "../js"; @source "../../lib/music_library_web"; @source "../../deps/fluxon/**/*.*ex"; +@import "../../deps/fluxon/priv/static/theme"; @source "../../deps/live_toast/lib/**/*.*ex"; /* A Tailwind plugin that makes "hero-#{ICON}" classes available. diff --git a/lib/music_library_web/components/barcode_scanner_component.ex b/lib/music_library_web/components/barcode_scanner_component.ex index 196916ea..5dc8fc0d 100644 --- a/lib/music_library_web/components/barcode_scanner_component.ex +++ b/lib/music_library_web/components/barcode_scanner_component.ex @@ -290,12 +290,12 @@ defmodule MusicLibraryWeb.BarcodeScannerComponent do {gettext("New")} <.link :if={@status == :wishlisted} navigate={~p"/wishlist/#{@record_id}"}> - <.badge color="yellow"> + <.badge color="warning"> {gettext("Wishlisted")} <.link :if={@status == :collected} navigate={~p"/collection/#{@record_id}"}> - <.badge color="green"> + <.badge color="success"> {gettext("Collected")} diff --git a/lib/music_library_web/components/release_component.ex b/lib/music_library_web/components/release_component.ex index 354e0785..43b5d357 100644 --- a/lib/music_library_web/components/release_component.ex +++ b/lib/music_library_web/components/release_component.ex @@ -52,7 +52,7 @@ defmodule MusicLibraryWeb.ReleaseComponent do > {gettext("Scrobble release")} - <.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")} diff --git a/lib/music_library_web/live/artist_live/show.ex b/lib/music_library_web/live/artist_live/show.ex index eeacafda..9fc57504 100644 --- a/lib/music_library_web/live/artist_live/show.ex +++ b/lib/music_library_web/live/artist_live/show.ex @@ -26,7 +26,7 @@ defmodule MusicLibraryWeb.ArtistLive.Show do href={LastFm.Artist.events_url(@lastfm_artist_info)} target="_blank" > - <.badge variant="pill" class="mr-2">{gettext("On Tour")} + <.badge variant="soft" class="mr-2">{gettext("On Tour")} """ end diff --git a/lib/music_library_web/live/artist_live/show.html.heex b/lib/music_library_web/live/artist_live/show.html.heex index 7c0b1711..46af8160 100644 --- a/lib/music_library_web/live/artist_live/show.html.heex +++ b/lib/music_library_web/live/artist_live/show.html.heex @@ -78,7 +78,7 @@ <.on_tour_link lastfm_artist_info={lastfm_artist_info} /> <.play_count play_count={lastfm_artist_info.play_count} /> - <.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" /> {gettext("Add more")} diff --git a/lib/music_library_web/live/collection_live/index.html.heex b/lib/music_library_web/live/collection_live/index.html.heex index 0a64df89..ab033b21 100644 --- a/lib/music_library_web/live/collection_live/index.html.heex +++ b/lib/music_library_web/live/collection_live/index.html.heex @@ -6,7 +6,6 @@ <.button class="rounded-l-md rounded-r-none" variant="solid" - as="link" size="sm" patch={~p"/collection/import"} > @@ -16,7 +15,6 @@ <.button class="-ml-px rounded-r-md rounded-l-none" variant="solid" - as="link" size="sm" patch={~p"/collection/scan"} > @@ -31,7 +29,6 @@ <.button patch={order_path(@record_list_params, :purchase)} - as="link" size="sm" class={[ "rounded-l-md rounded-r-none", @@ -48,7 +45,6 @@ <.button patch={order_path(@record_list_params, :alphabetical)} - as="link" size="sm" class={[ "-ml-px rounded-r-md rounded-l-none", diff --git a/lib/music_library_web/live/online_store_template_live/index.html.heex b/lib/music_library_web/live/online_store_template_live/index.html.heex index edcb7cf9..c1ea6837 100644 --- a/lib/music_library_web/live/online_store_template_live/index.html.heex +++ b/lib/music_library_web/live/online_store_template_live/index.html.heex @@ -7,7 +7,7 @@
diff --git a/lib/music_library_web/live/scrobble_rules_live/index.ex b/lib/music_library_web/live/scrobble_rules_live/index.ex index 17b00a25..0c85c228 100644 --- a/lib/music_library_web/live/scrobble_rules_live/index.ex +++ b/lib/music_library_web/live/scrobble_rules_live/index.ex @@ -114,8 +114,8 @@ defmodule MusicLibraryWeb.ScrobbleRulesLive.Index do defp type_badge(assigns) do ~H""" - <.badge :if={@type == :album} color="red">{gettext("Album")} - <.badge :if={@type == :artist} color="cyan">{gettext("Artist")} + <.badge :if={@type == :album} color="danger">{gettext("Album")} + <.badge :if={@type == :artist} color="info">{gettext("Artist")} """ end @@ -123,8 +123,8 @@ defmodule MusicLibraryWeb.ScrobbleRulesLive.Index do defp status_badge(assigns) do ~H""" - <.badge :if={@enabled} color="green">{gettext("Enabled")} - <.badge :if={!@enabled} color="yellow">{gettext("Disabled")} + <.badge :if={@enabled} color="success">{gettext("Enabled")} + <.badge :if={!@enabled} color="warning">{gettext("Disabled")} """ end end diff --git a/lib/music_library_web/live/scrobble_rules_live/index.html.heex b/lib/music_library_web/live/scrobble_rules_live/index.html.heex index 73dbf9ff..25d7d619 100644 --- a/lib/music_library_web/live/scrobble_rules_live/index.html.heex +++ b/lib/music_library_web/live/scrobble_rules_live/index.html.heex @@ -10,7 +10,6 @@ <.button class="rounded-l-md rounded-r-none" variant="solid" - as="link" size="sm" patch={~p"/scrobble-rules/new"} > diff --git a/lib/music_library_web/live/stats_live/index.html.heex b/lib/music_library_web/live/stats_live/index.html.heex index 9a553f93..9959d2b0 100644 --- a/lib/music_library_web/live/stats_live/index.html.heex +++ b/lib/music_library_web/live/stats_live/index.html.heex @@ -222,7 +222,7 @@ } navigate={~p"/collection/#{record_id}"} > - <.badge color="green"> + <.badge color="success"> {gettext("Collected")} @@ -233,7 +233,7 @@ } navigate={~p"/wishlist/#{record_id}"} > - <.badge color="yellow"> + <.badge color="warning"> {gettext("Wishlisted")} @@ -432,7 +432,7 @@ } navigate={~p"/collection/#{record_id}"} > - <.badge color="green">{gettext("Collected")} + <.badge color="success">{gettext("Collected")} <.link :if={ @@ -440,7 +440,7 @@ } navigate={~p"/wishlist/#{record_id}"} > - <.badge color="yellow">{gettext("Wishlisted")} + <.badge color="warning">{gettext("Wishlisted")} diff --git a/lib/music_library_web/live/stats_live/top_albums.ex b/lib/music_library_web/live/stats_live/top_albums.ex index db914339..53db4491 100644 --- a/lib/music_library_web/live/stats_live/top_albums.ex +++ b/lib/music_library_web/live/stats_live/top_albums.ex @@ -142,12 +142,15 @@ defmodule MusicLibraryWeb.StatsLive.TopAlbums do }> {album.play_count} - <.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} <.badge :if={tracked_record?(@wishlisted_releases, album.album_musicbrainz_id)} - color="yellow" + color="warning" > {album.play_count} diff --git a/lib/music_library_web/live/wishlist_live/index.html.heex b/lib/music_library_web/live/wishlist_live/index.html.heex index d78d0c24..c93da5b5 100644 --- a/lib/music_library_web/live/wishlist_live/index.html.heex +++ b/lib/music_library_web/live/wishlist_live/index.html.heex @@ -23,7 +23,6 @@ <.button patch={order_path(@record_list_params, :insertion)} - as="link" size="sm" class={[ "rounded-l-md rounded-r-none", @@ -35,7 +34,6 @@ <.button patch={order_path(@record_list_params, :alphabetical)} - as="link" size="sm" class={[ "-ml-px rounded-r-md rounded-l-none", diff --git a/lib/music_library_web/live/wishlist_live/show.html.heex b/lib/music_library_web/live/wishlist_live/show.html.heex index 36f913a0..5e784544 100644 --- a/lib/music_library_web/live/wishlist_live/show.html.heex +++ b/lib/music_library_web/live/wishlist_live/show.html.heex @@ -279,7 +279,6 @@
<.button :for={template <- @online_store_templates} - as="link" href={OnlineStoreTemplates.generate_url(template, @record)} target="_blank" rel="noopener noreferrer" diff --git a/mix.exs b/mix.exs index ba9fe109..5464e7c1 100644 --- a/mix.exs +++ b/mix.exs @@ -66,7 +66,7 @@ defmodule MusicLibrary.MixProject do app: false, compile: false, depth: 1}, - {:fluxon, "~> 1.2.0", repo: :fluxon}, + {:fluxon, "~> 2.0.0", repo: :fluxon}, {:flagmojis, "~> 1.0"}, {:live_toast, "~> 0.8.0"}, diff --git a/mix.lock b/mix.lock index 61e64fc4..26915df1 100644 --- a/mix.lock +++ b/mix.lock @@ -23,7 +23,7 @@ "fine": {:hex, :fine, "0.1.4", "b19a89c1476c7c57afb5f9314aed5960b5bc95d5277de4cb5ee8e1d1616ce379", [:mix], [], "hexpm", "be3324cc454a42d80951cf6023b9954e9ff27c6daa255483b3e8d608670303f5"}, "flagmojis": {:hex, :flagmojis, "1.0.0", "d2b411d9d2c150180103a4d605ee394cabc23c2b6ddf7a0011a9a55a23575281", [:mix], [], "hexpm", "9d9916575cf9dcbe6f0199b410994bec9d19d47971f70089eb7f210f823cd293"}, "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"}, "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]},