Add: Progress indicator

pull/16/head
Juraj Nyíri 4 years ago
parent 87130c0c6e
commit 40b6059453

@ -19594,6 +19594,12 @@ style.textContent = css `
white-space: nowrap;
overflow: hidden;
}
.viewProgress {
background: #e5a00d;
height: 3px;
bottom: 0;
position: absolute;
}
.toViewEpisode {
position: relative;
height: 28px;
@ -20774,6 +20780,12 @@ class PlexMeetsHomeAssistant extends HTMLElement {
toViewElem.innerHTML = (data.leafCount - data.viewedLeafCount).toString();
interactiveArea.appendChild(toViewElem);
}
if (data.viewOffset > 0 && data.duration > 0) {
const toViewElem = document.createElement('div');
toViewElem.className = 'viewProgress';
toViewElem.style.width = `${(data.viewOffset / data.duration) * 100}%`;
interactiveArea.appendChild(toViewElem);
}
interactiveArea.className = 'interactiveArea';
if (this.playController && this.playController.isPlaySupported(data)) {
interactiveArea.append(playButton);

@ -188,6 +188,12 @@ style.textContent = css`
white-space: nowrap;
overflow: hidden;
}
.viewProgress {
background: #e5a00d;
height: 3px;
bottom: 0;
position: absolute;
}
.toViewEpisode {
position: relative;
height: 28px;

@ -1171,6 +1171,13 @@ class PlexMeetsHomeAssistant extends HTMLElement {
interactiveArea.appendChild(toViewElem);
}
if (data.viewOffset > 0 && data.duration > 0) {
const toViewElem = document.createElement('div');
toViewElem.className = 'viewProgress';
toViewElem.style.width = `${(data.viewOffset / data.duration) * 100}%`;
interactiveArea.appendChild(toViewElem);
}
interactiveArea.className = 'interactiveArea';
if (this.playController && this.playController.isPlaySupported(data)) {
interactiveArea.append(playButton);

Loading…
Cancel
Save