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]]'>
|
||||
[[stateObj.attributes.description]]
|
||||
<a
|
||||
hidden$='[[!stateObj.attributes.link_url]]'
|
||||
href='[[stateObj.attributes.link_url]]'
|
||||
target='_blank'
|
||||
>
|
||||
[[stateObj.attributes.link_name]]
|
||||
</a>
|
||||
<p hidden$='[[!stateObj.attributes.link_url]]'>
|
||||
<a
|
||||
href='[[stateObj.attributes.link_url]]'
|
||||
target='_blank'
|
||||
>
|
||||
[[stateObj.attributes.link_name]]
|
||||
</a>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<p class='error' hidden$='[[!stateObj.attributes.errors]]'>
|
||||
@ -72,7 +73,7 @@
|
||||
></paper-input>
|
||||
</template>
|
||||
|
||||
<p class='submit'>
|
||||
<p class='submit' hidden$='[[!stateObj.attributes.submit_caption]]'>
|
||||
<paper-button
|
||||
raised
|
||||
disabled='[[isConfiguring]]'
|
||||
@ -82,7 +83,7 @@
|
||||
active='[[isConfiguring]]'
|
||||
hidden='[[!isConfiguring]]'
|
||||
alt='Configuring'></paper-spinner>
|
||||
[[submitCaption]]
|
||||
[[stateObj.attributes.submit_caption]]
|
||||
</paper-button>
|
||||
|
||||
</p>
|
||||
@ -116,11 +117,6 @@ Polymer({
|
||||
value: false,
|
||||
},
|
||||
|
||||
submitCaption: {
|
||||
type: String,
|
||||
computed: 'computeSubmitCaption(stateObj)',
|
||||
},
|
||||
|
||||
fieldInput: {
|
||||
type: Object,
|
||||
value: function () { return {}; },
|
||||
@ -131,10 +127,6 @@ Polymer({
|
||||
return stateObj.state === 'configure';
|
||||
},
|
||||
|
||||
computeSubmitCaption: function (stateObj) {
|
||||
return stateObj.attributes.submit_caption || 'Set configuration';
|
||||
},
|
||||
|
||||
fieldChanged: function (ev) {
|
||||
var el = ev.target;
|
||||
this.fieldInput[el.name] = el.value;
|
||||
|
Loading…
x
Reference in New Issue
Block a user