Skip to content

Commit

Permalink
update 5.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dckiller51 committed Jul 6, 2022
1 parent 648e1bc commit 7642dc3
Show file tree
Hide file tree
Showing 11 changed files with 2,883 additions and 2,848 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to this project will be documented in this file.

## v5.9.0

- add the choice of the theme of your system. (Dark or light)
- added Spanish language (thanks to @luisetex84)

## v5.8.1

- fix error report [[#28](https://github.com/dckiller51/lovelace-body-miscale-card/issues/28)]
Expand Down
363 changes: 185 additions & 178 deletions dist/body-miscale-card.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/body-miscale-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class BodyMiScaleCard extends LitElement implements LovelaceCard {
? `background-image: url('${config.image}'); color: white; text-shadow: 0 0 10px black;`
: '',
icon: `color: ${config.image ? 'white' : 'var(--paper-item-icon-color)'};`,
iconbody: `background-color: white;`,
iconbody: `background-color: ${config.theme !== false ? 'var(--paper-item-icon-color)' : 'white'};`,
content: `padding: ${config.name !== false ? '8px' : '16px'} ${config.buttons !== false ? '8px' : '16px'};`,
},
};
Expand Down
2 changes: 1 addition & 1 deletion src/const.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { localize } from './localize/localize';

export const CARD_VERSION = '5.8.1';
export const CARD_VERSION = '5.9.0';

export const states = {
status: {
Expand Down
46 changes: 30 additions & 16 deletions src/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,21 @@ export class BoilerplateCardEditor extends ScopedRegistryHost(LitElement) implem
return this._config?.image || '';
}

get _model() {
get _model(): boolean {
return this._config?.model || false;
}

get _unit() {
get _unit(): boolean {
return this._config?.unit || false;
}

get _theme(): boolean {
return this._config?.theme || false;
}

get _show_name(): boolean {
return this._config?.show_name || false;
}
}

get _show_states(): boolean {
return this._config?.show_states || false;
Expand Down Expand Up @@ -98,9 +102,9 @@ export class BoilerplateCardEditor extends ScopedRegistryHost(LitElement) implem

return html`
<div class="card-config">
<strong>
<p>
${localize('editor.code_information')}
</strong>
</p>
<mwc-select
naturalMenuWidth
Expand Down Expand Up @@ -148,9 +152,21 @@ export class BoilerplateCardEditor extends ScopedRegistryHost(LitElement) implem
></mwc-switch>
</mwc-formfield>
<strong style="font-size: large; line-height: 200%;">
${localize('editor.theme')}<br>
<mwc-formfield class="option" .label=${localize(this._theme
? 'editor.theme_aria_label_off'
: 'editor.theme_aria_label_on'
)}>
<mwc-switch
.checked=${this._theme !== false}
.configValue=${'theme'}
@change=${this._valueChanged}
></mwc-switch>
</mwc-formfield>
<p style="font-size: large; line-height: 200%;">
<U>${localize('editor.header_options')}</U>
</strong><br>
</p><br>
${localize('editor.show_name')}<br>
<mwc-formfield class="option" .label=${localize(this._show_name
Expand Down Expand Up @@ -188,9 +204,9 @@ export class BoilerplateCardEditor extends ScopedRegistryHost(LitElement) implem
></mwc-switch>
</mwc-formfield>
<strong style="font-size: large; line-height: 200%;">
<p style="font-size: large; line-height: 200%;">
<U>${localize('editor.body_options')}</U>
</strong><br>
</p><br>
${localize('editor.show_toolbar')}<br>
<mwc-formfield class="option" .label=${localize(this._show_toolbar
Expand All @@ -204,12 +220,10 @@ export class BoilerplateCardEditor extends ScopedRegistryHost(LitElement) implem
></mwc-switch>
</mwc-formfield>
<strong style="padding:0 0 0 45px">
<div style="padding:0 0 0 45px">
${localize('editor.show_body')}<br>
</strong>
<strong style="padding:0 0 0 45px">
${localize('editor.show_body1')}<br>
</strong>
</div>
<mwc-formfield class="option" style="padding:0 0 0 45px" .label=${localize(this._show_body
? 'editor.show_body_aria_label_off'
: 'editor.show_body_aria_label_on'
Expand All @@ -221,9 +235,9 @@ export class BoilerplateCardEditor extends ScopedRegistryHost(LitElement) implem
></mwc-switch>
</mwc-formfield>
<strong style="padding:0 0 0 45px">
${localize('editor.show_buttons')}<br>
</strong>
<div style="padding:0 0 0 45px">
${localize('editor.show_buttons')}<br>
</div>
<mwc-formfield class="option" style="padding:0 0 0 45px" .label=${localize(this._show_buttons
? 'editor.show_buttons_aria_label_off'
: 'editor.show_buttons_aria_label_on'
Expand Down
3 changes: 3 additions & 0 deletions src/localize/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
"unit": "Convert kg to lbs",
"unit_aria_label_on": "Toggle the conversion on",
"unit_aria_label_off": "Toggle the conversion off",
"theme": "Configure the theme you use.",
"theme_aria_label_on": "Toggle theme light on",
"theme_aria_label_off": "Toggle theme dark off",
"show_name": "Show the name of the account as title?",
"show_name_aria_label_on": "Toggle display name on",
"show_name_aria_label_off": "Toggle display name off",
Expand Down
113 changes: 113 additions & 0 deletions src/localize/languages/es.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
"common": {
"version": "Versión",
"name": "Tarjeta BodyMiScale",
"description": "La tarjeta bodymiscale muestra el estado de tu cuerpo en relación a tu peso.",
"not_available": "BodyMiScale no está disponible",
"toggle_power": "Mostrar / ocultar más detalles como IMC,kCal"
},
"states": {
"ok": "MEDICIÓN: OK",
"unknown": "ESTADO: desconocido",
"problem": "Problema",
"none": "Ninguno",
"weight unavailable": "Peso no disponible",
"impedance unavailable": "Impedancia no disponible",
"weight unavailable, impedance unavailable": "Peso no disponible, impedancia no disponible",
"weight low": "Peso bajo",
"impedance low": "Impedancia baja",
"weight low, impedance low": "Peso bajo, impedancia baja",
"weight high": "Peso alto",
"impedance high": "Impedancia alta",
"weight high, impedance high": "Peso alto, impedancia alta",
"weight high, impedance low": "Peso alto, impedancia baja",
"weight low, impedance high": "Peso bajo, impedancia alta"
},
"attributes": {
"weight: ": "Peso: ",
"impedance: ": "Impedancia: ",
"height: ": "Altura: ",
"age: ": "Edad: ",
"gender: ": "Sexo: "
},
"attributes_value": {
"male": "masculino",
"female": "femenino",
"unavailable": "no disponible"
},
"body": {
"bmi": "IMC",
"bmi_label": "Etiqueta IMC",
"visceral_fat": "Grasa visceral",
"body_fat": "Grasa corporal",
"protein": "Proteína",
"water": "Agua",
"muscle_mass": "Masa muscular",
"bone_mass": "Masa ósea",
"weight": "Peso",
"ideal": "Ideal",
"basal_metabolism": "Metabolismo basal",
"body_type": "Tipo de cuerpo",
"metabolic_age": "Edad metabólica"
},
"body_value": {
"Skinny": "Flaco",
"Balanced-skinny": "Flaco equilibrado",
"Skinny-muscular": "Flaco musculoso",
"Balanced": "Equilibrado",
"Balanced-muscular": "Musculuso equilibrado",
"Lack-exercise": "Falto de ejercicio",
"Thick-set": "Rechoncho",
"Obese": "Obeso",
"Overweight": "Sobrepeso",
"Underweight": "Por debajo del peso normal",
"Normal or Healthy Weight": "Normal",
"Slight overweight": "Ligero sobrepeso",
"Moderate obesity": "Obesidad moderada",
"Severe obesity": "Obesidad severa",
"Massive obesity": "Obesidad masiva",
"unavailable": "no disponible"
},
"unit": {
" years": " años"
},
"error": {
"missing_entity": "Por favor, defina una entidad.",
"missing_entity_bodymiscale": "Por favor, defina una entidad bodymiscale."
},
"editor": {
"entity": "Por favor, escoja una cuenta de la bácula (necesario)!",
"image": "Imagen de fondo (opcional)",
"model": "ACTIVAR si la báscula tiene 4 círculos grises de 5 cm Ø en la parte superior",
"model1": "( = modelo 181B)!",
"model_aria_label_on": "Mostrar modelo con impedancia",
"model_aria_label_off": "Ocultar modelo con impedancia",
"unit": "Convertir kg a lbs",
"unit_aria_label_on": "Activar conversión",
"unit_aria_label_off": "Desactivar conversión",
"show_name": "¿Mostrar el nombre de la cuenta como título?",
"show_name_aria_label_on": "Mostrar nombre como título",
"show_name_aria_label_off": "Ocultar nombre como título",
"show_states": "¿Mostrar estado de la báscula?",
"show_states_aria_label_on": "Mostrar estado de la báscula",
"show_states_aria_label_off": "Ocultar estado de la báscula",
"show_attributes": "¿Mostrar datos de perfil personal (esquina superior derecha)?",
"show_attributes_aria_label_on": "Mostrar atributos",
"show_attributes_aria_label_off": "Ocultar atributos",
"show_toolbar": "¿Mostrar opciones avanzadas?",
"show_toolbar_aria_label_on": "Mostrar opciones avanzadas",
"show_toolbar_aria_label_off": "Ocultar opciones avanzadas",
"show_body": "Mostrar más detalles de la medición",
"show_body1": "¿(parte inferior - pulsar en la fecha para mostrar)?",
"show_body_aria_label_on": "Mostrar puntuación corporal",
"show_body_aria_label_off": "Ocultar puntuación corporal",
"show_buttons": "¿Permitir cambio de cuenta?",
"show_buttons_aria_label_on": "Mostrar botones de cuenta",
"show_buttons_aria_label_off": "Ocultar botones de cuenta",
"code_information": "LOS CAMBIOS SÓLO APARECERÁN DESPUÉS DE QUE HAYAN SIDO GUARDADOS.",
"header_options": "1. Opciones de cabecera de tarjeta",
"body_options": "2. Más opciones de tarjeta",
"warning": "ATENCIÓN:",
"code_only_note": "Opciones adicionales sólo están disponibles en el editor de código."
}
}
3 changes: 3 additions & 0 deletions src/localize/languages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
"unit": "Convertir les kg en lbs",
"unit_aria_label_on": "Activer la conversion",
"unit_aria_label_off": "Désactiver la conversion",
"theme": "Configurer le thème que vous utilisez.",
"theme_aria_label_on": "Activer thème clair",
"theme_aria_label_off": "Désactiver thème sombre",
"show_name": "Afficher le nom du compte comme titre ?",
"show_name_aria_label_on": "Activer affichage du nom",
"show_name_aria_label_off": "Désactiver affichage du nom",
Expand Down
2 changes: 2 additions & 0 deletions src/localize/localize.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as cs from './languages/cs.json';
import * as de from './languages/de.json';
import * as en from './languages/en.json';
import * as es from './languages/es.json';
import * as fr from './languages/fr.json';
import * as it from './languages/it.json';
import * as nl from './languages/nl.json';
Expand All @@ -14,6 +15,7 @@ const languages: any = {
cs: cs,
de: de,
en: en,
es: es,
fr: fr,
it: it,
nl: nl,
Expand Down
4 changes: 2 additions & 2 deletions tracker.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"body-miscale-card": {
"updated_at": "2022-04-18",
"version": "v5.8.1",
"updated_at": "2022-07-06",
"version": "v5.9.0",
"remote_location": "https://raw.githubusercontent.com/dckiller51/lovelace-body-miscale-card/master/dist/body-miscale-card.js",
"visit_repo": "https://github.com/dckiller51/lovelace-body-miscale-card",
"changelog": "https://github.com/dckiller51/lovelace-body-miscale-card/blob/master/CHANGELOG.md"
Expand Down
Loading

0 comments on commit 7642dc3

Please sign in to comment.