mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-31 13:07:49 +00:00
use heading property
This commit is contained in:
parent
abbfe7200a
commit
2c440976aa
@ -60,36 +60,27 @@ class HassioDatadiskDialog extends LitElement {
|
|||||||
if (!this.dialogParams) {
|
if (!this.dialogParams) {
|
||||||
return html``;
|
return html``;
|
||||||
}
|
}
|
||||||
return html`
|
let heading: string;
|
||||||
<ha-dialog
|
let content: TemplateResult;
|
||||||
open
|
|
||||||
scrimClickAction
|
if (this.moving) {
|
||||||
escapeKeyAction
|
heading = this.dialogParams.supervisor.localize(
|
||||||
@closed=${this.closeDialog}
|
|
||||||
?hideActions=${this.moving}
|
|
||||||
>
|
|
||||||
${this.moving
|
|
||||||
? html`<slot name="heading">
|
|
||||||
<h2 id="title" class="header_title">
|
|
||||||
${this.dialogParams.supervisor.localize(
|
|
||||||
"dialog.datadisk_move.moving"
|
"dialog.datadisk_move.moving"
|
||||||
)}
|
);
|
||||||
</h2>
|
content = html`
|
||||||
</slot>
|
|
||||||
<ha-circular-progress alt="Moving" size="large" active>
|
<ha-circular-progress alt="Moving" size="large" active>
|
||||||
</ha-circular-progress>
|
</ha-circular-progress>
|
||||||
<p class="progress-text">
|
<p class="progress-text">
|
||||||
${this.dialogParams.supervisor.localize(
|
${this.dialogParams.supervisor.localize(
|
||||||
"dialog.datadisk_move.moving_desc"
|
"dialog.datadisk_move.moving_desc"
|
||||||
)}
|
)}
|
||||||
</p>`
|
</p>
|
||||||
: html`<slot name="heading">
|
`;
|
||||||
<h2 id="title" class="header_title">
|
} else {
|
||||||
${this.dialogParams.supervisor.localize(
|
heading = this.dialogParams.supervisor.localize(
|
||||||
"dialog.datadisk_move.title"
|
"dialog.datadisk_move.title"
|
||||||
)}
|
);
|
||||||
</h2>
|
content = html`
|
||||||
</slot>
|
|
||||||
${this.devices?.length
|
${this.devices?.length
|
||||||
? html`
|
? html`
|
||||||
${this.dialogParams.supervisor.localize(
|
${this.dialogParams.supervisor.localize(
|
||||||
@ -133,10 +124,21 @@ class HassioDatadiskDialog extends LitElement {
|
|||||||
slot="primaryAction"
|
slot="primaryAction"
|
||||||
@click=${this._moveDatadisk}
|
@click=${this._moveDatadisk}
|
||||||
>
|
>
|
||||||
${this.dialogParams.supervisor.localize(
|
${this.dialogParams.supervisor.localize("dialog.datadisk_move.move")}
|
||||||
"dialog.datadisk_move.move"
|
</mwc-button>
|
||||||
)}
|
`;
|
||||||
</mwc-button>`}
|
}
|
||||||
|
|
||||||
|
return html`
|
||||||
|
<ha-dialog
|
||||||
|
open
|
||||||
|
scrimClickAction
|
||||||
|
escapeKeyAction
|
||||||
|
@closed=${this.closeDialog}
|
||||||
|
?hideActions=${this.moving}
|
||||||
|
.heading=${heading}
|
||||||
|
>
|
||||||
|
${content}
|
||||||
</ha-dialog>
|
</ha-dialog>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user