diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 190ccb160..c4bec26ee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,6 +36,11 @@ jobs: cp /tmp/lokalise/locale/* custom_components/hacs/.translations/ + # Build Frontend + - name: Build the HACS frontend + run: npm run build + + # Pack the HACS dir as a zip and upload to the release - name: ZIP HACS Dir run: "zip hacs.zip -r custom_components/hacs" diff --git a/.github/workflows/test_with_home_assistant.yml b/.github/workflows/test_with_home_assistant.yml index d9c793f6a..a312c60f6 100644 --- a/.github/workflows/test_with_home_assistant.yml +++ b/.github/workflows/test_with_home_assistant.yml @@ -1,4 +1,4 @@ -name: Test with Home Assistant +name: Test on: pull_request: @@ -9,8 +9,8 @@ on: - master jobs: - test: - name: Testing with (Python, HA) + test_with_home_assistant: + name: Test with Home Assistant (Python, HA) runs-on: ubuntu-latest strategy: max-parallel: 6 @@ -66,3 +66,12 @@ jobs: cat configuration.yaml echo "" hass --script check_config --config . + + + test_frontend_build: + name: Test frontend build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Build the HACS frontend + run: npm run build \ No newline at end of file diff --git a/custom_components/hacs/frontend/experimental/main.js.gz b/custom_components/hacs/frontend/experimental/main.js.gz index 627cf0246..6e45fe3b8 100644 Binary files a/custom_components/hacs/frontend/experimental/main.js.gz and b/custom_components/hacs/frontend/experimental/main.js.gz differ diff --git a/src/main.ts b/src/main.ts index 72c1c2fd8..0cfbf0211 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,8 @@ /* eslint-disable no-console, no-undef, prefer-destructuring, prefer-destructuring, no-constant-condition, max-len */ import { HomeAssistant } from "custom-card-helpers"; -import { css, CSSResultArray, customElement, html, LitElement, property, TemplateResult } from "lit-element"; +import { + css, CSSResultArray, customElement, html, LitElement, property, TemplateResult +} from "lit-element"; import { load_lovelace } from "./misc/LoadLovelace"; import { navigate } from "./misc/navigate"; import scrollToTarget from "./misc/ScrollToTarget"; @@ -79,11 +81,12 @@ class HacsFrontendBase extends LitElement { // Event subscription this.hass.connection.sendMessagePromise( - { type: "hacs/repository" }); + { type: "hacs/repository" } + ); this.hass.connection.subscribeEvents( - () => this.getRepositories(), "hacs/repository") - + () => this.getRepositories(), "hacs/repository" + ); } @@ -130,17 +133,17 @@ class HacsFrontendBase extends LitElement { ${(this.configuration.appdaemon - ? html` + ? html` ${this.hass.localize(`component.hacs.common.appdaemon_apps`)} ` : "")} ${(this.configuration.python_script - ? html` + ? html` ${this.hass.localize(`component.hacs.common.python_scripts`)} ` : "")} ${(this.configuration.theme - ? html` + ? html` ${this.hass.localize(`component.hacs.common.themes`)} ` : "")} diff --git a/src/misc/CustomRepositories.ts b/src/misc/CustomRepositories.ts index 34753b599..5c87e6c49 100644 --- a/src/misc/CustomRepositories.ts +++ b/src/misc/CustomRepositories.ts @@ -23,7 +23,6 @@ export class CustomRepositories extends LitElement { public SaveSpinner?: boolean; Delete(ev) { - console.log(ev.composedPath()[3].innerText) if (!window.confirm(this.hass.localize("component.hacs.confirm.delete", "item", ev.composedPath()[3].innerText))) return; this.hass.connection.sendMessagePromise({ type: "hacs/repository",