diff options
Diffstat (limited to 'server/src/routes/ui/player.rs')
-rw-r--r-- | server/src/routes/ui/player.rs | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/server/src/routes/ui/player.rs b/server/src/routes/ui/player.rs index aaed5ee..c7c7d51 100644 --- a/server/src/routes/ui/player.rs +++ b/server/src/routes/ui/player.rs @@ -60,36 +60,38 @@ pub fn player_conf<'a>(item: Arc<Item>) -> MyResult<HtmlTemplate<markup::DynRend Ok(HtmlTemplate( "Configure Player".to_string(), markup::new! { - h2 { "Watch: " @item.info.title } - form[method = "GET", action = ""] { - h3 { "Select tracks" } + form.playerconf[method = "GET", action = ""] { + h2 { "Select tracks for " @item.info.title } - label[for="select-v"] { "Video: " } - select[name="v", id="select-v"] { + fieldset.video { + legend { "Video" } @for (tid, track) in &video_tracks { - option[value=tid] { @format!("{track}") } + input[type="radio", id=tid, name="v", value=tid]; + label[for=tid] { @format!("{track}") } br; } - option[value=""] { "Disable" } + input[type="radio", id="v-none", name="v", value=""]; + label[for="v-none"] { "No video" } } - br; - label[for="select-a"] { "Audio: " } - select[name="a", id="select-a"] { + fieldset.audio { + legend { "Audio" } @for (tid, track) in &audio_tracks { - option[value=tid] { @format!("{track}") } + input[type="radio", id=tid, name="a", value=tid]; + label[for=tid] { @format!("{track}") } br; } - option[value=""] { "Disable" } + input[type="radio", id="a-none", name="a", value=""]; + label[for="a-none"] { "No audio" } } - br; - label[for="select-s"] { "Subtitles: " } - select[name="s", id="select-s"] { - option[value="", selected] { "None" } + fieldset.subtitles { + legend { "Subtitles" } @for (tid, track) in &sub_tracks { - option[value=tid] { @format!("{track}") } + input[type="radio", id=tid, name="s", value=tid]; + label[for=tid] { @format!("{track}") } br; } + input[type="radio", id="s-none", name="s", value=""]; + label[for="s-none"] { "No subtitles" } } - br; input[type="submit", value="Start playback"]; } |