Update: Move display type under View Configuration

pull/51/head
Juraj Nyíri 3 years ago
parent ddea994d32
commit 08ef9a3066

@ -20472,14 +20472,6 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
const warningLibrary = document.createElement('div'); const warningLibrary = document.createElement('div');
warningLibrary.style.color = 'red'; warningLibrary.style.color = 'red';
this.content.appendChild(this.libraryName); this.content.appendChild(this.libraryName);
this.displayType.innerHTML = '';
const typeItems = document.createElement('paper-listbox');
typeItems.slot = 'dropdown-content';
this.displayType.label = 'Display Type (Optional)';
this.displayType.appendChild(typeItems);
this.displayType.style.width = '100%';
this.displayType.addEventListener('value-changed', this.valueUpdated);
this.content.appendChild(this.displayType);
this.content.appendChild(warningLibrary); this.content.appendChild(warningLibrary);
this.appendChild(this.content); this.appendChild(this.content);
this.plex = new Plex(this.config.ip.replace(/^https?\:\/\//i, '').replace(/\/$/, ''), this.plexPort, this.config.token, this.plexProtocol, this.config.sort); this.plex = new Plex(this.config.ip.replace(/^https?\:\/\//i, '').replace(/\/$/, ''), this.plexPort, this.config.token, this.plexProtocol, this.config.sort);
@ -20572,6 +20564,14 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
viewTitle.style.marginBottom = '0px'; viewTitle.style.marginBottom = '0px';
viewTitle.style.marginTop = '20px'; viewTitle.style.marginTop = '20px';
this.plexValidSection.appendChild(viewTitle); this.plexValidSection.appendChild(viewTitle);
this.displayType.innerHTML = '';
const typeItems = document.createElement('paper-listbox');
typeItems.slot = 'dropdown-content';
this.displayType.label = 'Display Type (Optional)';
this.displayType.appendChild(typeItems);
this.displayType.style.width = '100%';
this.displayType.addEventListener('value-changed', this.valueUpdated);
this.plexValidSection.appendChild(this.displayType);
this.cardTitle.label = 'Card title (Optional)'; this.cardTitle.label = 'Card title (Optional)';
this.cardTitle.value = this.config.title; this.cardTitle.value = this.config.title;
this.cardTitle.addEventListener('change', this.valueUpdated); this.cardTitle.addEventListener('change', this.valueUpdated);

@ -405,15 +405,6 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
warningLibrary.style.color = 'red'; warningLibrary.style.color = 'red';
this.content.appendChild(this.libraryName); this.content.appendChild(this.libraryName);
this.displayType.innerHTML = '';
const typeItems: any = document.createElement('paper-listbox');
typeItems.slot = 'dropdown-content';
this.displayType.label = 'Display Type (Optional)';
this.displayType.appendChild(typeItems);
this.displayType.style.width = '100%';
this.displayType.addEventListener('value-changed', this.valueUpdated);
this.content.appendChild(this.displayType);
this.content.appendChild(warningLibrary); this.content.appendChild(warningLibrary);
this.appendChild(this.content); this.appendChild(this.content);
@ -518,6 +509,15 @@ class PlexMeetsHomeAssistantEditor extends HTMLElement {
viewTitle.style.marginTop = '20px'; viewTitle.style.marginTop = '20px';
this.plexValidSection.appendChild(viewTitle); this.plexValidSection.appendChild(viewTitle);
this.displayType.innerHTML = '';
const typeItems: any = document.createElement('paper-listbox');
typeItems.slot = 'dropdown-content';
this.displayType.label = 'Display Type (Optional)';
this.displayType.appendChild(typeItems);
this.displayType.style.width = '100%';
this.displayType.addEventListener('value-changed', this.valueUpdated);
this.plexValidSection.appendChild(this.displayType);
this.cardTitle.label = 'Card title (Optional)'; this.cardTitle.label = 'Card title (Optional)';
this.cardTitle.value = this.config.title; this.cardTitle.value = this.config.title;
this.cardTitle.addEventListener('change', this.valueUpdated); this.cardTitle.addEventListener('change', this.valueUpdated);

Loading…
Cancel
Save