diff options
| author | metamuffin <metamuffin@disroot.org> | 2026-02-19 00:34:03 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2026-02-19 00:34:03 +0100 |
| commit | 38c3903265d3f47206e13232606d864b05ad00cc (patch) | |
| tree | fe64d4bec58e31d6b34b7158075ca312bf2008e1 /ui | |
| parent | 848d4adc1a6095e92b67d2fe7211c303924e5c04 (diff) | |
| download | jellything-38c3903265d3f47206e13232606d864b05ad00cc.tar jellything-38c3903265d3f47206e13232606d864b05ad00cc.tar.bz2 jellything-38c3903265d3f47206e13232606d864b05ad00cc.tar.zst | |
readd player page; ident naming
Diffstat (limited to 'ui')
| -rw-r--r-- | ui/client-scripts/src/player/mod.ts | 4 | ||||
| -rw-r--r-- | ui/src/components/mod.rs | 5 | ||||
| -rw-r--r-- | ui/src/components/node_page.rs | 7 |
3 files changed, 12 insertions, 4 deletions
diff --git a/ui/client-scripts/src/player/mod.ts b/ui/client-scripts/src/player/mod.ts index dc9e51d..6f09ede 100644 --- a/ui/client-scripts/src/player/mod.ts +++ b/ui/client-scripts/src/player/mod.ts @@ -14,12 +14,12 @@ import { Chapter, NodePublic, NodeUserData } from "./types_node.ts"; import { FormatInfo, TrackKind } from "./types_stream.ts"; globalThis.addEventListener("DOMContentLoaded", () => { - if (document.body.classList.contains("player")) { + if (document.getElementById("player")) { if (globalThis.location.search.search("nojsp") != -1) return if (!globalThis.MediaSource) return alert("Media Source Extension API required") const node_id = globalThis.location.pathname.split("/")[2]; document.getElementById("player")?.remove(); - document.getElementsByClassName("playerconf").item(0)?.remove() + // document.getElementsByClassName("playerconf").item(0)?.remove() globalThis.dispatchEvent(new Event("navigationrequiresreload")) document.getElementById("main")!.prepend(initialize_player(node_id)) } diff --git a/ui/src/components/mod.rs b/ui/src/components/mod.rs index b63fa44..c3ba9b0 100644 --- a/ui/src/components/mod.rs +++ b/ui/src/components/mod.rs @@ -20,7 +20,7 @@ use crate::{ login::{AccountLogin, AccountLogout, AccountSetPassword}, message::Message, node_list::NodeList, - node_page::NodePage, + node_page::{NodePage, Player}, }, }; use jellycommon::{jellyobject::Object, *}; @@ -34,6 +34,9 @@ define! { @if let Some(nku) = view.get(VIEW_NODE_PAGE) { @NodePage { ri, nku } } + @if let Some(nku) = view.get(VIEW_PLAYER) { + @Player { ri, nku } + } @for nl in view.iter(VIEW_NODE_LIST) { @NodeList { ri, nl } } diff --git a/ui/src/components/node_page.rs b/ui/src/components/node_page.rs index 18b1d58..26ab7f9 100644 --- a/ui/src/components/node_page.rs +++ b/ui/src/components/node_page.rs @@ -119,7 +119,7 @@ markup::define! { table { @for (key, value) in idents.entries::<&str>() { tr { tr { - td { @tr(ri.lang, &format!("id.{key}")) } + td { @tr(ri.lang, &format!("tag.iden.{key}")) } @if let Some(url) = external_id_url(key, value) { td { a[href=url] { pre { @value } } } } else { @@ -162,6 +162,11 @@ markup::define! { // } // } } + + Player<'a>(ri: &'a RenderInfo<'a>, nku: Object<'a>) { + video[id="player"] {} + } + } fn chapter_key_time(c: Object, dur: f64) -> f64 { |