mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-24 04:39:01 +00:00
Address code review feedback - remove unused methods and clean up warning class
Co-authored-by: wendevlin <12148533+wendevlin@users.noreply.github.com>
This commit is contained in:
@@ -772,29 +772,6 @@ export class HassioNetwork extends LitElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private _addPredefinedDNS(ev: Event) {
|
|
||||||
const source = ev.target as any;
|
|
||||||
const version = source.version as "ipv4" | "ipv6";
|
|
||||||
const addresses = source.addresses as string[];
|
|
||||||
if (!this._interface![version]!.nameservers) {
|
|
||||||
this._interface![version]!.nameservers = [];
|
|
||||||
}
|
|
||||||
this._interface![version]!.nameservers!.push(...addresses);
|
|
||||||
this._dirty = true;
|
|
||||||
this.requestUpdate("_interface");
|
|
||||||
}
|
|
||||||
|
|
||||||
private _addCustomDNS(ev: Event) {
|
|
||||||
const source = ev.target as any;
|
|
||||||
const version = source.version as "ipv4" | "ipv6";
|
|
||||||
if (!this._interface![version]!.nameservers) {
|
|
||||||
this._interface![version]!.nameservers = [];
|
|
||||||
}
|
|
||||||
this._interface![version]!.nameservers!.push("");
|
|
||||||
this._dirty = true;
|
|
||||||
this.requestUpdate("_interface");
|
|
||||||
}
|
|
||||||
|
|
||||||
private _removeNameserver(ev: Event): void {
|
private _removeNameserver(ev: Event): void {
|
||||||
const source = ev.target as any;
|
const source = ev.target as any;
|
||||||
const index = source.index as number;
|
const index = source.index as number;
|
||||||
|
|||||||
@@ -285,11 +285,7 @@ export class HaSceneEditor extends PreventUnsavedMixin(
|
|||||||
.disabled=${!this.sceneId}
|
.disabled=${!this.sceneId}
|
||||||
.variant=${this.sceneId ? "danger" : "default"}
|
.variant=${this.sceneId ? "danger" : "default"}
|
||||||
>
|
>
|
||||||
<ha-svg-icon
|
<ha-svg-icon slot="icon" .path=${mdiDelete}></ha-svg-icon>
|
||||||
class=${classMap({ warning: Boolean(this.sceneId) })}
|
|
||||||
slot="icon"
|
|
||||||
.path=${mdiDelete}
|
|
||||||
></ha-svg-icon>
|
|
||||||
${this.hass.localize("ui.panel.config.scene.picker.delete_scene")}
|
${this.hass.localize("ui.panel.config.scene.picker.delete_scene")}
|
||||||
</ha-dropdown-item>
|
</ha-dropdown-item>
|
||||||
</ha-dropdown>
|
</ha-dropdown>
|
||||||
|
|||||||
Reference in New Issue
Block a user