mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 02:36:37 +00:00
Change order and wording snapshot actions (#7677)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
4dcc0bb66c
commit
7f089c309f
@ -109,7 +109,7 @@ class HassioSnapshotDialog extends LitElement {
|
|||||||
return html``;
|
return html``;
|
||||||
}
|
}
|
||||||
return html`
|
return html`
|
||||||
<ha-dialog open stacked @closing=${this._closeDialog} .heading=${true}>
|
<ha-dialog open @closing=${this._closeDialog} .heading=${true}>
|
||||||
<div slot="heading">
|
<div slot="heading">
|
||||||
<ha-header-bar>
|
<ha-header-bar>
|
||||||
<span slot="title">
|
<span slot="title">
|
||||||
@ -191,47 +191,37 @@ class HassioSnapshotDialog extends LitElement {
|
|||||||
: ""}
|
: ""}
|
||||||
${this._error ? html` <p class="error">Error: ${this._error}</p> ` : ""}
|
${this._error ? html` <p class="error">Error: ${this._error}</p> ` : ""}
|
||||||
|
|
||||||
<div>Actions:</div>
|
<div class="button-row" slot="primaryAction">
|
||||||
${!this._onboarding
|
<mwc-button @click=${this._partialRestoreClicked}>
|
||||||
? html`<mwc-button
|
<ha-svg-icon .path=${mdiHistory} class="icon"></ha-svg-icon>
|
||||||
@click=${this._downloadClicked}
|
Restore Selected
|
||||||
slot="primaryAction"
|
</mwc-button>
|
||||||
>
|
${!this._onboarding
|
||||||
<ha-svg-icon .path=${mdiDownload} class="icon"></ha-svg-icon>
|
? html`
|
||||||
Download Snapshot
|
<mwc-button @click=${this._deleteClicked}>
|
||||||
</mwc-button>`
|
<ha-svg-icon .path=${mdiDelete} class="icon warning">
|
||||||
: ""}
|
</ha-svg-icon>
|
||||||
|
<span class="warning">Delete Snapshot</span>
|
||||||
<mwc-button
|
</mwc-button>
|
||||||
@click=${this._partialRestoreClicked}
|
`
|
||||||
slot="secondaryAction"
|
: ""}
|
||||||
>
|
</div>
|
||||||
<ha-svg-icon .path=${mdiHistory} class="icon"></ha-svg-icon>
|
<div class="button-row" slot="secondaryAction">
|
||||||
Restore Selected
|
${this._snapshot.type === "full"
|
||||||
</mwc-button>
|
? html`
|
||||||
${this._snapshot.type === "full"
|
<mwc-button @click=${this._fullRestoreClicked}>
|
||||||
? html`
|
<ha-svg-icon .path=${mdiHistory} class="icon"></ha-svg-icon>
|
||||||
<mwc-button
|
Restore Everything
|
||||||
@click=${this._fullRestoreClicked}
|
</mwc-button>
|
||||||
slot="secondaryAction"
|
`
|
||||||
>
|
: ""}
|
||||||
<ha-svg-icon .path=${mdiHistory} class="icon"></ha-svg-icon>
|
${!this._onboarding
|
||||||
Wipe & restore
|
? html`<mwc-button @click=${this._downloadClicked}>
|
||||||
</mwc-button>
|
<ha-svg-icon .path=${mdiDownload} class="icon"></ha-svg-icon>
|
||||||
`
|
Download Snapshot
|
||||||
: ""}
|
</mwc-button>`
|
||||||
${!this._onboarding
|
: ""}
|
||||||
? html`<mwc-button
|
</div>
|
||||||
@click=${this._deleteClicked}
|
|
||||||
slot="secondaryAction"
|
|
||||||
>
|
|
||||||
<ha-svg-icon
|
|
||||||
.path=${mdiDelete}
|
|
||||||
class="icon warning"
|
|
||||||
></ha-svg-icon>
|
|
||||||
<span class="warning">Delete Snapshot</span>
|
|
||||||
</mwc-button>`
|
|
||||||
: ""}
|
|
||||||
</ha-dialog>
|
</ha-dialog>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@ -245,6 +235,14 @@ class HassioSnapshotDialog extends LitElement {
|
|||||||
display: block;
|
display: block;
|
||||||
margin: 4px;
|
margin: 4px;
|
||||||
}
|
}
|
||||||
|
mwc-button ha-svg-icon {
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
.button-row {
|
||||||
|
display: grid;
|
||||||
|
gap: 8px;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
.details {
|
.details {
|
||||||
color: var(--secondary-text-color);
|
color: var(--secondary-text-color);
|
||||||
}
|
}
|
||||||
@ -252,10 +250,6 @@ class HassioSnapshotDialog extends LitElement {
|
|||||||
.error {
|
.error {
|
||||||
color: var(--error-color);
|
color: var(--error-color);
|
||||||
}
|
}
|
||||||
.buttons {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
.buttons li {
|
.buttons li {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user