mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
Add styling to Config Entries (#1011)
* Add some styling to Config Entries
This commit adds some styling to the (experimental) Config Entries
* re-add localization
Note: I'm having issues with localization on my current setup -- it doesn't
seem to be working for me 🤷. This commit just keeps the same localization
as there was previously, no change
* Update based on PR review
* Remove stale annotations
This commit is contained in:
parent
42f3294523
commit
399d14a5e0
@ -12,62 +12,71 @@
|
|||||||
<dom-module id="ha-config-entries">
|
<dom-module id="ha-config-entries">
|
||||||
<template>
|
<template>
|
||||||
<style include='iron-flex ha-style'>
|
<style include='iron-flex ha-style'>
|
||||||
.content {
|
paper-button {
|
||||||
padding: 8px;
|
color: var(--primary-color);
|
||||||
|
font-weight: 500;
|
||||||
|
top: 3px;
|
||||||
|
margin-right: -.57em;
|
||||||
}
|
}
|
||||||
.entries {
|
paper-card:last-child {
|
||||||
margin: 0 -4px;
|
margin-top: 12px;
|
||||||
}
|
|
||||||
.entries paper-card {
|
|
||||||
margin: 4px;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<hass-subpage title='Integrations'>
|
<hass-subpage title='Integrations'>
|
||||||
<div class='content'>
|
|
||||||
<h1>Configured</h1>
|
|
||||||
<template is='dom-if' if='[[!_entries.length]]'>
|
|
||||||
<i>Nothing configured.</i>
|
|
||||||
</template>
|
|
||||||
<div class='entries layout horizontal wrap'>
|
|
||||||
<template is='dom-repeat' items='[[_entries]]'>
|
|
||||||
<paper-card heading='[[item.title]]'>
|
|
||||||
<div class='card-content'>
|
|
||||||
Integration: [[_computeIntegrationTitle(localize, item.domain)]]<br>
|
|
||||||
State: [[item.state]]<br>
|
|
||||||
Added by: [[item.source]]
|
|
||||||
</div>
|
|
||||||
<div class="card-actions">
|
|
||||||
<paper-button on-click='_removeEntry'>Remove</paper-button>
|
|
||||||
</div>
|
|
||||||
</paper-card>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<template is='dom-if' if='[[_progress.length]]'>
|
<template is='dom-if' if='[[_progress.length]]'>
|
||||||
<h1>To be finished</h1>
|
<ha-config-section is-wide='[[isWide]]'>
|
||||||
<div class='entries layout horizontal wrap'>
|
<span slot='header'>In Progress</span>
|
||||||
|
<paper-card>
|
||||||
<template is='dom-repeat' items='[[_progress]]'>
|
<template is='dom-repeat' items='[[_progress]]'>
|
||||||
<paper-card heading='[[_computeIntegrationTitle(localize, item.domain)]]'>
|
<paper-item>
|
||||||
<div class="card-actions">
|
<paper-item-body>
|
||||||
|
[[_computeIntegrationTitle(localize, item.domain)]]
|
||||||
|
</paper-item-body>
|
||||||
<paper-button on-click='_continueFlow'>Configure</paper-button>
|
<paper-button on-click='_continueFlow'>Configure</paper-button>
|
||||||
</div>
|
</paper-item>
|
||||||
</paper-card>
|
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</paper-card>
|
||||||
|
</ha-config-section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<h1>Add integration</h1>
|
<ha-config-section is-wide='[[isWide]]'>
|
||||||
<div class='entries layout horizontal wrap'>
|
<span slot='header'>Configured</span>
|
||||||
<template is='dom-repeat' items='[[_handlers]]'>
|
<paper-card>
|
||||||
<paper-card heading='[[_computeIntegrationTitle(localize, item)]]'>
|
<template is='dom-if' if='[[!_entries.length]]'>
|
||||||
<!-- <div class="card-content">Some content</div> -->
|
<paper-item>
|
||||||
<div class="card-actions">
|
<paper-item-body>
|
||||||
<paper-button on-click='_createFlow'>Configure</paper-button>
|
Nothing configured yet
|
||||||
</div>
|
</paper-item-body>
|
||||||
</paper-card>
|
</paper-item>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
<template is='dom-repeat' items='[[_entries]]'>
|
||||||
</div>
|
<paper-item>
|
||||||
|
<paper-item-body three-line>
|
||||||
|
[[item.title]]
|
||||||
|
<div secondary>Integration: [[_computeIntegrationTitle(localize, item.domain)]]</div>
|
||||||
|
<div secondary>Added by: [[item.source]]</div>
|
||||||
|
<div secondary>State: [[item.state]]</div>
|
||||||
|
</paper-item-body>
|
||||||
|
<paper-button on-click='_removeEntry'>Remove</paper-button>
|
||||||
|
</paper-item>
|
||||||
|
</template>
|
||||||
|
</paper-card>
|
||||||
|
</ha-config-section>
|
||||||
|
|
||||||
|
<ha-config-section is-wide='[[isWide]]'>
|
||||||
|
<span slot='header'>Available</span>
|
||||||
|
<paper-card>
|
||||||
|
<template is='dom-repeat' items='[[_handlers]]'>
|
||||||
|
<paper-item>
|
||||||
|
<paper-item-body>
|
||||||
|
[[_computeIntegrationTitle(localize, item)]]
|
||||||
|
</paper-item-body>
|
||||||
|
<paper-button on-click='_createFlow'>Configure</paper-button>
|
||||||
|
</paper-item>
|
||||||
|
</template>
|
||||||
|
</paper-card>
|
||||||
|
</ha-config-section>
|
||||||
</hass-subpage>
|
</hass-subpage>
|
||||||
|
|
||||||
<ha-config-flow
|
<ha-config-flow
|
||||||
|
Loading…
x
Reference in New Issue
Block a user