mirror of
https://github.com/hacs/integration.git
synced 2025-08-16 17:12:38 +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/
|
||||
|
||||
|
||||
# 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"
|
||||
|
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:
|
||||
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
|
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 */
|
||||
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 {
|
||||
</paper-tab>
|
||||
|
||||
${(this.configuration.appdaemon
|
||||
? html`<paper-tab page-name="appdaemon">
|
||||
? html`<paper-tab page-name="appdaemon">
|
||||
${this.hass.localize(`component.hacs.common.appdaemon_apps`)}
|
||||
</paper-tab>` : "")}
|
||||
|
||||
${(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`)}
|
||||
</paper-tab>` : "")}
|
||||
|
||||
${(this.configuration.theme
|
||||
? html`<paper-tab page-name="theme">
|
||||
? html`<paper-tab page-name="theme">
|
||||
${this.hass.localize(`component.hacs.common.themes`)}
|
||||
</paper-tab>` : "")}
|
||||
|
||||
|
@ -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",
|
||||
|
Reference in New Issue
Block a user