mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Improve background settings and fix save button (#24978)
This commit is contained in:
parent
828bf977b2
commit
ccee57f4a5
@ -83,6 +83,10 @@ export class HaBackgroundSelector extends LitElement {
|
|||||||
display: block;
|
display: block;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
ha-picture-upload {
|
||||||
|
background-color: var(--primary-background-color);
|
||||||
|
border-radius: var(--file-upload-image-border-radius);
|
||||||
|
}
|
||||||
div {
|
div {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
@ -303,6 +303,7 @@ export class HuiDialogEditView extends LitElement {
|
|||||||
`
|
`
|
||||||
: nothing}
|
: nothing}
|
||||||
<ha-button
|
<ha-button
|
||||||
|
class="save"
|
||||||
slot="primaryAction"
|
slot="primaryAction"
|
||||||
?disabled=${!this._config ||
|
?disabled=${!this._config ||
|
||||||
this._saving ||
|
this._saving ||
|
||||||
@ -665,6 +666,15 @@ export class HuiDialogEditView extends LitElement {
|
|||||||
ha-alert ha-button {
|
ha-alert ha-button {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
ha-button.save {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.save ha-spinner {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
}
|
||||||
|
|
||||||
@media all and (min-width: 600px) {
|
@media all and (min-width: 600px) {
|
||||||
ha-dialog {
|
ha-dialog {
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
import "@material/mwc-list/mwc-list-item";
|
|
||||||
import memoizeOne from "memoize-one";
|
import memoizeOne from "memoize-one";
|
||||||
import { LitElement, css, html, nothing } from "lit";
|
import { LitElement, css, html, nothing } from "lit";
|
||||||
import { customElement, property, state } from "lit/decorators";
|
import { customElement, property, state } from "lit/decorators";
|
||||||
import { fireEvent } from "../../../../common/dom/fire_event";
|
import { fireEvent } from "../../../../common/dom/fire_event";
|
||||||
import "../../../../components/ha-form/ha-form";
|
import "../../../../components/ha-form/ha-form";
|
||||||
import type { SchemaUnion } from "../../../../components/ha-form/types";
|
import type { SchemaUnion } from "../../../../components/ha-form/types";
|
||||||
import "../../../../components/ha-selector/ha-selector-background";
|
|
||||||
import type { LovelaceViewConfig } from "../../../../data/lovelace/config/view";
|
import type { LovelaceViewConfig } from "../../../../data/lovelace/config/view";
|
||||||
import type { HomeAssistant } from "../../../../types";
|
import type { HomeAssistant } from "../../../../types";
|
||||||
|
|
||||||
@ -38,7 +36,7 @@ export class HuiViewBackgroundEditor extends LitElement {
|
|||||||
{
|
{
|
||||||
name: "opacity",
|
name: "opacity",
|
||||||
selector: {
|
selector: {
|
||||||
number: { min: 0, max: 100, mode: "slider" },
|
number: { min: 0, max: 100, mode: "slider", step: 10 },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user