- `:M`
+ `:O`
{for(;!window.browser_mod;)await new Promise((e=>setTimeout(e,1e3)));await window.browser_mod.connectionPromise,customElements.get("popup-card-editor")||(customElements.define("popup-card-editor",Oe),window.customCards=window.customCards||[],window.customCards.push({type:"popup-card",name:"Popup card",preview:!1,description:"Replace the more-info dialog for a given entity in the view that includes this card. (Browser Mod)"}))})();class Me extends Q{constructor(){super(),this.popup=this.popup.bind(this)}static getConfigElement(){return document.createElement("popup-card-editor")}static getStubConfig(e,t){return{entity:t[0],title:"Custom popup",dismissable:!0,card:{type:"markdown",content:"This replaces the more-info dialog"}}}setConfig(e){this._config=e,(async()=>{const t=await window.loadCardHelpers();this._element=await t.createCardElement(e.card),this._element.hass=this.hass})()}async connectedCallback(){super.connectedCallback(),window.addEventListener("hass-more-info",this.popup),"hui-card-preview"===this.parentElement.localName?(this.editMode=!0,this.removeAttribute("hidden")):this.setAttribute("hidden","")}async disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("hass-more-info",this.popup)}popup(e){var t,i,s;if((null===(t=e.detail)||void 0===t?void 0:t.entityId)===this._config.entity&&!(null===(i=e.detail)||void 0===i?void 0:i.ignore_popup_card)){e.stopPropagation(),e.preventDefault();delete Object.assign({},this._config).card,null===(s=window.browser_mod)||void 0===s||s.service("popup",Object.assign({content:this._config.card},this._config)),setTimeout((()=>this.dispatchEvent(new CustomEvent("hass-more-info",{bubbles:!0,composed:!0,cancelable:!1,detail:{entityId:"."}}))),50)}}updated(e){super.updated(e),e.has("hass")&&this._element&&(this._element.hass=this.hass)}render(){return this.editMode?M`
+ `}}e([te()],Me.prototype,"_config",void 0),e([ee()],Me.prototype,"lovelace",void 0),e([ee()],Me.prototype,"hass",void 0),e([te()],Me.prototype,"_selectedTab",void 0),e([te()],Me.prototype,"_cardGUIMode",void 0),e([te()],Me.prototype,"_cardGUIModeAvailable",void 0),e([ie("hui-card-element-editor")],Me.prototype,"_cardEditorEl",void 0),(async()=>{for(;!window.browser_mod;)await new Promise((e=>setTimeout(e,1e3)));await window.browser_mod.connectionPromise,customElements.get("popup-card-editor")||(customElements.define("popup-card-editor",Me),window.customCards=window.customCards||[],window.customCards.push({type:"popup-card",name:"Popup card",preview:!1,description:"Replace the more-info dialog for a given entity in the view that includes this card. (Browser Mod)"}))})();class Oe extends Q{constructor(){super(),this.popup=this.popup.bind(this)}static getConfigElement(){return document.createElement("popup-card-editor")}static getStubConfig(e,t){return{entity:t[0],title:"Custom popup",dismissable:!0,card:{type:"markdown",content:"This replaces the more-info dialog"}}}setConfig(e){this._config=e,(async()=>{const t=await window.loadCardHelpers();this._element=await t.createCardElement(e.card),this._element.hass=this.hass})()}async connectedCallback(){super.connectedCallback(),window.addEventListener("hass-more-info",this.popup),"hui-card-preview"===this.parentElement.localName?(this.editMode=!0,this.removeAttribute("hidden")):this.setAttribute("hidden","")}async disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("hass-more-info",this.popup)}popup(e){var t,i,s;if((null===(t=e.detail)||void 0===t?void 0:t.entityId)===this._config.entity&&!(null===(i=e.detail)||void 0===i?void 0:i.ignore_popup_card)){e.stopPropagation(),e.preventDefault();delete Object.assign({},this._config).card,null===(s=window.browser_mod)||void 0===s||s.service("popup",Object.assign({content:this._config.card},this._config)),setTimeout((()=>this.dispatchEvent(new CustomEvent("hass-more-info",{bubbles:!0,composed:!0,cancelable:!1,detail:{entityId:"."}}))),50)}}updated(e){super.updated(e),e.has("hass")&&this._element&&(this._element.hass=this.hass)}render(){return this.editMode?O`
diff --git a/js/plugin/main.ts b/js/plugin/main.ts
index 6e6eba8..a3b8429 100644
--- a/js/plugin/main.ts
+++ b/js/plugin/main.ts
@@ -16,65 +16,6 @@ import "./popup-card";
import { AutoSettingsMixin } from "./frontend-settings";
import { BrowserIDMixin } from "./browserID";
-/*
- TODO:
- - More pictures for documentation
- x Fix nomenclature
- x Command -> Service
- x Device -> Browser
- - Popups
- X Basic popups
- x Styling
- X Timeout
- X Fullscreen
- x Popup-card
- x Auto-close
- x Forms that are forwarded to service calls
- x Motion/occupancy tracker
- x Information about interaction requirement
- x Information about fullykiosk
- - Commands
- x Change targets from the frontend
- x Send browser ID to the backend in service calls?
- x Rename browser_mod commands to browser_mod services
- x Framework
- x ll-custom handling
- - Commands
- x popup
- x close_popup
- x more-info
- x navigate
- o lovelace-reload?
- o Not needed
- x window-reload
- o screensaver ?
- o Refer to automations instead
- x sequence
- x delay
- x javascript eval
- o toast?
- o Replaced with popups with timeout
- x Redesign services to target devices
- x frontend editor for popup cards
- o also screensavers
- x Saved frontend settings
- X Framework
- x Save sidebar
- x Kiosk mode
- x Default dashboard
- o Screensaver?
- x Favicon templates
- x Title templates
- - Tweaks
- - Quickbar tweaks (ctrl+enter)?
- x Card-mod preload
- x Video player
- x Media_seek
- o Screensavers
- x IMPORTANT: FIX DEFAULT HIDING OF ENTITIES
- o NOFIX. Home Assistant bug
- X Check functionality with CAST - may need to add frontend part as a lovelace resource
- */
export class BrowserMod extends ServicesMixin(
PopupMixin(
ActivityMixin(
diff --git a/package.json b/package.json
index d8e97cd..b9be7f3 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "browser_mod",
"private": true,
- "version": "2.1.0",
+ "version": "2.1.1",
"description": "",
"scripts": {
"build": "rollup -c",