mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +00:00
Configurator updates (#386)
* Hide configurator button if no caption configured * Put configurator links on new line
This commit is contained in:
parent
823a699670
commit
688a984bac
@ -46,13 +46,14 @@
|
|||||||
|
|
||||||
<p hidden$='[[!stateObj.attributes.description]]'>
|
<p hidden$='[[!stateObj.attributes.description]]'>
|
||||||
[[stateObj.attributes.description]]
|
[[stateObj.attributes.description]]
|
||||||
<a
|
<p hidden$='[[!stateObj.attributes.link_url]]'>
|
||||||
hidden$='[[!stateObj.attributes.link_url]]'
|
<a
|
||||||
href='[[stateObj.attributes.link_url]]'
|
href='[[stateObj.attributes.link_url]]'
|
||||||
target='_blank'
|
target='_blank'
|
||||||
>
|
>
|
||||||
[[stateObj.attributes.link_name]]
|
[[stateObj.attributes.link_name]]
|
||||||
</a>
|
</a>
|
||||||
|
</p>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class='error' hidden$='[[!stateObj.attributes.errors]]'>
|
<p class='error' hidden$='[[!stateObj.attributes.errors]]'>
|
||||||
@ -72,7 +73,7 @@
|
|||||||
></paper-input>
|
></paper-input>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<p class='submit'>
|
<p class='submit' hidden$='[[!stateObj.attributes.submit_caption]]'>
|
||||||
<paper-button
|
<paper-button
|
||||||
raised
|
raised
|
||||||
disabled='[[isConfiguring]]'
|
disabled='[[isConfiguring]]'
|
||||||
@ -82,7 +83,7 @@
|
|||||||
active='[[isConfiguring]]'
|
active='[[isConfiguring]]'
|
||||||
hidden='[[!isConfiguring]]'
|
hidden='[[!isConfiguring]]'
|
||||||
alt='Configuring'></paper-spinner>
|
alt='Configuring'></paper-spinner>
|
||||||
[[submitCaption]]
|
[[stateObj.attributes.submit_caption]]
|
||||||
</paper-button>
|
</paper-button>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
@ -116,11 +117,6 @@ Polymer({
|
|||||||
value: false,
|
value: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
submitCaption: {
|
|
||||||
type: String,
|
|
||||||
computed: 'computeSubmitCaption(stateObj)',
|
|
||||||
},
|
|
||||||
|
|
||||||
fieldInput: {
|
fieldInput: {
|
||||||
type: Object,
|
type: Object,
|
||||||
value: function () { return {}; },
|
value: function () { return {}; },
|
||||||
@ -131,10 +127,6 @@ Polymer({
|
|||||||
return stateObj.state === 'configure';
|
return stateObj.state === 'configure';
|
||||||
},
|
},
|
||||||
|
|
||||||
computeSubmitCaption: function (stateObj) {
|
|
||||||
return stateObj.attributes.submit_caption || 'Set configuration';
|
|
||||||
},
|
|
||||||
|
|
||||||
fieldChanged: function (ev) {
|
fieldChanged: function (ev) {
|
||||||
var el = ev.target;
|
var el = ev.target;
|
||||||
this.fieldInput[el.name] = el.value;
|
this.fieldInput[el.name] = el.value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user