diff --git a/crates/in-web/src/dropdown.rs b/crates/in-web/src/dropdown.rs index 7b9f698..7bcb339 100644 --- a/crates/in-web/src/dropdown.rs +++ b/crates/in-web/src/dropdown.rs @@ -187,16 +187,15 @@ pub async fn dropdown_script(cx: &Cx) -> Result { window.__inAdded(trigger);\ select.parentNode.insertBefore(trigger, select);\ window.__inOwn(select, ['dd-native'], []);\ - /* The form's own submit only serves the no-script path; once \ - the select is enhanced it duplicates the autosubmit, so it \ - bows out — directly, not via a stylesheet the skin or a \ - morph might out-race. */ \ - var go = null; \ + /* The form's own submit only serves the no-script path of an \ + autosubmit select; once that select is enhanced it bows out. \ + A select without autosubmit still needs its button — hiding \ + it then strands the form with no way to post at all. */ \ var sibs = select.parentNode.children; \ for (var si = 0; si < sibs.length; si++) { \ if (sibs[si].tagName === 'BUTTON' && sibs[si].type === 'submit' && !sibs[si].classList.contains('dd-trigger')) { go = sibs[si]; break; } \ } \ - if (go) { window.__inOwn(go, [], ['style']); go.style.display = 'none'; } \ + if (go && select.hasAttribute('data-autosubmit')) { window.__inOwn(go, [], ['style']); go.style.display = 'none'; } \ var panel = document.createElement('div');\ panel.className = 'dd-panel';\ panel.setAttribute('role', 'listbox');\ diff --git a/crates/in-web/src/files.rs b/crates/in-web/src/files.rs index aa4fd60..ddda023 100644 --- a/crates/in-web/src/files.rs +++ b/crates/in-web/src/files.rs @@ -484,7 +484,7 @@ async fn view_file(cx: &Cx) -> Result { (t(language, Key::BackToDrive))
if may_download { - (t(language, Key::Download)) + (t(language, Key::Download)) }

(entry_chip(cx, &file).await?) (file.name.clone())

@@ -495,8 +495,33 @@ async fn view_file(cx: &Cx) -> Result { if matches!(viewer_kind(&file.mime), Some(ViewerKind::Image | ViewerKind::Video | ViewerKind::Audio)) || may_download { match viewer_kind(&file.mime) { Some(ViewerKind::Image) => (file.name.clone()), - Some(ViewerKind::Video) => , - Some(ViewerKind::Audio) =>
, + Some(ViewerKind::Video) =>
+ +
+ + "0:00" + + "0:00" + +
+
, + Some(ViewerKind::Audio) =>
+ + "0:00" + + "0:00" + +
, Some(ViewerKind::Pdf) =>

(t(language, Key::PreviewUnavailable))

, @@ -531,16 +556,81 @@ async fn view_file(cx: &Cx) -> Result { + (media_player_script(cx).await?) (viewer_guard_script(cx).await?) } } -/// The preview's save-path cleanup: the media elements already carry no -/// download affordance (`controlslist="nodownload"`, `draggable="false"`), -/// and this drops the context menu over the stage, so "save as" never -/// opens on a preview. A page's bytes on the wire can always be captured — -/// this keeps the surface from offering it, which is what a view-only -/// grant promises. +/// The house media player: play toggle, clock, seek bar — and a fullscreen +/// button on video — over a controls-less `