From 4417680f1a112aae49c7fad21798e62bebf245a7 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 4 Nov 2022 00:52:12 +0000 Subject: [PATCH] Fix panel mode. --- dist/bom-radar-card.js | 2 +- hacs.json | 3 ++- src/bom-radar-card.ts | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dist/bom-radar-card.js b/dist/bom-radar-card.js index 742f983..ca16e2c 100644 --- a/dist/bom-radar-card.js +++ b/dist/bom-radar-card.js @@ -1329,7 +1329,7 @@ const Wn=c`.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relativ flex: 1; padding-right: 4px; } - `,n([se({attribute:!1})],Gn.prototype,"hass",void 0),n([ce()],Gn.prototype,"_config",void 0),n([ce()],Gn.prototype,"_helpers",void 0),Gn=n([de("bom-radar-card-editor")],Gn);var qn={version:"Version",invalid_configuration:"Invalid configuration",show_warning:"Show Warning"},Yn={common:qn},Kn={version:"Versjon",invalid_configuration:"Ikke gyldig konfiguration",show_warning:"Vis advarsel"},Zn={common:Kn};const Qn={en:Object.freeze({__proto__:null,common:qn,default:Yn}),nb:Object.freeze({__proto__:null,common:Kn,default:Zn})};function Jn(e,t="",i=""){const n=(localStorage.getItem("selectedLanguage")||"en").replace(/['"]+/g,"").replace("-","_");let r;try{r=e.split(".").reduce(((e,t)=>e[t]),Qn[n])}catch(t){r=e.split(".").reduce(((e,t)=>e[t]),Qn.en)}return void 0===r&&(r=e.split(".").reduce(((e,t)=>e[t]),Qn.en)),""!==t&&""!==i&&(r=r.replace(t,i)),r}console.info(`%c BOM-RADAR-CARD \n%c ${Jn("common.version")} 2.1.0 `,"color: orange; font-weight: bold; background: black","color: white; font-weight: bold; background: dimgray"),window.customCards=window.customCards||[],window.customCards.push({type:"bom-radar-card",name:"BoM Radar Card",description:"A rain radar card using the new tiled images from the Australian BoM"});let er=class extends ae{constructor(){super(...arguments),this.isPanel=!1}static async getConfigElement(){return document.createElement("bom-radar-card-editor")}static getStubConfig(){return{}}setConfig(e){this._config=e}getCardSize(){return 10}shouldUpdate(){return!0}render(){if(this._config.show_warning)return this.showWarning(Jn("common.show_warning"));const e=`\n \n \n \n BOM Radar Card\n \n \n \n \n