mirror of
https://github.com/hacs/integration.git
synced 2025-08-20 16:14:55 +00:00
Adds build steps
This commit is contained in:
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@ -36,6 +36,11 @@ jobs:
|
|||||||
cp /tmp/lokalise/locale/* custom_components/hacs/.translations/
|
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
|
# Pack the HACS dir as a zip and upload to the release
|
||||||
- name: ZIP HACS Dir
|
- name: ZIP HACS Dir
|
||||||
run: "zip hacs.zip -r custom_components/hacs"
|
run: "zip hacs.zip -r custom_components/hacs"
|
||||||
|
15
.github/workflows/test_with_home_assistant.yml
vendored
15
.github/workflows/test_with_home_assistant.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Test with Home Assistant
|
name: Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@ -9,8 +9,8 @@ on:
|
|||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test_with_home_assistant:
|
||||||
name: Testing with (Python, HA)
|
name: Test with Home Assistant (Python, HA)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
max-parallel: 6
|
max-parallel: 6
|
||||||
@ -66,3 +66,12 @@ jobs:
|
|||||||
cat configuration.yaml
|
cat configuration.yaml
|
||||||
echo ""
|
echo ""
|
||||||
hass --script check_config --config .
|
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
|
Binary file not shown.
17
src/main.ts
17
src/main.ts
@ -1,6 +1,8 @@
|
|||||||
/* eslint-disable no-console, no-undef, prefer-destructuring, prefer-destructuring, no-constant-condition, max-len */
|
/* eslint-disable no-console, no-undef, prefer-destructuring, prefer-destructuring, no-constant-condition, max-len */
|
||||||
import { HomeAssistant } from "custom-card-helpers";
|
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 { load_lovelace } from "./misc/LoadLovelace";
|
||||||
import { navigate } from "./misc/navigate";
|
import { navigate } from "./misc/navigate";
|
||||||
import scrollToTarget from "./misc/ScrollToTarget";
|
import scrollToTarget from "./misc/ScrollToTarget";
|
||||||
@ -79,11 +81,12 @@ class HacsFrontendBase extends LitElement {
|
|||||||
|
|
||||||
// Event subscription
|
// Event subscription
|
||||||
this.hass.connection.sendMessagePromise(
|
this.hass.connection.sendMessagePromise(
|
||||||
{ type: "hacs/repository" });
|
{ type: "hacs/repository" }
|
||||||
|
);
|
||||||
|
|
||||||
this.hass.connection.subscribeEvents(
|
this.hass.connection.subscribeEvents(
|
||||||
() => this.getRepositories(), "hacs/repository")
|
() => this.getRepositories(), "hacs/repository"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -130,17 +133,17 @@ class HacsFrontendBase extends LitElement {
|
|||||||
</paper-tab>
|
</paper-tab>
|
||||||
|
|
||||||
${(this.configuration.appdaemon
|
${(this.configuration.appdaemon
|
||||||
? html`<paper-tab page-name="appdaemon">
|
? html`<paper-tab page-name="appdaemon">
|
||||||
${this.hass.localize(`component.hacs.common.appdaemon_apps`)}
|
${this.hass.localize(`component.hacs.common.appdaemon_apps`)}
|
||||||
</paper-tab>` : "")}
|
</paper-tab>` : "")}
|
||||||
|
|
||||||
${(this.configuration.python_script
|
${(this.configuration.python_script
|
||||||
? html`<paper-tab page-name="python_script">
|
? html`<paper-tab page-name="python_script">
|
||||||
${this.hass.localize(`component.hacs.common.python_scripts`)}
|
${this.hass.localize(`component.hacs.common.python_scripts`)}
|
||||||
</paper-tab>` : "")}
|
</paper-tab>` : "")}
|
||||||
|
|
||||||
${(this.configuration.theme
|
${(this.configuration.theme
|
||||||
? html`<paper-tab page-name="theme">
|
? html`<paper-tab page-name="theme">
|
||||||
${this.hass.localize(`component.hacs.common.themes`)}
|
${this.hass.localize(`component.hacs.common.themes`)}
|
||||||
</paper-tab>` : "")}
|
</paper-tab>` : "")}
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@ export class CustomRepositories extends LitElement {
|
|||||||
public SaveSpinner?: boolean;
|
public SaveSpinner?: boolean;
|
||||||
|
|
||||||
Delete(ev) {
|
Delete(ev) {
|
||||||
console.log(ev.composedPath()[3].innerText)
|
|
||||||
if (!window.confirm(this.hass.localize("component.hacs.confirm.delete", "item", ev.composedPath()[3].innerText))) return;
|
if (!window.confirm(this.hass.localize("component.hacs.confirm.delete", "item", ev.composedPath()[3].innerText))) return;
|
||||||
this.hass.connection.sendMessagePromise({
|
this.hass.connection.sendMessagePromise({
|
||||||
type: "hacs/repository",
|
type: "hacs/repository",
|
||||||
|
Reference in New Issue
Block a user