|
|
@ -19707,6 +19707,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
constructor() {
|
|
|
|
constructor() {
|
|
|
|
super(...arguments);
|
|
|
|
super(...arguments);
|
|
|
|
this.plexProtocol = 'http';
|
|
|
|
this.plexProtocol = 'http';
|
|
|
|
|
|
|
|
this.detailsShown = false;
|
|
|
|
this.columnsCount = 0;
|
|
|
|
this.columnsCount = 0;
|
|
|
|
this.renderedItems = 0;
|
|
|
|
this.renderedItems = 0;
|
|
|
|
this.maxRenderCount = false;
|
|
|
|
this.maxRenderCount = false;
|
|
|
@ -19729,8 +19730,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
this.renderNewElementsIfNeeded = () => {
|
|
|
|
this.renderNewElementsIfNeeded = () => {
|
|
|
|
const loadAdditionalRowsCount = 2; // todo: make this configurable
|
|
|
|
const loadAdditionalRowsCount = 2; // todo: make this configurable
|
|
|
|
const height = getHeight(this.content);
|
|
|
|
const height = getHeight(this.content);
|
|
|
|
if (this.detailElem &&
|
|
|
|
if (!this.detailsShown &&
|
|
|
|
(this.detailElem.style.visibility === 'hidden' || this.detailElem.style.visibility === '') &&
|
|
|
|
|
|
|
|
window.innerHeight + window.scrollY > height + getOffset(this.content).top - 300 &&
|
|
|
|
window.innerHeight + window.scrollY > height + getOffset(this.content).top - 300 &&
|
|
|
|
this.renderedItems > 0) {
|
|
|
|
this.renderedItems > 0) {
|
|
|
|
this.maxRenderCount = this.renderedItems - 1 + this.columnsCount * (loadAdditionalRowsCount * 2);
|
|
|
|
this.maxRenderCount = this.renderedItems - 1 + this.columnsCount * (loadAdditionalRowsCount * 2);
|
|
|
@ -19995,6 +19995,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.minimizeAll = () => {
|
|
|
|
this.minimizeAll = () => {
|
|
|
|
|
|
|
|
this.detailsShown = false;
|
|
|
|
if (this.activeMovieElem) {
|
|
|
|
if (this.activeMovieElem) {
|
|
|
|
this.activeMovieElem.style.display = `block`;
|
|
|
|
this.activeMovieElem.style.display = `block`;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -20079,9 +20080,13 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
this.detailElem.style.zIndex = '0';
|
|
|
|
this.detailElem.style.zIndex = '0';
|
|
|
|
this.detailElem.style.visibility = 'hidden';
|
|
|
|
this.detailElem.style.visibility = 'hidden';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
clearTimeout(this.renderNewElementsIfNeededTimeout);
|
|
|
|
|
|
|
|
this.renderNewElementsIfNeededTimeout = setTimeout(() => {
|
|
|
|
this.renderNewElementsIfNeeded();
|
|
|
|
this.renderNewElementsIfNeeded();
|
|
|
|
|
|
|
|
}, 1000);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.showDetails = async (data) => {
|
|
|
|
this.showDetails = async (data) => {
|
|
|
|
|
|
|
|
this.detailsShown = true;
|
|
|
|
const top = this.getTop();
|
|
|
|
const top = this.getTop();
|
|
|
|
if (this.detailElem) {
|
|
|
|
if (this.detailElem) {
|
|
|
|
this.detailElem.style.transition = '0s';
|
|
|
|
this.detailElem.style.transition = '0s';
|
|
|
@ -20361,7 +20366,6 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
const top = this.getTop();
|
|
|
|
const top = this.getTop();
|
|
|
|
this.minimizeAll();
|
|
|
|
|
|
|
|
this.showDetails(this.activeMovieElemData);
|
|
|
|
this.showDetails(this.activeMovieElemData);
|
|
|
|
this.showBackground();
|
|
|
|
this.showBackground();
|
|
|
|
movieElemLocal.style.width = `${CSS_STYLE.expandedWidth}px`;
|
|
|
|
movieElemLocal.style.width = `${CSS_STYLE.expandedWidth}px`;
|
|
|
|