From 88f878b8ebab768e0a7890b5c80ee0e320109301 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 1 Oct 2026 20:55:04 +0000 Subject: [PATCH] Move rarely used video actions into a More actions sheet --- frontend/app.js | 32 ++++++++++++++++++++++++++++++++ frontend/index.html | 11 +++++++---- frontend/refresh.css | 25 +++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 4 deletions(-) diff --git a/frontend/app.js b/frontend/app.js index e200c1d..5319dfa 100755 --- a/frontend/app.js +++ b/frontend/app.js @@ -2525,6 +2525,37 @@ async function offerPeerDownload(videoObj) { els.playerPane.appendChild(btn); } + +// "More actions" sheet: the everyday four stay on the page, the rest live here. +// Each row drives the original (hidden) button, so handlers and the hidden / +// disabled state those buttons already manage keep working. +function openMoreActions() { + const defs = [ + ['editBtn', '✂', 'Edit and download', 'Trim a clip, adjust quality and export'], + ['shareMomentBtn', '🔗', 'Share moment', 'Link, GIF or soundbite of this exact second'], + ['externalBtn', '📺', 'Open in…', 'VLC, MX Player or another app'], + ['brokenBtn', '⚠', 'Report broken video', 'Won’t play, out of sync or glitchy — re-download it', true], + ]; + const list = document.createElement('div'); + list.className = 'more-list'; + for (const [id, icon, title, sub, danger] of defs) { + const src = $(id); + if (!src || src.hidden) continue; + const row = document.createElement('button'); + row.type = 'button'; + row.className = 'more-row' + (danger ? ' danger' : ''); + row.disabled = !!src.disabled; + row.innerHTML = '›'; + row.querySelector('.more-ico').textContent = icon; + row.querySelector('b').textContent = title; + row.querySelector('small').textContent = sub; + row.onclick = () => { closeModal(); setTimeout(() => src.click(), 0); }; + list.appendChild(row); + } + if (!list.children.length) { toast('No more actions for this video'); return; } + showModal('More actions', list, [{ label: 'Close', onClick: closeModal }]); +} + // Reflect cache state on the now-playing Save button. function updateNowPlayingActions() { if (!current || !current.meta) return; @@ -9350,6 +9381,7 @@ document.querySelectorAll('.chip').forEach((c) => { await preload(current.meta); } }); + if ($('moreBtn')) $('moreBtn').addEventListener('click', openMoreActions); if ($('exportBtn')) $('exportBtn').addEventListener('click', () => { if (current && current.meta) exportToDevice(current.meta); }); els.addPlaylistBtn.addEventListener('click', () => { if (current && current.meta) openCardMenu(current.meta); diff --git a/frontend/index.html b/frontend/index.html index d02674d..7821ef8 100755 --- a/frontend/index.html +++ b/frontend/index.html @@ -236,12 +236,15 @@
- - - - + +
diff --git a/frontend/refresh.css b/frontend/refresh.css index 085a065..e1a042e 100644 --- a/frontend/refresh.css +++ b/frontend/refresh.css @@ -422,3 +422,28 @@ border: 1px solid var(--line); background: var(--bg-3); color: var(--text); } @media (min-width: 900px) { #listActions button.la-icon { height: 44px; flex-basis: 44px; width: 44px; border-radius: 14px; } } + +/* ---- More actions ---- */ +#nowPlayingMeta .np-actions .np-more-host { display: none; } +#nowPlayingMeta .np-actions .np-more { + order: 5; flex: 1 1 100%; min-height: 54px; padding: 8px 16px; + display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; + border-radius: 16px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; text-align: left; +} +.np-more span { font: 700 14px var(--ui); } +.np-more small { font: 400 12px var(--ui); color: var(--text-dim); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.np-more:hover { border-color: var(--accent); } +.more-list { display: grid; gap: 8px; min-width: min(420px, 80vw); } +.more-row { + display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; text-align: left; + border-radius: 14px; border: 1px solid var(--line); background: var(--bg-3); color: var(--text); cursor: pointer; +} +.more-row:hover { border-color: var(--accent); } +.more-row[disabled] { opacity: 0.5; pointer-events: none; } +.more-ico { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-1); font-size: 19px; } +.more-txt { flex: 1; min-width: 0; display: grid; gap: 2px; } +.more-txt b { font: 700 14px var(--ui); } +.more-txt small { font: 400 12px/1.3 var(--ui); color: var(--text-dim); } +.more-go { color: var(--text-dim); font-size: 22px; } +.more-row.danger b { color: #ff8a80; } +.more-row.danger .more-ico { background: rgba(255, 75, 50, 0.16); }