Add Gallery action beside Save and an icon-only refresh beside Play all
This commit is contained in:
@@ -7525,11 +7525,14 @@ async function renderP2pList() {
|
||||
duration: it.duration || 0, thumbnail: `https://i.ytimg.com/vi/${it.id}/mqdefault.jpg`,
|
||||
}));
|
||||
const refresh = document.createElement('button');
|
||||
refresh.textContent = '↻ Refresh';
|
||||
refresh.textContent = '↻';
|
||||
refresh.className = 'la-icon';
|
||||
refresh.title = 'Refresh';
|
||||
refresh.setAttribute('aria-label', 'Refresh');
|
||||
refresh.onclick = () => renderP2pList();
|
||||
const playAll = document.createElement('button');
|
||||
playAll.textContent = '▶ Play all';
|
||||
playAll.className = 'la-primary';
|
||||
playAll.className = 'la-primary la-inline';
|
||||
playAll.onclick = () => { if (list.length) playFromList(list, 0, 'p2p'); };
|
||||
els.listActions.append(playAll, refresh);
|
||||
if (!items.length) {
|
||||
@@ -7655,7 +7658,7 @@ async function renderSaved() {
|
||||
<div class="card-title"></div>
|
||||
<div class="card-channel saved-size">${isCustom ? '✂ edited · ' : ''}${fmtBytes(it.size)}</div>
|
||||
</div>
|
||||
<button class="card-act" data-act="export" title="Save to this device" aria-label="Save to this device">⤓</button>
|
||||
<button class="card-act" data-act="export" title="Save to gallery" aria-label="Save to gallery">⤓</button>
|
||||
<button class="card-del" title="Delete saved file">✕</button>`;
|
||||
row.querySelector('.card-title').textContent = v.title || it.id;
|
||||
row.addEventListener('click', (e) => {
|
||||
@@ -8578,7 +8581,7 @@ function openCardMenu(video) {
|
||||
const isCustom = !!video.custom;
|
||||
|
||||
const exportBtn = document.createElement('button');
|
||||
exportBtn.textContent = '⤓ Save to this device';
|
||||
exportBtn.textContent = '🖼 Save to gallery';
|
||||
exportBtn.title = 'Put the video file in your gallery, Files app or Downloads folder';
|
||||
exportBtn.onclick = () => { closeModal(); exportToDevice(video); };
|
||||
body.appendChild(exportBtn);
|
||||
|
||||
@@ -236,8 +236,8 @@
|
||||
<div class="np-actions">
|
||||
<button id="queueBtn" class="np-btn" title="Add to the temporary queue">+ Queue</button>
|
||||
<button id="saveBtn" class="np-btn" title="Save this video for offline playback">⬇ Save</button>
|
||||
<button id="exportBtn" class="np-btn" title="Put the video file in your gallery, Files app or Downloads folder">⤓ To device</button>
|
||||
<button id="editBtn" class="np-btn" title="Cut parts out and save a custom edited copy">✂ Edit & download</button>
|
||||
<button id="exportBtn" class="np-btn" title="Save this video to your gallery, Files app or Downloads folder — works while streaming too">🖼 Gallery</button>
|
||||
<button id="addPlaylistBtn" class="np-btn" title="Add to a playlist">+ Playlist</button>
|
||||
<button id="shareMomentBtn" class="np-btn" title="Share a link or GIF of this exact moment">🔗 Share moment</button>
|
||||
<button id="externalBtn" class="np-btn" title="Play this in VLC, MX Player or another app">📺 Open in…</button>
|
||||
|
||||
@@ -60,12 +60,12 @@
|
||||
}
|
||||
/* Secondary actions sit on a quiet second line, visually below the main three. */
|
||||
#listActions button.la-main + button:not(.la-main) { margin-left: 0; }
|
||||
#listActions button:not(.la-primary):not(.la-main) {
|
||||
#listActions button:not(.la-primary):not(.la-main):not(.la-icon) {
|
||||
background: transparent;
|
||||
color: var(--text-dim);
|
||||
font-weight: 600;
|
||||
}
|
||||
#listActions button:not(.la-primary):not(.la-main):hover { color: var(--text); background: var(--bg-2); }
|
||||
#listActions button:not(.la-primary):not(.la-main):not(.la-icon):hover { color: var(--text); background: var(--bg-2); }
|
||||
#listActions button.pinned { color: var(--accent-bright); border-color: var(--accent); background: transparent; }
|
||||
#listActions button.la-main { padding: 0 6px; font-size: 13px; }
|
||||
@media (min-width: 900px) {
|
||||
@@ -299,7 +299,7 @@
|
||||
#lyricsPane .lyr-auto { font-size: 11.5px; gap: 5px; padding: 0 4px; white-space: nowrap; }
|
||||
|
||||
/* ---- Round 2: uniform secondary buttons, deck tabs, borderless autoscroll, reports in the lyrics panel ---- */
|
||||
#listActions button:not(.la-primary):not(.la-main) {
|
||||
#listActions button:not(.la-primary):not(.la-main):not(.la-icon) {
|
||||
flex: 0 0 calc(50% - 4px);
|
||||
height: 40px;
|
||||
padding: 0 10px;
|
||||
@@ -310,9 +310,9 @@
|
||||
overflow: hidden; text-overflow: ellipsis;
|
||||
}
|
||||
@media (min-width: 900px) {
|
||||
#listActions button:not(.la-primary):not(.la-main) { flex: 0 0 auto; min-width: 124px; }
|
||||
#listActions button:not(.la-primary):not(.la-main):not(.la-icon) { flex: 0 0 auto; min-width: 124px; }
|
||||
}
|
||||
#nowPlayingMeta .np-actions .np-btn:not(#queueBtn):not(#saveBtn):not(#addPlaylistBtn) {
|
||||
#nowPlayingMeta .np-actions .np-btn:not(#queueBtn):not(#saveBtn):not(#exportBtn):not(#addPlaylistBtn) {
|
||||
flex: 0 0 calc(50% - 4px);
|
||||
height: 42px;
|
||||
padding: 0 10px;
|
||||
@@ -321,7 +321,7 @@
|
||||
overflow: hidden; text-overflow: ellipsis;
|
||||
}
|
||||
@media (min-width: 900px) {
|
||||
#nowPlayingMeta .np-actions .np-btn:not(#queueBtn):not(#saveBtn):not(#addPlaylistBtn) { flex: 0 0 auto; min-width: 140px; }
|
||||
#nowPlayingMeta .np-actions .np-btn:not(#queueBtn):not(#saveBtn):not(#exportBtn):not(#addPlaylistBtn) { flex: 0 0 auto; min-width: 140px; }
|
||||
}
|
||||
|
||||
/* Deck tabs */
|
||||
@@ -388,3 +388,37 @@
|
||||
@keyframes export-slide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
|
||||
.export-actions { display: grid; gap: 8px; }
|
||||
.export-actions .btn { height: 48px; width: 100%; }
|
||||
|
||||
/* Four everyday actions: Queue · Save · Gallery · Playlist, equal tiles */
|
||||
#nowPlayingMeta .np-actions #queueBtn,
|
||||
#nowPlayingMeta .np-actions #saveBtn,
|
||||
#nowPlayingMeta .np-actions #exportBtn,
|
||||
#nowPlayingMeta .np-actions #addPlaylistBtn {
|
||||
order: -1;
|
||||
flex: 1 1 calc(25% - 8px);
|
||||
min-width: 0;
|
||||
height: 52px;
|
||||
padding: 0 4px;
|
||||
justify-content: center;
|
||||
border-radius: 16px;
|
||||
color: var(--text);
|
||||
background: var(--bg-3);
|
||||
font-weight: 700;
|
||||
font-size: 12.5px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
@media (max-width: 380px) {
|
||||
#nowPlayingMeta .np-actions #queueBtn,
|
||||
#nowPlayingMeta .np-actions #saveBtn,
|
||||
#nowPlayingMeta .np-actions #exportBtn,
|
||||
#nowPlayingMeta .np-actions #addPlaylistBtn { flex-basis: calc(50% - 8px); }
|
||||
}
|
||||
|
||||
/* Icon-only refresh beside the primary action */
|
||||
#listActions button.la-primary.la-inline { flex: 1 1 0; min-width: 0; }
|
||||
#listActions button.la-icon {
|
||||
flex: 0 0 54px; width: 54px; height: 54px; padding: 0;
|
||||
border-radius: 18px; font-size: 22px; justify-content: center;
|
||||
border: 1px solid var(--line); background: var(--bg-3); color: var(--text);
|
||||
}
|
||||
@media (min-width: 900px) { #listActions button.la-icon { height: 44px; width: 44px; flex-basis: 44px; border-radius: 14px; } }
|
||||
|
||||
Reference in New Issue
Block a user