From 2e5e0b43159fffa922488bd252f5e0f91943492a Mon Sep 17 00:00:00 2001 From: idaho <664101+idaho@users.noreply.github.com> Date: Wed, 13 Dec 2023 21:34:56 +0100 Subject: [PATCH] fix: add full_size option to readme and visual editor (#107) --- README.md | 1 + src/cards/trash-card/trash-card-editor.ts | 4 +++- src/translations/de.json | 3 ++- src/translations/en.json | 3 ++- src/translations/fr.json | 3 ++- src/translations/sk.json | 3 ++- 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4444b53..4d32b7d 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ All the options are available in the lovelace editor but you can use `yaml` if y | `entity` | string | Required | Entity | | `layout` | string | Optional | Layout of the card. Vertical, horizontal and default layout are supported | | `fill_container` | boolean | `false` | Fill container or not. Useful when card is in a grid, vertical or horizontal layout | +| `full_size` | boolean | `false` | Show the card without the default card margins | | `next_days` | number | 2 | How many times the card will look into the future to find the next event | | `settings` | [Settings](#settings) | Required | Settings to detect the kind of trash and how to display | diff --git a/src/cards/trash-card/trash-card-editor.ts b/src/cards/trash-card/trash-card-editor.ts index 17289c1..4c6db21 100644 --- a/src/cards/trash-card/trash-card-editor.ts +++ b/src/cards/trash-card/trash-card-editor.ts @@ -39,7 +39,8 @@ const TRASH_LABELS = new Set([ // eslint-disable-next-line @typescript-eslint/naming-convention const OTHER_LABELS = new Set([ - 'next_days' + 'next_days', + 'full_size' ]); // eslint-disable-next-line @typescript-eslint/naming-convention @@ -142,6 +143,7 @@ const SCHEMA: HaFormSchema[] = [ // eslint-disable-next-line @typescript-eslint/naming-convention { name: 'layout', selector: { mush_layout: {}}}, { name: 'fill_container', selector: { boolean: {}}}, + { name: 'full_size', selector: { boolean: {}}}, { name: 'next_days', selector: { number: { min: 1, diff --git a/src/translations/de.json b/src/translations/de.json index 21bd02f..f0128c2 100644 --- a/src/translations/de.json +++ b/src/translations/de.json @@ -19,7 +19,8 @@ "icon_color": "Icon-Farbe", "layout": "Layout", "fill_container": "Container ausfüllen", - "next_days": "Tage in der Zukunft" + "next_days": "Tage in der Zukunft", + "full_size": "Karte ohne Seitenrand" }, "trash": { "organic": { diff --git a/src/translations/en.json b/src/translations/en.json index 6a79bea..02a0d57 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -19,7 +19,8 @@ "icon_color": "Icon color", "layout": "Layout", "fill_container": "Fill container", - "next_days": "Days in the future" + "next_days": "Days in the future", + "full_size": "Card without margin" }, "trash": { "organic": { diff --git a/src/translations/fr.json b/src/translations/fr.json index 0bb06e1..45cac38 100644 --- a/src/translations/fr.json +++ b/src/translations/fr.json @@ -19,7 +19,8 @@ "icon_color": "Couleur de l'icône", "layout": "Disposition", "fill_container": "Remplir le conteneur", - "next_days": "Jours dans le futur" + "next_days": "Jours dans le futur", + "full_size": "Carte sans marge" }, "trash": { "organic": { diff --git a/src/translations/sk.json b/src/translations/sk.json index 6197b5b..437c06d 100644 --- a/src/translations/sk.json +++ b/src/translations/sk.json @@ -19,7 +19,8 @@ "icon_color": "Farba ikony", "layout": "Rozloženie", "fill_container": "Naplňte nádobu", - "next_days": "Dni v budúcnosti" + "next_days": "Dni v budúcnosti", + "full_size": "Karta bez marže" }, "trash": { "organic": {