diff options
| author | metamuffin <metamuffin@disroot.org> | 2026-02-19 01:25:16 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2026-02-19 01:25:16 +0100 |
| commit | a197ab4dc250311255056d4b36a6da8653e1040c (patch) | |
| tree | aebdccdc4ff55cf0e54499214c532cea26dca493 /ui/src | |
| parent | 10290e706ac0190c874e8b6117cb2c11b5e6e504 (diff) | |
| download | jellything-a197ab4dc250311255056d4b36a6da8653e1040c.tar jellything-a197ab4dc250311255056d4b36a6da8653e1040c.tar.bz2 jellything-a197ab4dc250311255056d4b36a6da8653e1040c.tar.zst | |
several player fixes
Diffstat (limited to 'ui/src')
| -rw-r--r-- | ui/src/components/node_page.rs | 4 | ||||
| -rw-r--r-- | ui/src/lib.rs | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/ui/src/components/node_page.rs b/ui/src/components/node_page.rs index 26ab7f9..38d82ba 100644 --- a/ui/src/components/node_page.rs +++ b/ui/src/components/node_page.rs @@ -164,7 +164,9 @@ markup::define! { } Player<'a>(ri: &'a RenderInfo<'a>, nku: Object<'a>) { - video[id="player"] {} + @let node = nku.get(NKU_NODE).unwrap_or_default(); + @let pics = node.get(NO_PICTURES).unwrap_or_default(); + video[id="player", poster=pics.get(PICT_COVER).map(|p| u_image(p, 2048))] {} } } diff --git a/ui/src/lib.rs b/ui/src/lib.rs index 5b23ee2..63a2d07 100644 --- a/ui/src/lib.rs +++ b/ui/src/lib.rs @@ -36,7 +36,11 @@ pub fn render_view(ri: RenderInfo<'_>, view: Object<'_>) -> String { ri: &ri, main: View { ri: &ri, view }, title: view.get(VIEW_TITLE).unwrap_or_default(), - class: "theme-purple", + class: if view.has(VIEW_PLAYER.0) { + "theme-purple player" + } else { + "theme-purple" + }, } .to_string() } |