Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
9ae8bd2
Fix reversal in power icon (#7188)
bdraco Oct 1, 2020
bfb5ee7
[ci skip] Translation update
homeassistant Oct 2, 2020
93d1b9a
Fix entities Card toggle (#7192)
zsarnett Oct 2, 2020
cbdfacc
Logbook: Fix for no state obj (#7191)
zsarnett Oct 2, 2020
2ecf7bc
Set hass when creating card (#7187)
bramkragten Oct 2, 2020
72aa9a3
use ha-svg-icon in more-info-weather (#7196)
Misiu Oct 2, 2020
601c909
Warning Element: Fix Overflow in Entity Row (#7193)
zsarnett Oct 2, 2020
29c9004
[ci skip] Translation update
homeassistant Oct 3, 2020
7776b37
[ci skip] Translation update
homeassistant Oct 4, 2020
9873459
Styling fixes for hui-masonry-view (#7226)
maykar Oct 4, 2020
369c56d
[ci skip] Translation update
homeassistant Oct 5, 2020
05630c9
Use client_id if no client_name in delete dialog (#7228)
maykar Oct 5, 2020
7e708b3
Use consistent title case for headers in Supervisor (#7227)
maykar Oct 5, 2020
da9facc
Allow viewport scaling (zooming) of frontend (#7180)
davidjb Oct 5, 2020
3940606
Fix Apple not showing cards (#7232)
bramkragten Oct 5, 2020
5971aee
dot notation for path property of ha-svg-icon (#7197)
Misiu Oct 5, 2020
af92637
[ci skip] Translation update
homeassistant Oct 6, 2020
722e016
Fix flickering scrollbar when using progress-spinner (#7237)
NoUsername Oct 6, 2020
ede9931
Only do 1 token update a time (#7236)
bramkragten Oct 6, 2020
a076fcd
replace ha-icon_button and ha-icon in stack card editor (#7233)
Misiu Oct 6, 2020
5937be6
Bump Lit, use cache for query (#7245)
bramkragten Oct 6, 2020
c2fba15
Avoid fetching logbook when there will never be entries (#7239)
bdraco Oct 6, 2020
17ffdb0
Update script editor panel tooltips (#7204)
da-snap Oct 6, 2020
45b2fc5
[ci skip] Translation update
homeassistant Oct 7, 2020
d9ba0e2
Upgrade to Webpack 5 (#6200)
balloob Oct 7, 2020
c90c88e
Bump typescript (4) and babel (#7249)
bramkragten Oct 7, 2020
919c867
[ci skip] Translation update
homeassistant Oct 8, 2020
80b7c84
Fix cloud webhooks (#7261)
bramkragten Oct 8, 2020
667c574
Fix ha-bar display issue on firefox (#7263)
ludeeus Oct 8, 2020
8d516ed
Add "quick open" style dialog for selecting entities and running relo…
donkawechico Oct 8, 2020
701bea6
Fix tab focus issue in entity picker and password form. (#7252)
maykar Oct 8, 2020
113718c
Do not show weather forecast in generated UI (#7251)
balloob Oct 8, 2020
5fc0eae
Warn about slow snapshot downloads (#7265)
ludeeus Oct 8, 2020
b877753
Fixed localization of relative time (#7256)
kukulich Oct 8, 2020
7d6911b
Replace mdc circular progress with mwc (#7248)
bramkragten Oct 8, 2020
0f0a3fd
Add keyboard shortcut to save automation/scene/script (#7207)
gilsonmandalogo Oct 8, 2020
c7f4986
Put automation/script editor actions in a menu (#7250)
thomasloven Oct 8, 2020
3bf6205
Display qr code in tag properties (#7092)
thomasloven Oct 8, 2020
426a7ac
Show moon phase icon in state-label-badge (#7194)
iantrich Oct 8, 2020
0405adc
Edit Person button in the Person "more info" dialog (fixes #4706) (#7…
spencerwi Oct 8, 2020
6663327
Fix history chart fetching changes (#7235)
bramkragten Oct 8, 2020
7332445
[ci skip] Translation update
homeassistant Oct 9, 2020
892843b
Supervisor disk usage more info (#7247)
maykar Oct 9, 2020
4773c39
Ensure ha-dialog uses correct <a> color (#7255)
spacegaier Oct 9, 2020
b08c96d
[ci skip] Translation update
homeassistant Oct 10, 2020
b8a67d5
Update translations
balloob Oct 10, 2020
26b476a
Weather card: Add wind speed direction (#7202)
danimart1991 Oct 10, 2020
c220228
Add link to documentation for persons (#7205)
alex6480 Oct 10, 2020
55ba75f
[ci skip] Translation update
homeassistant Oct 11, 2020
cc0515c
Add help link on automations picker and updated links for scripts and…
Villhellm Oct 11, 2020
934c227
Sort profile refresh tokens by 'last used at' date (#4484) (#7199)
aav7fl Oct 11, 2020
2b3126a
hassio-addon-info.ts: Fix spelling (#7311)
jonasbroms Oct 11, 2020
f7a9ecf
[ci skip] Translation update
homeassistant Oct 12, 2020
c219f64
Rename 'quick open dialog' to 'quick bar' (#7286)
donkawechico Oct 12, 2020
d9a954c
Close notification drawer after dismissing last notification (#7229)
mattmattmatt Oct 12, 2020
80c7a84
Fix Entity Toggle not working for Type Row (#7289)
zsarnett Oct 12, 2020
0641022
Use translations for alexa (#7301)
GruberMischa Oct 12, 2020
d3ad56a
Update compatibility and fix polyfills for ES5 (#7298)
balloob Oct 12, 2020
557d6d3
Fix charts tooltip (#7216)
noxhirsch Oct 12, 2020
44166f7
Scriptomation yaml editor (#7273)
thomasloven Oct 12, 2020
97ca0b8
Capitalize first character of attributes (#7313)
spacegaier Oct 12, 2020
993d73c
Added entity_id to history graph tooltip (#7310)
tobias-kuendig Oct 12, 2020
02e4e3c
Weather Card: add icons instead of text (#7305)
zsarnett Oct 12, 2020
7f6880f
Show disabled entities for a config_entry by default + number of hidd…
spacegaier Oct 12, 2020
504055f
Add documentation link to "customize" dialog (#7321)
spacegaier Oct 12, 2020
c000d72
[ci skip] Translation update
homeassistant Oct 13, 2020
5cddb48
Fix issue with enter key not executing selected item in quick bar lis…
donkawechico Oct 13, 2020
5de225d
Fix: Quick Bar not launching on windows (#7293)
donkawechico Oct 13, 2020
ddcf89e
Add tests for fuzzy sequence matcher (#7328)
donkawechico Oct 13, 2020
0df9080
Check if video el still exists before exoplayer resize in ha-hls-play…
uvjustin Oct 13, 2020
0d741b6
Add warning to badge preview in "Panel Mode" (#7331)
spacegaier Oct 13, 2020
63f6001
Add friendly name to quick bar list and filter (#7306)
donkawechico Oct 13, 2020
35b3bc9
[ci skip] Translation update
homeassistant Oct 14, 2020
ce48546
Move feature requests to discussions
bramkragten Oct 14, 2020
ad3ff0a
Delete FEATURE_REQUEST.md
bramkragten Oct 14, 2020
5559549
Update config.yml
bramkragten Oct 14, 2020
5269ff9
New component: ha-expansion-panel (#6789)
Misiu Oct 14, 2020
1f361b7
Update entity picker (#7343)
bramkragten Oct 14, 2020
6165cb0
Make enter key execute first filtered item in Quick Bar (#7288)
donkawechico Oct 14, 2020
f6ff652
Fix es5 build (#7319)
bramkragten Oct 14, 2020
4a7fb3d
Use attribute picker for sec. info in weather card editor (#7335)
spacegaier Oct 14, 2020
c274163
[ci skip] Translation update
homeassistant Oct 15, 2020
12d73fe
Add Friendly Name to the Entity Picker + FuzzySeq Algo (#7291)
zsarnett Oct 15, 2020
d2dd1a4
Fix attribute picker suffix (#7348)
spacegaier Oct 15, 2020
ce80285
Header styling & paper-tabs improvements (#7238)
maykar Oct 15, 2020
47f0d74
New "clickable" property for <ha-data-table> (#7351)
spacegaier Oct 15, 2020
c1dba46
Lovelace Cards: Update size calcs and add height fixes for horizontal…
zsarnett Oct 15, 2020
ce07dfd
Little clean up in data table (#7352)
bramkragten Oct 15, 2020
213c53e
Add the options dark_mode_filter and dark_mode_image to the picture e…
Santobert Oct 15, 2020
2dd7f29
Add product picture to ozw node dashboard (#7203)
cgarwood Oct 15, 2020
5b1a2d1
Add button that dismisses all notifications (#7223)
mattmattmatt Oct 15, 2020
7251e80
[ci skip] Translation update
homeassistant Oct 16, 2020
c268f42
Entity Picker: undo fuzzy algorithm (#7360)
zsarnett Oct 16, 2020
a56ce62
Add docker registry management (#7269)
ludeeus Oct 16, 2020
1d316c3
Remove query caching to get YAML editor toggle working again (#7365)
spacegaier Oct 16, 2020
02d37a3
[ci skip] Translation update
homeassistant Oct 17, 2020
288bf68
Sort persistent notifications ascending (#7195)
Misiu Oct 17, 2020
5740b01
Prevent old more info control to be created (#7324)
bramkragten Oct 17, 2020
2fd017c
Fix more info group (#7345)
bramkragten Oct 17, 2020
874f3b3
Harmonize the font sizes on area and device page (#7357)
spacegaier Oct 17, 2020
cbef909
Add Counter to Helpers (#7346)
danimart1991 Oct 17, 2020
534d1f5
Add dialog and links for unsupported supervisor installation (#7332)
ludeeus Oct 17, 2020
eb036a1
add help button to tags config panel (#7278)
Villhellm Oct 17, 2020
6e130cc
Properly wrap integration title / device names (#7355)
spacegaier Oct 17, 2020
713e057
Entity registry settings: Remove "Override" string + use domain icon …
spacegaier Oct 17, 2020
7e769d0
Make <ha-card> use <h1> for header (#7373)
spacegaier Oct 17, 2020
3277a4e
Minor tweaks for when media player has no items (#7374)
spacegaier Oct 17, 2020
a7998b3
Fix hls player (#7362)
bramkragten Oct 17, 2020
e603893
Fix navigation links for "script/edit" (#7363)
spacegaier Oct 17, 2020
16984d1
Refactor quick bar to use a common interface for future commands and …
donkawechico Oct 17, 2020
b1f3192
[ci skip] Translation update
homeassistant Oct 18, 2020
7dac7d7
[ci skip] Translation update
homeassistant Oct 19, 2020
1ebf1c0
Initial OZW Node Config Panel (#7377)
cgarwood Oct 19, 2020
a73754c
Use ha-card for dev tool "Services" + visual tweaks (#7364)
spacegaier Oct 19, 2020
3dc6898
Enable volume up/down for media player (#7376)
jedi7 Oct 19, 2020
b675755
Add option to copy system info into clipboard (#7323)
spacegaier Oct 19, 2020
105b767
Make error texts of device automation picker translatable (#7370)
spacegaier Oct 19, 2020
ce7acb0
Clean up general config page code (#7383)
spacegaier Oct 19, 2020
19fc375
Fix alignment / padding of ha-switch (#7349)
spacegaier Oct 19, 2020
a4ea4b1
Add Timer to Helpers (#7366)
danimart1991 Oct 19, 2020
7c51001
Move valid so we don't cache an empty element for add-on config (#7394)
ludeeus Oct 19, 2020
eec4a91
Fixes for snapshot upload during onboarding (#7390)
ludeeus Oct 19, 2020
9f41f80
Add support for displaying time listeners (#7220)
bdraco Oct 19, 2020
52b2fd0
Improved automation & script menus + show errors in toast (#7371)
spacegaier Oct 19, 2020
990ae10
Detect Lovelace resource type based on file extension (#7354)
spacegaier Oct 19, 2020
3ee4c11
Move error log <ha-card> + color in log entries (#7382)
spacegaier Oct 19, 2020
a7ef8ab
Add dialog-box warning support (#7356)
spacegaier Oct 19, 2020
c1de162
Visual alignment between PR 7364 & 7220 (#7396)
spacegaier Oct 19, 2020
c0b2143
Quick Bar dark mode, ignore leading white space (#7387)
donkawechico Oct 19, 2020
0880ab6
[ci skip] Translation update
homeassistant Oct 20, 2020
83c5151
bump node-vibrant to 3.1.6 (#7400)
Misiu Oct 20, 2020
43afdaa
Fix syntax error (#7402)
onagurna Oct 20, 2020
41b59e6
Bump round-slider to 0.5.2 (#7399)
spacegaier Oct 20, 2020
5065901
Modified icons of binary sensors: gas, problem, safety, smoke (#7403)
kukulich Oct 20, 2020
6f2a759
Add scoring and sorting to sequence matcher (#7367)
donkawechico Oct 20, 2020
af22508
Only admins can launch quick bar (#7388)
donkawechico Oct 20, 2020
baf31d1
Fix alignments in integration card (#7404)
spacegaier Oct 20, 2020
8c8151b
Add entity filter to history panel (#7401)
spacegaier Oct 20, 2020
37eb5af
Pass updated cards and badges to view element (#7407)
bramkragten Oct 20, 2020
2be08ce
Light hui & more-info card fixes (#7397)
spacegaier Oct 20, 2020
80481f1
[ci skip] Translation update
homeassistant Oct 21, 2020
0fcf0dc
Fix Yarn lock (#7411)
zsarnett Oct 21, 2020
01b9a07
Change logic for the new version handling (#7405)
ludeeus Oct 21, 2020
4a5935e
Add onClick listener to dismiss toast notification. (#7268)
gilsonmandalogo Oct 21, 2020
54ec379
Improve performance of quick bar (#7359)
bramkragten Oct 21, 2020
7e2dc04
Fix icon for unavailable buttons (#7416)
iantrich Oct 21, 2020
fb9bd0e
Fix prettier that keeps messing with merging dev (#7412)
zsarnett Oct 21, 2020
3c4b0d4
Compact header (#7369)
maykar Oct 21, 2020
bcf405b
Fix Firefox quick bar issue by allowing Ctrl+P to toggle modes (#7413)
donkawechico Oct 21, 2020
eab76bf
Fix position edit card dialog (#7418)
bramkragten Oct 21, 2020
30f34ee
Add context to event trigger (#7182)
OnFreund Oct 21, 2020
682fa0d
Haos update button (#7419)
ludeeus Oct 21, 2020
c4ed743
Fix mwc list items icon color (#7420)
bramkragten Oct 21, 2020
673649a
Bumped version to 20201021.0
bramkragten Oct 21, 2020
e553f35
Merge branch 'master' into dev
bramkragten Oct 21, 2020
611202c
Fix no focus on first item when switching mode (#7421)
bramkragten Oct 21, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 5 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,16 @@
"object-curly-newline": 0,
"default-case": 0,
"wc/no-self-class": 0,
"no-shadow": 0,
"@typescript-eslint/camelcase": 0,
"@typescript-eslint/ban-ts-ignore": 0,
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-use-before-define": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-unused-vars": 0,
"@typescript-eslint/explicit-function-return-type": 0
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/no-shadow": ["error"]
},
"plugins": ["disable", "import", "lit", "prettier", "@typescript-eslint"],
"processor": "disable/disable"
Expand Down
26 changes: 0 additions & 26 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md

This file was deleted.

3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Request a feature for the UI, Frontend or Lovelace
url: https://github.com/home-assistant/frontend/discussions/category_choices
about: Request an new feature for the Home Assistant frontend.
- name: Report a bug that is NOT related to the UI, Frontend or Lovelace
url: https://github.com/home-assistant/core/issues
about: This is the issue tracker for our frontend. Please report other issues with the backend repository.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ A complete guide can be found at the following [link](https://www.home-assistant

Home Assistant is open-source and Apache 2 licensed. Feel free to browse the repository, learn and reuse parts in your own projects.

We use [BrowserStack](https://www.browserstack.com) to test Home Assistant on a large variation of devices.
We use [BrowserStack](https://www.browserstack.com) to test Home Assistant on a large variety of devices.
13 changes: 11 additions & 2 deletions build-scripts/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,14 @@ module.exports.terserOptions = (latestBuild) => ({
module.exports.babelOptions = ({ latestBuild }) => ({
babelrc: false,
presets: [
!latestBuild && [require("@babel/preset-env").default, { modules: false }],
!latestBuild && [
require("@babel/preset-env").default,
{
modules: false,
useBuiltIns: "entry",
corejs: "3.6",
},
],
require("@babel/preset-typescript").default,
].filter(Boolean),
plugins: [
Expand All @@ -62,7 +69,9 @@ module.exports.babelOptions = ({ latestBuild }) => ({
{ loose: true, useBuiltIns: true },
],
// Only support the syntax, Webpack will handle it.
"@babel/syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-top-level-await",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator",
[
Expand Down
23 changes: 20 additions & 3 deletions build-scripts/webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const webpack = require("webpack");
const path = require("path");
const TerserPlugin = require("terser-webpack-plugin");
const ManifestPlugin = require("webpack-manifest-plugin");
const WorkerPlugin = require("worker-plugin");
const paths = require("./paths.js");
const bundle = require("./bundle");

Expand Down Expand Up @@ -30,7 +29,7 @@ const createWebpackConfig = ({
module: {
rules: [
{
test: /\.js$|\.ts$/,
test: /\.m?js$|\.ts$/,
exclude: bundle.babelExclude(),
use: {
loader: "babel-loader",
Expand All @@ -54,8 +53,10 @@ const createWebpackConfig = ({
}),
],
},
experiments: {
topLevelAwait: true,
},
plugins: [
new WorkerPlugin(),
new ManifestPlugin({
// Only include the JS of entrypoints
filter: (file) => file.isInitial && !file.name.endsWith(".map"),
Expand Down Expand Up @@ -110,6 +111,22 @@ const createWebpackConfig = ({
}
return `${chunk.name}.${chunk.hash.substr(0, 8)}.js`;
},
environment: {
// The environment supports arrow functions ('() => { ... }').
arrowFunction: latestBuild,
// The environment supports BigInt as literal (123n).
bigIntLiteral: false,
// The environment supports const and let for variable declarations.
const: latestBuild,
// The environment supports destructuring ('{ a, b } = obj').
destructuring: latestBuild,
// The environment supports an async import() function to import EcmaScript modules.
dynamicImport: latestBuild,
// The environment supports 'for of' iteration ('for (const x of array) { ... }').
forOf: latestBuild,
// The environment supports ECMAScript Module syntax to import ECMAScript modules (import ... from '...').
module: latestBuild,
},
chunkFilename:
isProdBuild && !isStatsBuild
? "chunk.[chunkhash].js"
Expand Down
4 changes: 2 additions & 2 deletions cast/src/launcher/layout/hc-layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class HcLayout extends LitElement {
<ha-card>
<div class="layout">
<img class="hero" src="/images/google-nest-hub.png" />
<div class="card-header">
<h1 class="card-header">
Home Assistant Cast${this.subtitle ? ` – ${this.subtitle}` : ""}
${this.auth
? html`
Expand All @@ -44,7 +44,7 @@ class HcLayout extends LitElement {
</div>
`
: ""}
</div>
</h1>
<slot></slot>
</div>
</ha-card>
Expand Down
12 changes: 6 additions & 6 deletions hassio/src/addon-store/hassio-addon-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import { hassioStyle } from "../resources/hassio-style";
class HassioAddonRepositoryEl extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;

@property() public repo!: HassioAddonRepository;
@property({ attribute: false }) public repo!: HassioAddonRepository;

@property() public addons!: HassioAddonInfo[];
@property({ attribute: false }) public addons!: HassioAddonInfo[];

@property() public filter!: string;

Expand Down Expand Up @@ -78,18 +78,18 @@ class HassioAddonRepositoryEl extends LitElement {
.title=${addon.name}
.description=${addon.description}
.available=${addon.available}
.icon=${addon.installed && addon.installed !== addon.version
.icon=${addon.installed && addon.update_available
? mdiArrowUpBoldCircle
: mdiPuzzle}
.iconTitle=${addon.installed
? addon.installed !== addon.version
? addon.update_available
? "New version available"
: "Add-on is installed"
: addon.available
? "Add-on is not installed"
: "Add-on is not available on your system"}
.iconClass=${addon.installed
? addon.installed !== addon.version
? addon.update_available
? "update"
: "installed"
: !addon.available
Expand All @@ -104,7 +104,7 @@ class HassioAddonRepositoryEl extends LitElement {
: undefined}
.showTopbar=${addon.installed || !addon.available}
.topbarClass=${addon.installed
? addon.installed !== addon.version
? addon.update_available
? "update"
: "installed"
: !addon.available
Expand Down
19 changes: 17 additions & 2 deletions hassio/src/addon-store/hassio-addon-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
PropertyValues,
} from "lit-element";
import { html, TemplateResult } from "lit-html";
import { atLeastVersion } from "../../../src/common/config/version";
import "../../../src/common/search/search-input";
import "../../../src/components/ha-button-menu";
import "../../../src/components/ha-svg-icon";
Expand All @@ -24,6 +25,7 @@ import { extractApiErrorMessage } from "../../../src/data/hassio/common";
import "../../../src/layouts/hass-loading-screen";
import "../../../src/layouts/hass-tabs-subpage";
import { HomeAssistant, Route } from "../../../src/types";
import { showRegistriesDialog } from "../dialogs/registries/show-dialog-registries";
import { showRepositoriesDialog } from "../dialogs/repositories/show-dialog-repositories";
import { supervisorTabs } from "../hassio-tabs";
import "./hassio-addon-repository";
Expand Down Expand Up @@ -98,21 +100,27 @@ class HassioAddonStore extends LitElement {
main-page
.tabs=${supervisorTabs}
>
<span slot="header">Add-on store</span>
<span slot="header">Add-on Store</span>
<ha-button-menu
corner="BOTTOM_START"
slot="toolbar-icon"
@action=${this._handleAction}
>
<mwc-icon-button slot="trigger" alt="menu">
<ha-svg-icon path=${mdiDotsVertical}></ha-svg-icon>
<ha-svg-icon .path=${mdiDotsVertical}></ha-svg-icon>
</mwc-icon-button>
<mwc-list-item>
Repositories
</mwc-list-item>
<mwc-list-item>
Reload
</mwc-list-item>
${this.hass.userData?.showAdvanced &&
atLeastVersion(this.hass.config.version, 0, 117)
? html`<mwc-list-item>
Registries
</mwc-list-item>`
: ""}
</ha-button-menu>
${repos.length === 0
? html`<hass-loading-screen no-toolbar></hass-loading-screen>`
Expand Down Expand Up @@ -157,6 +165,9 @@ class HassioAddonStore extends LitElement {
case 1:
this.refreshData();
break;
case 2:
this._manageRegistries();
break;
}
}

Expand All @@ -173,6 +184,10 @@ class HassioAddonStore extends LitElement {
});
}

private async _manageRegistries() {
showRegistriesDialog(this);
}

private async _loadData() {
try {
const addonsInfo = await fetchHassioAddonsInfo(this.hass);
Expand Down
16 changes: 7 additions & 9 deletions hassio/src/addon-view/config/hassio-addon-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,11 @@ class HassioAddonConfig extends LitElement {

@property({ type: Boolean }) private _configHasChanged = false;

@query("ha-yaml-editor") private _editor!: HaYamlEditor;
@property({ type: Boolean }) private _valid = true;

protected render(): TemplateResult {
const editor = this._editor;
// If editor not rendered, don't show the error.
const valid = editor ? editor.isValid : true;
@query("ha-yaml-editor", true) private _editor!: HaYamlEditor;

protected render(): TemplateResult {
return html`
<h1>${this.addon.name}</h1>
<ha-card header="Configuration">
Expand All @@ -54,15 +52,15 @@ class HassioAddonConfig extends LitElement {
@value-changed=${this._configChanged}
></ha-yaml-editor>
${this._error ? html` <div class="errors">${this._error}</div> ` : ""}
${valid ? "" : html` <div class="errors">Invalid YAML</div> `}
${this._valid ? "" : html` <div class="errors">Invalid YAML</div> `}
</div>
<div class="card-actions">
<ha-progress-button class="warning" @click=${this._resetTapped}>
Reset to defaults
</ha-progress-button>
<ha-progress-button
@click=${this._saveTapped}
.disabled=${!this._configHasChanged || !valid}
.disabled=${!this._configHasChanged || !this._valid}
>
Save
</ha-progress-button>
Expand All @@ -78,9 +76,9 @@ class HassioAddonConfig extends LitElement {
}
}

private _configChanged(): void {
private _configChanged(ev): void {
this._configHasChanged = true;
this.requestUpdate();
this._valid = ev.detail.isValid;
}

private async _resetTapped(ev: CustomEvent): Promise<void> {
Expand Down
Loading