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