Reload buttons (#4194)

* Change base translation for ui.panel.config.server_control.section.reloading.core

* Give each btn a new card-action div
This commit is contained in:
Joakim Sørensen 2019-11-08 23:39:21 +01:00 committed by Paulus Schoutsen
parent 901752bec3
commit d284d53b93
2 changed files with 41 additions and 29 deletions

View File

@ -107,35 +107,47 @@ class HaConfigSectionServerControl extends LocalizeMixin(PolymerElement) {
service="reload_core_config"
>[[localize('ui.panel.config.server_control.section.reloading.core')]]
</ha-call-service-button>
<ha-call-service-button
hass="[[hass]]"
domain="group"
service="reload"
hidden$="[[!groupLoaded(hass)]]"
>[[localize('ui.panel.config.server_control.section.reloading.group')]]
</ha-call-service-button>
<ha-call-service-button
hass="[[hass]]"
domain="automation"
service="reload"
hidden$="[[!automationLoaded(hass)]]"
>[[localize('ui.panel.config.server_control.section.reloading.automation')]]
</ha-call-service-button>
<ha-call-service-button
hass="[[hass]]"
domain="script"
service="reload"
hidden$="[[!scriptLoaded(hass)]]"
>[[localize('ui.panel.config.server_control.section.reloading.script')]]
</ha-call-service-button>
<ha-call-service-button
hass="[[hass]]"
domain="scene"
service="reload"
hidden$="[[!sceneLoaded(hass)]]"
>[[localize('ui.panel.config.server_control.section.reloading.scene')]]
</ha-call-service-button>
</div>
<template is="dom-if" if="[[groupLoaded(hass)]]">
<div class="card-actions">
<ha-call-service-button
hass="[[hass]]"
domain="group"
service="reload"
>[[localize('ui.panel.config.server_control.section.reloading.group')]]
</ha-call-service-button>
</div>
</template>
<template is="dom-if" if="[[automationLoaded(hass)]]">
<div class="card-actions">
<ha-call-service-button
hass="[[hass]]"
domain="automation"
service="reload"
>[[localize('ui.panel.config.server_control.section.reloading.automation')]]
</ha-call-service-button>
</div>
</template>
<template is="dom-if" if="[[scriptLoaded(hass)]]">
<div class="card-actions">
<ha-call-service-button
hass="[[hass]]"
domain="script"
service="reload"
>[[localize('ui.panel.config.server_control.section.reloading.script')]]
</ha-call-service-button>
</div>
</template>
<template is="dom-if" if="[[sceneLoaded(hass)]]">
<div class="card-actions">
<ha-call-service-button
hass="[[hass]]"
domain="scene"
service="reload"
>[[localize('ui.panel.config.server_control.section.reloading.scene')]]
</ha-call-service-button>
</div>
</template>
</ha-card>
</template>
<ha-card

View File

@ -465,7 +465,7 @@
"reloading": {
"heading": "Configuration reloading",
"introduction": "Some parts of Home Assistant can reload without requiring a restart. Hitting reload will unload their current configuration and load the new one.",
"core": "Reload core",
"core": "Reload location & customize",
"group": "Reload groups",
"automation": "Reload automations",
"script": "Reload scripts"