-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9848d6a
commit f94d046
Showing
5 changed files
with
51 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,30 @@ | ||
import { LitElement, html, css } from "card-tools/src/lit-element"; | ||
import { registerCard } from "card-tools/src/editor"; | ||
|
||
class BrowserPlayerEditor extends LitElement { | ||
setConfig(config) { | ||
const bases = [customElements.whenDefined('home-assistant-main'), customElements.whenDefined('hui-view')]; | ||
Promise.race(bases).then(() => { | ||
|
||
} | ||
render() { | ||
return html` | ||
<div> | ||
Nothing to configure. | ||
</div> | ||
`; | ||
} | ||
} | ||
const LitElement = customElements.get('home-assistant-main') | ||
? Object.getPrototypeOf(customElements.get('home-assistant-main')) | ||
: Object.getPrototypeOf(customElements.get('hui-view')); | ||
const html = LitElement.prototype.html; | ||
const css = LitElement.prototype.css; | ||
|
||
if(!customElements.get("browser-player-editor")) { | ||
customElements.define("browser-player-editor", BrowserPlayerEditor); | ||
window.customCards = window.customCards || []; | ||
window.customCards.push({type:"browser-player", name: "Browser Player", preview: true}); | ||
} | ||
class BrowserPlayerEditor extends LitElement { | ||
setConfig(config) { | ||
|
||
} | ||
render() { | ||
return html` | ||
<div> | ||
Nothing to configure. | ||
</div> | ||
`; | ||
} | ||
} | ||
|
||
if(!customElements.get("browser-player-editor")) { | ||
customElements.define("browser-player-editor", BrowserPlayerEditor); | ||
window.customCards = window.customCards || []; | ||
window.customCards.push({type:"browser-player", name: "Browser Player", preview: true}); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters