diff --git a/lib/music_library/records.ex b/lib/music_library/records.ex index 25f9f4f3..f26cb822 100644 --- a/lib/music_library/records.ex +++ b/lib/music_library/records.ex @@ -22,7 +22,9 @@ defmodule MusicLibrary.Records do :release_ids, :included_release_group_ids, :cover_hash, - :release_date + :release_date, + :inserted_at, + :updated_at ] end diff --git a/lib/music_library/records/search_index.ex b/lib/music_library/records/search_index.ex index 857add93..0047621d 100644 --- a/lib/music_library/records/search_index.ex +++ b/lib/music_library/records/search_index.ex @@ -28,5 +28,7 @@ defmodule MusicLibrary.Records.SearchIndex do field :included_release_group_ids, {:array, :string}, default: [] embeds_many :artists, Artist + + timestamps(type: :utc_datetime) end end diff --git a/lib/music_library_web/components/record_components.ex b/lib/music_library_web/components/record_components.ex index 8b4d2a18..5d09ca77 100644 --- a/lib/music_library_web/components/record_components.ex +++ b/lib/music_library_web/components/record_components.ex @@ -91,6 +91,14 @@ defmodule MusicLibraryWeb.RecordComponents do /> {Records.Record.format_as_date(record.purchased_at)} + + ยท + + {gettext("Wishlisted on")} + + <.icon name="hero-star" class="-mt-1 h-4 w-4" aria-hidden="true" data-slot="icon" /> + {Records.Record.format_as_date(record.inserted_at)} +
@@ -106,6 +114,13 @@ defmodule MusicLibraryWeb.RecordComponents do <.icon name="hero-banknotes" class="-mt-1 h-4 w-4" aria-hidden="true" data-slot="icon" /> {Records.Record.format_as_date(record.purchased_at)} ++ + {gettext("Wishlisted on")} + + <.icon name="hero-star" class="-mt-1 h-4 w-4" aria-hidden="true" data-slot="icon" /> + {Records.Record.format_as_date(record.inserted_at)} +
<%!-- TODO: replace with OSS version --%> <.actions_menu id={record.id} background_container_target="#records > li"> diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index 0c6776d8..7df63b12 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -905,3 +905,8 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Last year" msgstr "" + +#: lib/music_library_web/components/record_components.ex +#, elixir-autogen, elixir-format +msgid "Wishlisted on" +msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po index 79de3dbe..58862c2e 100644 --- a/priv/gettext/en/LC_MESSAGES/default.po +++ b/priv/gettext/en/LC_MESSAGES/default.po @@ -905,3 +905,8 @@ msgstr "" #, elixir-autogen, elixir-format, fuzzy msgid "Last year" msgstr "" + +#: lib/music_library_web/components/record_components.ex +#, elixir-autogen, elixir-format, fuzzy +msgid "Wishlisted on" +msgstr ""