Remove play icon from chapter drag handle

Updated the CustomChaptersOverlay component to always display the chapter index in the drag handle, removing the conditional play icon ('▶') for the active chapter. This simplifies the UI and ensures consistent labeling of chapter handles.
This commit is contained in:
Yiannis Christodoulou 2025-10-13 01:18:21 +03:00
parent cf1b84d538
commit 13ac69bd50

View File

@ -211,7 +211,7 @@ class CustomChaptersOverlay extends Component {
const drag = document.createElement('div');
drag.className = 'playlist-drag-handle';
drag.textContent = index === 0 ? '▶' : String(index + 1);
drag.textContent = String(index + 1);
const meta = document.createElement('div');
meta.className = 'thumbnail-meta';
@ -411,12 +411,10 @@ class CustomChaptersOverlay extends Component {
if (isPlaying) {
currentChapterIndex = index;
item.classList.add('selected');
if (handle) handle.textContent = '▶';
if (dynamic)
dynamic.textContent = dynamic.getAttribute('data-time-range') || this.getChapterTimeRange(chapter);
} else {
item.classList.remove('selected');
if (handle) handle.textContent = String(index + 1);
if (dynamic)
dynamic.textContent = dynamic.getAttribute('data-time-range') || this.getChapterTimeRange(chapter);
}
@ -431,15 +429,12 @@ class CustomChaptersOverlay extends Component {
updateActiveItem(activeIndex) {
const items = this.chaptersList.querySelectorAll('.playlist-items');
items.forEach((el, idx) => {
const handle = el.querySelector('.playlist-drag-handle');
const dynamic = el.querySelector('.meta-dynamic');
if (idx === activeIndex) {
el.classList.add('selected');
if (handle) handle.textContent = '▶';
if (dynamic) dynamic.textContent = dynamic.getAttribute('data-duration') || '';
} else {
el.classList.remove('selected');
if (handle) handle.textContent = String(idx + 1);
if (dynamic) {
const timeRange = dynamic.getAttribute('data-time-range');
if (timeRange) {