mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-03 21:28:59 +00:00
fix: keep decor downscale action available
Issue: #427 User-Visible: yes
This commit is contained in:
@@ -1,125 +1,125 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fingerprint": "b69bdfe3df225cf1b96fea0159a03a620e38cb94ec6106f9ee3b0e57cdefd183",
|
||||
"fingerprint": "cfbfe510d0898a501060f644db55c8c884e95a72e40d98716de05df63a66dc17",
|
||||
"entry": "houseplan-card.js",
|
||||
"initialViewFiles": [
|
||||
"houseplan-assets/houseplan-card-CxS6HLVV.js",
|
||||
"houseplan-assets/houseplan-card-D_n3AgaN.js",
|
||||
"houseplan-card.js"
|
||||
],
|
||||
"initialViewGzipBytes": 290942,
|
||||
"initialViewGzipBytes": 290950,
|
||||
"lazyFiles": [
|
||||
"houseplan-assets/backdrop-pick-I85bKcdl.js",
|
||||
"houseplan-assets/de-CDRfP4mw.js",
|
||||
"houseplan-assets/editor-Bze_fgW0.js",
|
||||
"houseplan-assets/fr-B64rhazj.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-X23eakN9.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-C3A8efgN.js"
|
||||
"houseplan-assets/backdrop-pick-CXBNIJbr.js",
|
||||
"houseplan-assets/de-DQual6Kp.js",
|
||||
"houseplan-assets/editor-9GYON2-E.js",
|
||||
"houseplan-assets/fr-jAhvVsg_.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-oFEwsnfR.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-B21xb3Em.js"
|
||||
],
|
||||
"lazyGzipBytes": 215441,
|
||||
"lazyGzipBytes": 215461,
|
||||
"lazyEditorFiles": [
|
||||
"houseplan-assets/backdrop-pick-I85bKcdl.js",
|
||||
"houseplan-assets/editor-Bze_fgW0.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-X23eakN9.js"
|
||||
"houseplan-assets/backdrop-pick-CXBNIJbr.js",
|
||||
"houseplan-assets/editor-9GYON2-E.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-oFEwsnfR.js"
|
||||
],
|
||||
"lazyEditorGzipBytes": 159770,
|
||||
"lazyEditorGzipBytes": 159773,
|
||||
"lazyOnboardingFiles": [
|
||||
"houseplan-assets/backdrop-pick-I85bKcdl.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-C3A8efgN.js"
|
||||
"houseplan-assets/backdrop-pick-CXBNIJbr.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-B21xb3Em.js"
|
||||
],
|
||||
"lazyOnboardingGzipBytes": 14129,
|
||||
"lazyOnboardingGzipBytes": 14131,
|
||||
"lazyLocaleFiles": [
|
||||
"houseplan-assets/de-CDRfP4mw.js",
|
||||
"houseplan-assets/fr-B64rhazj.js"
|
||||
"houseplan-assets/de-DQual6Kp.js",
|
||||
"houseplan-assets/fr-jAhvVsg_.js"
|
||||
],
|
||||
"lazyLocaleGzipBytes": 48717,
|
||||
"lazyLocaleGzipBytes": 48733,
|
||||
"files": [
|
||||
{
|
||||
"path": "houseplan-assets/backdrop-pick-I85bKcdl.js",
|
||||
"sha256": "7becca609cbb95b1ba278743fce5b3e93c7adf8a7bd9107783931f29279ac5df",
|
||||
"rawBytes": 20974,
|
||||
"gzipBytes": 7175,
|
||||
"path": "houseplan-assets/backdrop-pick-CXBNIJbr.js",
|
||||
"sha256": "1f4f4b3dddd1727c8e8b18f652e2a5a298640b95e842ffa1b59d3c992196153f",
|
||||
"rawBytes": 20996,
|
||||
"gzipBytes": 7176,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-CxS6HLVV.js"
|
||||
"houseplan-assets/houseplan-card-D_n3AgaN.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/de-CDRfP4mw.js",
|
||||
"sha256": "2f90acc29e659e771dea42290b74ceb54d8ab9a7fae9cfdbd7ce6bc4bda0b70b",
|
||||
"path": "houseplan-assets/de-DQual6Kp.js",
|
||||
"sha256": "0dfde1a5371337cc97c482475f04163d9f38ebf5b10f67253d0ddb153f3150c5",
|
||||
"rawBytes": 81632,
|
||||
"gzipBytes": 24630,
|
||||
"gzipBytes": 24638,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/editor-Bze_fgW0.js",
|
||||
"sha256": "2e2513efca4fa8d9019c3601693fb3ff3b9e050ba3fe054b190f81d286540dda",
|
||||
"path": "houseplan-assets/editor-9GYON2-E.js",
|
||||
"sha256": "e238f6e60c5a599796f33eb4905e8745662da09c4ec6c0bf8c03dd9817aa40dd",
|
||||
"rawBytes": 3826,
|
||||
"gzipBytes": 1580,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-CxS6HLVV.js"
|
||||
"houseplan-assets/houseplan-card-D_n3AgaN.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/fr-B64rhazj.js",
|
||||
"sha256": "6a1a18220938a8d4631586a9dc7f8ef8243b77a23089777d0917975300960a82",
|
||||
"path": "houseplan-assets/fr-jAhvVsg_.js",
|
||||
"sha256": "5aa1b8e8e883a319aaa8a3fbbdff3a385b6f9897e1bd04231009e3b78c39d693",
|
||||
"rawBytes": 83754,
|
||||
"gzipBytes": 24087,
|
||||
"gzipBytes": 24095,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-card-CxS6HLVV.js",
|
||||
"sha256": "1607bc6eeb275b340391ff10bdb7c2c5f62e59d5d2a43adbdb412698a0a024d1",
|
||||
"path": "houseplan-assets/houseplan-card-D_n3AgaN.js",
|
||||
"sha256": "d4c5e737a971cc8296394ed0ef85a8387d3e77195263f66196638b96eb3f2833",
|
||||
"rawBytes": 1032923,
|
||||
"gzipBytes": 290148,
|
||||
"gzipBytes": 290155,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/de-CDRfP4mw.js",
|
||||
"houseplan-assets/editor-Bze_fgW0.js",
|
||||
"houseplan-assets/fr-B64rhazj.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-X23eakN9.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-C3A8efgN.js"
|
||||
"houseplan-assets/de-DQual6Kp.js",
|
||||
"houseplan-assets/editor-9GYON2-E.js",
|
||||
"houseplan-assets/fr-jAhvVsg_.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-oFEwsnfR.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-B21xb3Em.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-X23eakN9.js",
|
||||
"sha256": "53f256fffc8e6f02618e56dbf56f25258356c2ca221ee9918ccbc57d9e590f6b",
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-oFEwsnfR.js",
|
||||
"sha256": "82a25a6e97f7bab1e93ea6f8617e6932a76ff51fdb20cf569357ee4786c4f316",
|
||||
"rawBytes": 575918,
|
||||
"gzipBytes": 151015,
|
||||
"gzipBytes": 151017,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-I85bKcdl.js",
|
||||
"houseplan-assets/houseplan-card-CxS6HLVV.js"
|
||||
"houseplan-assets/backdrop-pick-CXBNIJbr.js",
|
||||
"houseplan-assets/houseplan-card-D_n3AgaN.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-C3A8efgN.js",
|
||||
"sha256": "a5433ef2715f424016b31a2ae3c3c30f2cff05549230fd0ab16db3159834de3f",
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-B21xb3Em.js",
|
||||
"sha256": "ad013f565d0a364dafac7e27dea593179cf22fd50697f108aa5cfb049d4ef75b",
|
||||
"rawBytes": 28088,
|
||||
"gzipBytes": 6954,
|
||||
"gzipBytes": 6955,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-I85bKcdl.js",
|
||||
"houseplan-assets/houseplan-card-CxS6HLVV.js"
|
||||
"houseplan-assets/backdrop-pick-CXBNIJbr.js",
|
||||
"houseplan-assets/houseplan-card-D_n3AgaN.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-card.js",
|
||||
"sha256": "f9d93e5aa355fc91dc8fad57e7669a0ac663e8b538f42ea671a1a319fe214c3e",
|
||||
"sha256": "d21d311123d5faf9d1833afe4b69aa8d6295eaa358dbd6cdbb8cf8d364960b02",
|
||||
"rawBytes": 1183,
|
||||
"gzipBytes": 794,
|
||||
"gzipBytes": 795,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-CxS6HLVV.js"
|
||||
"houseplan-assets/houseplan-card-D_n3AgaN.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
}
|
||||
|
||||
+11
-10
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b69bdfe3df225cf1b96fea0159a03a620e38cb94ec6106f9ee3b0e57cdefd183";import{b as e,l as o,t,dg as s,A as a,dh as i,di as l,dj as n,E as r,c}from"./houseplan-card-CxS6HLVV.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},f=this._schema,_=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="cfbfe510d0898a501060f644db55c8c884e95a72e40d98716de05df63a66dc17";import{b as e,l as o,t,dg as s,A as a,dh as i,di as l,dj as n,E as r,c}from"./houseplan-card-D_n3AgaN.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},f=this._schema,_=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
|
||||
.hass=${this.hass}
|
||||
.data=${this._formData}
|
||||
.schema=${e}
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+3
-3
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b69bdfe3df225cf1b96fea0159a03a620e38cb94ec6106f9ee3b0e57cdefd183";import{l as t,aE as s,A as e,t as o,c as a,c4 as l,c5 as i,c6 as h,c7 as c,aB as n,c8 as r,cd as p,c9 as d,ca as _,cb as u,cc as g,d5 as m,aA as b,aC as $,d6 as v}from"./houseplan-card-CxS6HLVV.js";import{i as f,c as y,e as w,r as D,a as k,b as S,s as C,t as M}from"./backdrop-pick-I85bKcdl.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="b69bdfe3df225cf1b96fea0159a03a620e38cb94ec6106f9ee3b0e57cdefd183";class L{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?a`<hp-help data-help-key=${l}
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="cfbfe510d0898a501060f644db55c8c884e95a72e40d98716de05df63a66dc17";import{l as t,aE as s,A as e,t as o,c as a,c4 as l,c5 as i,c6 as h,c7 as c,aB as n,c8 as r,cd as p,c9 as d,ca as _,cb as u,cc as g,d5 as m,aA as b,aC as $,d6 as v}from"./houseplan-card-D_n3AgaN.js";import{i as f,c as y,e as w,r as D,a as k,b as S,s as C,t as M}from"./backdrop-pick-CXBNIJbr.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="cfbfe510d0898a501060f644db55c8c884e95a72e40d98716de05df63a66dc17";class L{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?a`<hp-help data-help-key=${l}
|
||||
.text=${o(h,l)} .ariaLabel=${o(h,i)}></hp-help>`:e}_openSpaceDialog(t,s){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===t){const e=this.host._serverCfg.spaces.find(t=>t.id===s);if(!e)return;const o=l(e),a=e.settings?.custom_fill&&"object"==typeof e.settings.custom_fill?i(e.settings.custom_fill):null,p="none"===o.fill?{...a||h,a:0}:a;return void(this.host._spaceDialog={mode:t,spaceId:s,title:e.title,planUrl:e.plan_url||null,planFile:null,source:e.plan_url?"file":"draw",showBorders:o.showBorders,showNames:o.showNames,zeroWallStyle:r(e),displayTouched:!0,hideDecor:o.hideDecor,hideOpenings:o.hideOpenings,roomColor:o.color,roomOpacity:o.opacity,fillMode:"none"===o.fill?"custom":o.fill,customFill:p,glowEnabled:o.glow,bgColor:o.bgColor,bgMode:"static"===e.settings?.bg_mode||"daynight"===e.settings?.bg_mode?e.settings.bg_mode:null,northDeg:n({},e.settings),sunRays:"boolean"==typeof e.settings?.sun_rays?e.settings.sun_rays:null,tempMin:o.tempMin,tempMax:o.tempMax,showLqi:o.showLqi??this.host._config?.show_signal??!0,cardFontScale:o.cardFontScale,labelTemp:o.labelTemp,labelHum:o.labelHum,labelLqi:o.labelLqi,labelLight:o.labelLight,cellCm:Number(e.cell_cm)>0?Number(e.cell_cm):5,cellCmInput:c(Number(e.cell_cm)>0?Number(e.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const e=p(this.host._imperial);this.host._spaceDialog={mode:t,title:"",planUrl:null,planFile:null,...f(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:g,roomOpacity:u,fillMode:"custom",customFill:{...h,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:_,tempMax:d,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:e,cellCmInput:c(e,this.host._imperial),cellCmTouched:!1,busy:!1}}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const o=await y(e);if("reject"===o.kind)return void this.host._showToast(this.host._t("toast.plan_formats"));if("guard"===o.kind)return void(this.host._backdropGuard=o.state);const a=await w(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return D(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??e}_useServerPlan(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,planUrl:t,planFile:null,pickSaved:!1,savedAspect:void 0},this.host._aspectJob=this._readPlanAspect(t))}async _readPlanAspect(t){for(let s=0;s<40;s++){const s=this.host._display(t);if(s){const e=await new Promise(t=>{const e=new Image;e.onload=()=>t(e.naturalWidth&&e.naturalHeight?e.naturalWidth/e.naturalHeight:0),e.onerror=()=>t(0),e.src=s}),o=this.host._spaceDialog;return o&&o.planUrl===t&&Number.isFinite(e)&&e>0?(this.host._spaceDialog={...o,savedAspect:e},e):0}if(await new Promise(t=>setTimeout(t,150)),this.host._spaceDialog?.planUrl!==t)return 0}return 0}async _deleteServerPlan(t){const s=this.host._spaceDialog,e=s?.saved?.find(s=>s.name===t);if(!s||!e||e.used_by.length||e.url===s.planUrl)return;const o=await this.host._confirmDanger({key:"delete-plan",kind:"destructive",title:this.host._t("confirm.delete_plan_title"),message:this.host._t("confirm.delete_plan_body"),objectName:t,confirmLabel:this.host._t("btn.delete"),cancelLabel:this.host._t("btn.cancel")}),a=this.host._spaceDialog,l=a?.saved?.find(s=>s.name===t);if(o&&a&&l&&l.url===e.url&&l.modified===e.modified&&!l.used_by.length&&l.url!==a.planUrl)try{await this.host.hass.callWS({type:"houseplan/plans/delete",name:t});const s=this.host._spaceDialog;s?.saved&&(this.host._spaceDialog={...s,saved:s.saved.filter(s=>s.name!==t)})}catch(t){this.host._showToast(this.host._t("toast.plan_delete_failed",{err:this.host._errText(t)}))}}_renderServerPlans(t){if(t.savedBusy)return a`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return a`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return a`<div class="savedplans">
|
||||
${s.map(s=>{return a`
|
||||
<div class="savedplan ${s.url===t.planUrl?"cur":""}">
|
||||
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b69bdfe3df225cf1b96fea0159a03a620e38cb94ec6106f9ee3b0e57cdefd183";try{await import("./houseplan-assets/houseplan-card-CxS6HLVV.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":l.startsWith("fr")?"House Plan a été mis à jour — veuillez recharger la page (Ctrl+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale entry: the main chunk is unavailable",e)}
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="cfbfe510d0898a501060f644db55c8c884e95a72e40d98716de05df63a66dc17";try{await import("./houseplan-assets/houseplan-card-D_n3AgaN.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":l.startsWith("fr")?"House Plan a été mis à jour — veuillez recharger la page (Ctrl+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale entry: the main chunk is unavailable",e)}
|
||||
|
||||
@@ -110,6 +110,51 @@ const out = await page.evaluate(async () => {
|
||||
out.reducedTo4096 = reducedDims[0] === 4096 && reducedDims[1] === 4096;
|
||||
card._spaceDialog = { ...card._spaceDialog, planFile: null };
|
||||
|
||||
// ── #427: decor source >2 MiB can still choose a reduced copy ───────────
|
||||
// The canonical asset limit forbids only the original. Trailing bytes make
|
||||
// this valid JPEG exceed the source limit without another huge allocation;
|
||||
// Chromium deliberately ignores data after JPEG EOI while decoding.
|
||||
const decorBigFile = new File([
|
||||
bigBlob, new Uint8Array(2 * 1024 * 1024 + 1),
|
||||
], 'decor-large.jpg', { type: 'image/jpeg' });
|
||||
const realUploadDecorImage = card._editorRuntime._uploadDecorImage;
|
||||
let decorUpload = null;
|
||||
card._editorRuntime._uploadDecorImage = async (blob, name, replace) => {
|
||||
decorUpload = { blob, name, replace };
|
||||
};
|
||||
await card._editorRuntime._decorImageUpload({
|
||||
target: { files: [decorBigFile], value: 'x' },
|
||||
});
|
||||
await waitFor(() => !!card._backdropGuard); await card.updateComplete;
|
||||
const decorButtons = guardButtons();
|
||||
out.decorOversizeOffersReducedWithoutOriginal = decorButtons.length === 2
|
||||
&& decorButtons.some((button) => button.textContent.includes(card._t('btn.cancel')))
|
||||
&& decorButtons.some((button) => button.textContent.includes(card._t('backdrop.use_downscaled')))
|
||||
&& !decorButtons.some((button) => button.textContent.includes(card._t('backdrop.keep_original')));
|
||||
decorButtons.find((button) => button.textContent.includes(
|
||||
card._t('backdrop.use_downscaled'),
|
||||
))?.click();
|
||||
out.decorOversizeUploadsReducedCopy = await waitFor(() => !!decorUpload
|
||||
&& !card._backdropGuard, 15000)
|
||||
&& decorUpload.blob !== decorBigFile
|
||||
&& decorUpload.blob.size < decorBigFile.size
|
||||
&& /-reduced\.jpg$/.test(decorUpload.name)
|
||||
&& decorUpload.replace === false;
|
||||
card._editorRuntime._uploadDecorImage = realUploadDecorImage;
|
||||
|
||||
await card._editorRuntime._decorImageUpload({
|
||||
target: {
|
||||
files: [fileOf(pngHeader(20000, 20000), 'decor-hard.png', 'image/png')],
|
||||
value: 'x',
|
||||
},
|
||||
});
|
||||
await waitFor(() => !!card._backdropGuard); await card.updateComplete;
|
||||
const decorHardButtons = guardButtons();
|
||||
out.decorHardStillHasOnlyCancel = decorHardButtons.length === 1
|
||||
&& decorHardButtons[0].textContent.includes(card._t('btn.cancel'));
|
||||
decorHardButtons[0]?.click();
|
||||
await waitFor(() => !card._backdropGuard);
|
||||
|
||||
// ── alpha-ветка: PNG с alpha остаётся PNG ────────────────────────────────
|
||||
const alphaSrc = new OffscreenCanvas(6200, 6200);
|
||||
const alphaCtx = alphaSrc.getContext('2d');
|
||||
|
||||
Vendored
+55
-55
@@ -1,125 +1,125 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fingerprint": "b69bdfe3df225cf1b96fea0159a03a620e38cb94ec6106f9ee3b0e57cdefd183",
|
||||
"fingerprint": "cfbfe510d0898a501060f644db55c8c884e95a72e40d98716de05df63a66dc17",
|
||||
"entry": "houseplan-card.js",
|
||||
"initialViewFiles": [
|
||||
"houseplan-assets/houseplan-card-CxS6HLVV.js",
|
||||
"houseplan-assets/houseplan-card-D_n3AgaN.js",
|
||||
"houseplan-card.js"
|
||||
],
|
||||
"initialViewGzipBytes": 290942,
|
||||
"initialViewGzipBytes": 290950,
|
||||
"lazyFiles": [
|
||||
"houseplan-assets/backdrop-pick-I85bKcdl.js",
|
||||
"houseplan-assets/de-CDRfP4mw.js",
|
||||
"houseplan-assets/editor-Bze_fgW0.js",
|
||||
"houseplan-assets/fr-B64rhazj.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-X23eakN9.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-C3A8efgN.js"
|
||||
"houseplan-assets/backdrop-pick-CXBNIJbr.js",
|
||||
"houseplan-assets/de-DQual6Kp.js",
|
||||
"houseplan-assets/editor-9GYON2-E.js",
|
||||
"houseplan-assets/fr-jAhvVsg_.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-oFEwsnfR.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-B21xb3Em.js"
|
||||
],
|
||||
"lazyGzipBytes": 215441,
|
||||
"lazyGzipBytes": 215461,
|
||||
"lazyEditorFiles": [
|
||||
"houseplan-assets/backdrop-pick-I85bKcdl.js",
|
||||
"houseplan-assets/editor-Bze_fgW0.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-X23eakN9.js"
|
||||
"houseplan-assets/backdrop-pick-CXBNIJbr.js",
|
||||
"houseplan-assets/editor-9GYON2-E.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-oFEwsnfR.js"
|
||||
],
|
||||
"lazyEditorGzipBytes": 159770,
|
||||
"lazyEditorGzipBytes": 159773,
|
||||
"lazyOnboardingFiles": [
|
||||
"houseplan-assets/backdrop-pick-I85bKcdl.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-C3A8efgN.js"
|
||||
"houseplan-assets/backdrop-pick-CXBNIJbr.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-B21xb3Em.js"
|
||||
],
|
||||
"lazyOnboardingGzipBytes": 14129,
|
||||
"lazyOnboardingGzipBytes": 14131,
|
||||
"lazyLocaleFiles": [
|
||||
"houseplan-assets/de-CDRfP4mw.js",
|
||||
"houseplan-assets/fr-B64rhazj.js"
|
||||
"houseplan-assets/de-DQual6Kp.js",
|
||||
"houseplan-assets/fr-jAhvVsg_.js"
|
||||
],
|
||||
"lazyLocaleGzipBytes": 48717,
|
||||
"lazyLocaleGzipBytes": 48733,
|
||||
"files": [
|
||||
{
|
||||
"path": "houseplan-assets/backdrop-pick-I85bKcdl.js",
|
||||
"sha256": "7becca609cbb95b1ba278743fce5b3e93c7adf8a7bd9107783931f29279ac5df",
|
||||
"rawBytes": 20974,
|
||||
"gzipBytes": 7175,
|
||||
"path": "houseplan-assets/backdrop-pick-CXBNIJbr.js",
|
||||
"sha256": "1f4f4b3dddd1727c8e8b18f652e2a5a298640b95e842ffa1b59d3c992196153f",
|
||||
"rawBytes": 20996,
|
||||
"gzipBytes": 7176,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-CxS6HLVV.js"
|
||||
"houseplan-assets/houseplan-card-D_n3AgaN.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/de-CDRfP4mw.js",
|
||||
"sha256": "2f90acc29e659e771dea42290b74ceb54d8ab9a7fae9cfdbd7ce6bc4bda0b70b",
|
||||
"path": "houseplan-assets/de-DQual6Kp.js",
|
||||
"sha256": "0dfde1a5371337cc97c482475f04163d9f38ebf5b10f67253d0ddb153f3150c5",
|
||||
"rawBytes": 81632,
|
||||
"gzipBytes": 24630,
|
||||
"gzipBytes": 24638,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/editor-Bze_fgW0.js",
|
||||
"sha256": "2e2513efca4fa8d9019c3601693fb3ff3b9e050ba3fe054b190f81d286540dda",
|
||||
"path": "houseplan-assets/editor-9GYON2-E.js",
|
||||
"sha256": "e238f6e60c5a599796f33eb4905e8745662da09c4ec6c0bf8c03dd9817aa40dd",
|
||||
"rawBytes": 3826,
|
||||
"gzipBytes": 1580,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-CxS6HLVV.js"
|
||||
"houseplan-assets/houseplan-card-D_n3AgaN.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/fr-B64rhazj.js",
|
||||
"sha256": "6a1a18220938a8d4631586a9dc7f8ef8243b77a23089777d0917975300960a82",
|
||||
"path": "houseplan-assets/fr-jAhvVsg_.js",
|
||||
"sha256": "5aa1b8e8e883a319aaa8a3fbbdff3a385b6f9897e1bd04231009e3b78c39d693",
|
||||
"rawBytes": 83754,
|
||||
"gzipBytes": 24087,
|
||||
"gzipBytes": 24095,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-card-CxS6HLVV.js",
|
||||
"sha256": "1607bc6eeb275b340391ff10bdb7c2c5f62e59d5d2a43adbdb412698a0a024d1",
|
||||
"path": "houseplan-assets/houseplan-card-D_n3AgaN.js",
|
||||
"sha256": "d4c5e737a971cc8296394ed0ef85a8387d3e77195263f66196638b96eb3f2833",
|
||||
"rawBytes": 1032923,
|
||||
"gzipBytes": 290148,
|
||||
"gzipBytes": 290155,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/de-CDRfP4mw.js",
|
||||
"houseplan-assets/editor-Bze_fgW0.js",
|
||||
"houseplan-assets/fr-B64rhazj.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-X23eakN9.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-C3A8efgN.js"
|
||||
"houseplan-assets/de-DQual6Kp.js",
|
||||
"houseplan-assets/editor-9GYON2-E.js",
|
||||
"houseplan-assets/fr-jAhvVsg_.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-oFEwsnfR.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-B21xb3Em.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-X23eakN9.js",
|
||||
"sha256": "53f256fffc8e6f02618e56dbf56f25258356c2ca221ee9918ccbc57d9e590f6b",
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-oFEwsnfR.js",
|
||||
"sha256": "82a25a6e97f7bab1e93ea6f8617e6932a76ff51fdb20cf569357ee4786c4f316",
|
||||
"rawBytes": 575918,
|
||||
"gzipBytes": 151015,
|
||||
"gzipBytes": 151017,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-I85bKcdl.js",
|
||||
"houseplan-assets/houseplan-card-CxS6HLVV.js"
|
||||
"houseplan-assets/backdrop-pick-CXBNIJbr.js",
|
||||
"houseplan-assets/houseplan-card-D_n3AgaN.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-C3A8efgN.js",
|
||||
"sha256": "a5433ef2715f424016b31a2ae3c3c30f2cff05549230fd0ab16db3159834de3f",
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-B21xb3Em.js",
|
||||
"sha256": "ad013f565d0a364dafac7e27dea593179cf22fd50697f108aa5cfb049d4ef75b",
|
||||
"rawBytes": 28088,
|
||||
"gzipBytes": 6954,
|
||||
"gzipBytes": 6955,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-I85bKcdl.js",
|
||||
"houseplan-assets/houseplan-card-CxS6HLVV.js"
|
||||
"houseplan-assets/backdrop-pick-CXBNIJbr.js",
|
||||
"houseplan-assets/houseplan-card-D_n3AgaN.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-card.js",
|
||||
"sha256": "f9d93e5aa355fc91dc8fad57e7669a0ac663e8b538f42ea671a1a319fe214c3e",
|
||||
"sha256": "d21d311123d5faf9d1833afe4b69aa8d6295eaa358dbd6cdbb8cf8d364960b02",
|
||||
"rawBytes": 1183,
|
||||
"gzipBytes": 794,
|
||||
"gzipBytes": 795,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-CxS6HLVV.js"
|
||||
"houseplan-assets/houseplan-card-D_n3AgaN.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
}
|
||||
|
||||
Vendored
+11
-10
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b69bdfe3df225cf1b96fea0159a03a620e38cb94ec6106f9ee3b0e57cdefd183";import{b as e,l as o,t,dg as s,A as a,dh as i,di as l,dj as n,E as r,c}from"./houseplan-card-CxS6HLVV.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},f=this._schema,_=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="cfbfe510d0898a501060f644db55c8c884e95a72e40d98716de05df63a66dc17";import{b as e,l as o,t,dg as s,A as a,dh as i,di as l,dj as n,E as r,c}from"./houseplan-card-D_n3AgaN.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},f=this._schema,_=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
|
||||
.hass=${this.hass}
|
||||
.data=${this._formData}
|
||||
.schema=${e}
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+3
-3
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b69bdfe3df225cf1b96fea0159a03a620e38cb94ec6106f9ee3b0e57cdefd183";import{l as t,aE as s,A as e,t as o,c as a,c4 as l,c5 as i,c6 as h,c7 as c,aB as n,c8 as r,cd as p,c9 as d,ca as _,cb as u,cc as g,d5 as m,aA as b,aC as $,d6 as v}from"./houseplan-card-CxS6HLVV.js";import{i as f,c as y,e as w,r as D,a as k,b as S,s as C,t as M}from"./backdrop-pick-I85bKcdl.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="b69bdfe3df225cf1b96fea0159a03a620e38cb94ec6106f9ee3b0e57cdefd183";class L{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?a`<hp-help data-help-key=${l}
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="cfbfe510d0898a501060f644db55c8c884e95a72e40d98716de05df63a66dc17";import{l as t,aE as s,A as e,t as o,c as a,c4 as l,c5 as i,c6 as h,c7 as c,aB as n,c8 as r,cd as p,c9 as d,ca as _,cb as u,cc as g,d5 as m,aA as b,aC as $,d6 as v}from"./houseplan-card-D_n3AgaN.js";import{i as f,c as y,e as w,r as D,a as k,b as S,s as C,t as M}from"./backdrop-pick-CXBNIJbr.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="cfbfe510d0898a501060f644db55c8c884e95a72e40d98716de05df63a66dc17";class L{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?a`<hp-help data-help-key=${l}
|
||||
.text=${o(h,l)} .ariaLabel=${o(h,i)}></hp-help>`:e}_openSpaceDialog(t,s){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===t){const e=this.host._serverCfg.spaces.find(t=>t.id===s);if(!e)return;const o=l(e),a=e.settings?.custom_fill&&"object"==typeof e.settings.custom_fill?i(e.settings.custom_fill):null,p="none"===o.fill?{...a||h,a:0}:a;return void(this.host._spaceDialog={mode:t,spaceId:s,title:e.title,planUrl:e.plan_url||null,planFile:null,source:e.plan_url?"file":"draw",showBorders:o.showBorders,showNames:o.showNames,zeroWallStyle:r(e),displayTouched:!0,hideDecor:o.hideDecor,hideOpenings:o.hideOpenings,roomColor:o.color,roomOpacity:o.opacity,fillMode:"none"===o.fill?"custom":o.fill,customFill:p,glowEnabled:o.glow,bgColor:o.bgColor,bgMode:"static"===e.settings?.bg_mode||"daynight"===e.settings?.bg_mode?e.settings.bg_mode:null,northDeg:n({},e.settings),sunRays:"boolean"==typeof e.settings?.sun_rays?e.settings.sun_rays:null,tempMin:o.tempMin,tempMax:o.tempMax,showLqi:o.showLqi??this.host._config?.show_signal??!0,cardFontScale:o.cardFontScale,labelTemp:o.labelTemp,labelHum:o.labelHum,labelLqi:o.labelLqi,labelLight:o.labelLight,cellCm:Number(e.cell_cm)>0?Number(e.cell_cm):5,cellCmInput:c(Number(e.cell_cm)>0?Number(e.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const e=p(this.host._imperial);this.host._spaceDialog={mode:t,title:"",planUrl:null,planFile:null,...f(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:g,roomOpacity:u,fillMode:"custom",customFill:{...h,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:_,tempMax:d,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:e,cellCmInput:c(e,this.host._imperial),cellCmTouched:!1,busy:!1}}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const o=await y(e);if("reject"===o.kind)return void this.host._showToast(this.host._t("toast.plan_formats"));if("guard"===o.kind)return void(this.host._backdropGuard=o.state);const a=await w(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return D(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??e}_useServerPlan(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,planUrl:t,planFile:null,pickSaved:!1,savedAspect:void 0},this.host._aspectJob=this._readPlanAspect(t))}async _readPlanAspect(t){for(let s=0;s<40;s++){const s=this.host._display(t);if(s){const e=await new Promise(t=>{const e=new Image;e.onload=()=>t(e.naturalWidth&&e.naturalHeight?e.naturalWidth/e.naturalHeight:0),e.onerror=()=>t(0),e.src=s}),o=this.host._spaceDialog;return o&&o.planUrl===t&&Number.isFinite(e)&&e>0?(this.host._spaceDialog={...o,savedAspect:e},e):0}if(await new Promise(t=>setTimeout(t,150)),this.host._spaceDialog?.planUrl!==t)return 0}return 0}async _deleteServerPlan(t){const s=this.host._spaceDialog,e=s?.saved?.find(s=>s.name===t);if(!s||!e||e.used_by.length||e.url===s.planUrl)return;const o=await this.host._confirmDanger({key:"delete-plan",kind:"destructive",title:this.host._t("confirm.delete_plan_title"),message:this.host._t("confirm.delete_plan_body"),objectName:t,confirmLabel:this.host._t("btn.delete"),cancelLabel:this.host._t("btn.cancel")}),a=this.host._spaceDialog,l=a?.saved?.find(s=>s.name===t);if(o&&a&&l&&l.url===e.url&&l.modified===e.modified&&!l.used_by.length&&l.url!==a.planUrl)try{await this.host.hass.callWS({type:"houseplan/plans/delete",name:t});const s=this.host._spaceDialog;s?.saved&&(this.host._spaceDialog={...s,saved:s.saved.filter(s=>s.name!==t)})}catch(t){this.host._showToast(this.host._t("toast.plan_delete_failed",{err:this.host._errText(t)}))}}_renderServerPlans(t){if(t.savedBusy)return a`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return a`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return a`<div class="savedplans">
|
||||
${s.map(s=>{return a`
|
||||
<div class="savedplan ${s.url===t.planUrl?"cur":""}">
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b69bdfe3df225cf1b96fea0159a03a620e38cb94ec6106f9ee3b0e57cdefd183";try{await import("./houseplan-assets/houseplan-card-CxS6HLVV.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":l.startsWith("fr")?"House Plan a été mis à jour — veuillez recharger la page (Ctrl+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale entry: the main chunk is unavailable",e)}
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="cfbfe510d0898a501060f644db55c8c884e95a72e40d98716de05df63a66dc17";try{await import("./houseplan-assets/houseplan-card-D_n3AgaN.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":l.startsWith("fr")?"House Plan a été mis à jour — veuillez recharger la page (Ctrl+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale entry: the main chunk is unavailable",e)}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
- Oversized decor-image sources can now be added through the safe reduced-copy
|
||||
action; House Plan hides only the forbidden original instead of hiding both
|
||||
choices ([#427](https://github.com/Matysh/houseplan-card/issues/427)).
|
||||
- General settings can now hide the room information window on mouse hover
|
||||
without disabling the room highlight or device tooltips; existing plans keep
|
||||
the window enabled by default ([#426](https://github.com/Matysh/houseplan-card/issues/426)).
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
|
||||
## Не выпущено
|
||||
|
||||
- Слишком большой исходник изображения декора теперь можно добавить через
|
||||
безопасную уменьшенную копию: House Plan скрывает только запрещённый
|
||||
оригинал, а не оба действия
|
||||
([#427](https://github.com/Matysh/houseplan-card/issues/427)).
|
||||
- В общих настройках теперь можно отключить информационное окно комнаты при
|
||||
наведении мышью, не отключая подсветку комнаты и подсказки устройств;
|
||||
существующие планы сохраняют включённое поведение по умолчанию
|
||||
|
||||
+9
-7
@@ -768,13 +768,15 @@ available plan variants. **All categories** returns to the first level and
|
||||
disarms the current symbol. Existing placed furniture keeps its saved size and
|
||||
position when the built-in artwork is updated.
|
||||
|
||||
The Image palette stores reusable files privately in House Plan. A file is at
|
||||
most 2 MiB; PNG, JPEG, WebP and safe SVG are supported. Picking a file arms one
|
||||
placement: the pointer preview shows the result, one click adds it at 100 cm
|
||||
wide (aspect-preserving, height capped at 200 cm), and the tool returns to
|
||||
Select. Images use the same smooth handles, mirroring and `Shift`-45° rotation
|
||||
as furniture, but never snap to a wall. Their complete rectangle is selectable,
|
||||
including transparent pixels.
|
||||
The Image palette stores reusable files privately in House Plan. Each saved
|
||||
canonical file is at most 2 MiB; PNG, JPEG, WebP and safe SVG are supported.
|
||||
When a raster source exceeds that limit, the warning dialog offers to upload a
|
||||
reduced copy while keeping the oversized original unavailable. Picking a file
|
||||
arms one placement: the pointer preview shows the result, one click adds it at
|
||||
100 cm wide (aspect-preserving, height capped at 200 cm), and the tool returns
|
||||
to Select. Images use the same smooth handles, mirroring and `Shift`-45°
|
||||
rotation as furniture, but never snap to a wall. Their complete rectangle is
|
||||
selectable, including transparent pixels.
|
||||
|
||||
Deleting or replacing a placed image leaves the reusable file in the palette.
|
||||
The palette deletes a file only after all placed copies in all spaces are gone.
|
||||
|
||||
@@ -1396,9 +1396,12 @@ Power=`off`/`unavailable` подавляет даже устаревший ак
|
||||
|
||||
Палитра «Изображение» хранит файлы в закрытом хранилище House Plan и позволяет
|
||||
повторно использовать их в разных пространствах. Поддерживаются PNG, JPEG,
|
||||
WebP и безопасный SVG размером до 2 МиБ. Выбор файла вооружает одно размещение:
|
||||
предпросмотр следует за указателем, один клик добавляет объект шириной 100 см с
|
||||
сохранением пропорций (высота не больше 200 см), затем включается «Выбрать».
|
||||
WebP и безопасный SVG; лимит 2 МиБ относится к сохранённому canonical-файлу.
|
||||
Если исходный растр больше, диалог предлагает загрузить уменьшенную копию, но
|
||||
не позволяет оставить слишком большой оригинал. Выбор файла вооружает одно
|
||||
размещение: предпросмотр следует за указателем, один клик добавляет объект
|
||||
шириной 100 см с сохранением пропорций (высота не больше 200 см), затем
|
||||
включается «Выбрать».
|
||||
|
||||
Изображение получает те же плавные ручки размера, отражение и привязку поворота
|
||||
к 45° с `Shift`, что мебель, но никогда не магнитится к стене. Выбирается весь
|
||||
|
||||
@@ -238,9 +238,10 @@ export function renderBackdropGuard(
|
||||
<button class="btn ghost" ?disabled=${guard.busy} @click=${() => dismiss()}>
|
||||
${host._t('btn.cancel')}</button>
|
||||
<span class="spacer"></span>
|
||||
${hard || !allowOriginal ? null : html`
|
||||
<button class="btn ghost" ?disabled=${guard.busy} @click=${() => original()}>
|
||||
${host._t('backdrop.keep_original')}</button>
|
||||
${hard ? null : html`
|
||||
${allowOriginal ? html`
|
||||
<button class="btn ghost" ?disabled=${guard.busy} @click=${() => original()}>
|
||||
${host._t('backdrop.keep_original')}</button>` : null}
|
||||
<button class="btn on" ?disabled=${guard.busy} @click=${() => reduced()}>
|
||||
${guard.busy ? host._t('backdrop.reducing') : host._t('backdrop.use_downscaled')}
|
||||
</button>`}
|
||||
|
||||
Reference in New Issue
Block a user