Compare commits
No commits in common. "a1ecac5cb841bbd584124fc8967b67bcbdcbd376" and "9e33d3c7df8026c51df1ffa31df25379e58be734" have entirely different histories.
a1ecac5cb8
...
9e33d3c7df
|
|
@ -645,7 +645,6 @@ class CookCliCardEditor extends HTMLElement {
|
||||||
* type: custom:cookcli-checklist-card
|
* type: custom:cookcli-checklist-card
|
||||||
* storage_key: chocolat-chaud.cook:2
|
* storage_key: chocolat-chaud.cook:2
|
||||||
* items: [{ quantity: "200 ml", name: "lait" }, ...]
|
* items: [{ quantity: "200 ml", name: "lait" }, ...]
|
||||||
* title: Ingrédients # optionnel
|
|
||||||
*/
|
*/
|
||||||
class CookCliChecklistCard extends HTMLElement {
|
class CookCliChecklistCard extends HTMLElement {
|
||||||
setConfig(config) {
|
setConfig(config) {
|
||||||
|
|
@ -740,13 +739,6 @@ class CookCliChecklistCard extends HTMLElement {
|
||||||
this.shadowRoot.innerHTML = `
|
this.shadowRoot.innerHTML = `
|
||||||
<style>
|
<style>
|
||||||
ha-card { padding: 8px 16px; }
|
ha-card { padding: 8px 16px; }
|
||||||
.title {
|
|
||||||
padding: 8px 0 4px;
|
|
||||||
font-size: var(--ha-card-header-font-size, 24px);
|
|
||||||
font-weight: var(--ha-card-header-font-weight, 400);
|
|
||||||
line-height: 32px;
|
|
||||||
color: var(--ha-card-header-color, var(--primary-text-color));
|
|
||||||
}
|
|
||||||
.row {
|
.row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -779,7 +771,6 @@ class CookCliChecklistCard extends HTMLElement {
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<ha-card>
|
<ha-card>
|
||||||
${this._config.title ? `<div class="title">${this._escape(this._config.title)}</div>` : ""}
|
|
||||||
${rows}
|
${rows}
|
||||||
<button class="reset" data-reset>Tout décocher</button>
|
<button class="reset" data-reset>Tout décocher</button>
|
||||||
</ha-card>
|
</ha-card>
|
||||||
|
|
|
||||||
|
|
@ -343,7 +343,6 @@ class CookCliRecipeViewStrategy extends HTMLElement {
|
||||||
if (ingredients.length) {
|
if (ingredients.length) {
|
||||||
rightCards.push({
|
rightCards.push({
|
||||||
type: "custom:cookcli-checklist-card",
|
type: "custom:cookcli-checklist-card",
|
||||||
title: "Ingrédients",
|
|
||||||
// État coché propre à cette recette, indépendant de celui des étapes.
|
// État coché propre à cette recette, indépendant de celui des étapes.
|
||||||
storage_key: `${config.path}:summary`,
|
storage_key: `${config.path}:summary`,
|
||||||
items: ingredients.map((ingredient) => {
|
items: ingredients.map((ingredient) => {
|
||||||
|
|
@ -394,7 +393,6 @@ class CookCliRecipeViewStrategy extends HTMLElement {
|
||||||
if (stepIngredients.length) {
|
if (stepIngredients.length) {
|
||||||
leftCards.push({
|
leftCards.push({
|
||||||
type: "custom:cookcli-checklist-card",
|
type: "custom:cookcli-checklist-card",
|
||||||
title: "Ingrédients",
|
|
||||||
// recette + étape : l'état coché est propre à chaque étape de chaque recette
|
// recette + étape : l'état coché est propre à chaque étape de chaque recette
|
||||||
storage_key: `${config.path}:${tabIndex}`,
|
storage_key: `${config.path}:${tabIndex}`,
|
||||||
items: stepIngredients.map((item) => ({
|
items: stepIngredients.map((item) => ({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue