diff --git a/panels/shopping-list/ha-panel-shopping-list.html b/panels/shopping-list/ha-panel-shopping-list.html index 40e6a82bc1..c33b7810b5 100644 --- a/panels/shopping-list/ha-panel-shopping-list.html +++ b/panels/shopping-list/ha-panel-shopping-list.html @@ -25,6 +25,20 @@ } paper-card { display: block; + padding-bottom: 16px; + } + .list-header { @apply --paper-font-headline; } + .list-options { + position: absolute; + top: 0; + right: 0; + color: var(--secondary-text-color); + } + .list-header paper-listbox { + width: 150px; + } + .list-header paper-item { + cursor: pointer; } paper-item { --paper-item-focused: { @@ -37,6 +51,11 @@ paper-input { width: 100%; } + .tip { + padding: 24px; + text-align: center; + color: var(--secondary-text-color); + } @@ -50,9 +69,28 @@
+
Shopping List +
+ + + + Clear completed + + +
+
+
+ Tap the microphone on the top right and say "Add candy to my shopping list" +
@@ -145,7 +186,7 @@ Polymer({ _itemCompleteTapped: function (ev) { ev.stopPropagation(); var item = ev.model.item; - this.hass.callApi('post', 'shopping_list/' + item.id, { + this.hass.callApi('post', 'shopping_list/item/' + item.id, { complete: item.complete }).catch(function () { this._fetchData(); @@ -182,7 +223,7 @@ Polymer({ } this.set(['items', index, 'name'], name); - this.hass.callApi('post', 'shopping_list/' + item.id, { + this.hass.callApi('post', 'shopping_list/item/' + item.id, { name: name }).catch(function () { this._fetchData(); @@ -200,5 +241,9 @@ Polymer({ this._cancelEditting(); } }, + + _clearCompleted: function () { + this.hass.callApi('POST', 'shopping_list/clear_completed'); + } });