From f00f8a33195b10cf51228a91936002f1412c7126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sun, 6 Sep 2026 00:59:16 +0300 Subject: [PATCH] feat(ui): volume and speed on the house player, title chip alignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The controls bar both players share (one helper, wired by class) gains a mute toggle with the house speaker glyph, a level slider wearing the seek bar's styling, and a speed cycle — 0.5/0.75/1/1.25/1.5/2, the label reads the current rate. Fullscreen stays video-only. The audio bar widens to hold the new controls without crowding the seek. The viewer title was a plain block: the 24px chip (thumb or mime glyph) hung off the text baseline beside an 18px name. It is a centered flex row now — the share and move modal titles already were. --- crates/in-web/src/files.rs | 75 +++++++++++++++++++++++++++----------- crates/in-web/src/i18n.rs | 12 ++++++ style/main.scss | 49 +++++++++++++++++++++---- 3 files changed, 106 insertions(+), 30 deletions(-) diff --git a/crates/in-web/src/files.rs b/crates/in-web/src/files.rs index ddda023..6aa57af 100644 --- a/crates/in-web/src/files.rs +++ b/crates/in-web/src/files.rs @@ -497,29 +497,10 @@ async fn view_file(cx: &Cx) -> Result { Some(ViewerKind::Image) => (file.name.clone()), Some(ViewerKind::Video) =>
-
- - "0:00" - - "0:00" - -
+
(media_controls(cx, language, file.name.clone(), true).await?)
, Some(ViewerKind::Audio) =>
- - "0:00" - - "0:00" + (media_controls(cx, language, file.name.clone(), false).await?)
, Some(ViewerKind::Pdf) => @@ -561,6 +542,35 @@ async fn view_file(cx: &Cx) -> Result { } } +/// The one controls bar both media players draw: play toggle, clock, seek, +/// volume (mute + level), a speed cycle, and fullscreen on video. The script +/// below wires it by class, so the bar stays markup-only. +async fn media_controls(cx: &Cx, language: crate::i18n::Lang, name: String, video: bool) -> Result { + view! { + cx => + + "0:00" + + "0:00" + + + + if video { + + } + } +} + /// The house media player: play toggle, clock, seek bar — and a fullscreen /// button on video — over a controls-less `