Skip to content

Commit

Permalink
Update validate.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
KTibow authored and github-actions[bot] committed Nov 3, 2020
1 parent 172349d commit e989a06
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
path: |
~/.cache/pip
key: custom-component-ci
- uses: hacs/integration/action@main
- uses: hacs/action@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CATEGORY: integration
CATEGORY: plugin
- uses: KTibow/ha-blueprint@stable
name: CI
with:
Expand Down
19 changes: 13 additions & 6 deletions fullscreen-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ class FullscreenCard extends HTMLElement {
this.atag.style.textAlign = "center";
this.atag.style.borderRadius = "var(--ha-card-border-radius, 4px)";
this.atag.style.cursor = "pointer";
this.atag.onclick = function() {
this.atag.onclick = function () {
if (this.fullscreen) {
document.exitFullscreen();
this.atag.innerHTML = config["go_fullscreen"] || (config["go_fullscreen"] = "Go fullscreen");
this.atag.innerHTML =
config["go_fullscreen"] ||
(config["go_fullscreen"] = "Go fullscreen");
} else {
document.documentElement.requestFullscreen();
this.atag.innerHTML = config["exit_fullscreen"] || (config["exit_fullscreen"] = "Exit fullscreen");
this.atag.innerHTML =
config["exit_fullscreen"] ||
(config["exit_fullscreen"] = "Exit fullscreen");
}
this.fullscreen = !this.fullscreen;
}.bind(this);
Expand All @@ -40,9 +44,12 @@ class FullscreenCard extends HTMLElement {
}

customElements.define("fullscreen-card", FullscreenCard);
window.customCards.push({type: "fullscreen-card", name: "Fullscreen card",
preview: true,
description: "Card to go fullscreen."});
window.customCards.push({
type: "fullscreen-card",
name: "Fullscreen card",
preview: true,
description: "Card to go fullscreen.",
});
document.body.onkeydown = (event) => {
if (event.key == "F11") {
event.preventDefault();
Expand Down

0 comments on commit e989a06

Please sign in to comment.