Improve relationship UI handling (#42)

* Added tabbed view; improved relationships for media profile

* Adds new maybe_limit method for queries

* Improves UI for media items, associated tasks
This commit is contained in:
Kieran
2024-02-29 18:35:51 -08:00
committed by GitHub
parent 7809a25f2d
commit be8bcf0eb2
16 changed files with 292 additions and 127 deletions
@@ -54,10 +54,10 @@ defmodule PinchflatWeb.Sources.SourceController do
source =
id
|> Sources.get_source!()
|> Repo.preload(:media_profile)
|> Repo.preload([:media_profile, tasks: [:job]])
pending_media = Media.list_pending_media_items_for(source)
downloaded_media = Media.list_downloaded_media_items_for(source)
pending_media = Media.list_pending_media_items_for(source, limit: 100)
downloaded_media = Media.list_downloaded_media_items_for(source, limit: 100)
render(conn, :show, source: source, pending_media: pending_media, downloaded_media: downloaded_media)
end