platypush/platypush/backend/http/webapp/dist/static/js/3390.4cfb5013.js

2 lines
3.7 KiB
JavaScript

"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[3390,2072,3673],{3673:function(n,t,e){e.r(t),e.d(t,{default:function(){return p}});var l=e(6252),o=e(3577),a=e(3540);const i={key:0,src:a,class:"loading"},c={key:1,class:"fas fa-circle-exclamation error"};function s(n,t,e,a,s,r){const u=(0,l.up)("Icon");return(0,l.wg)(),(0,l.iD)("div",{class:(0,o.C_)(["entity-icon-container",{"with-color-fill":!!r.colorFill}]),style:(0,o.j5)(r.colorFillStyle)},[e.loading?((0,l.wg)(),(0,l.iD)("img",i)):e.error?((0,l.wg)(),(0,l.iD)("i",c)):((0,l.wg)(),(0,l.j4)(u,(0,o.vs)((0,l.dG)({key:2},r.computedIcon)),null,16))],6)}var r=e(1478),u={name:"EntityIcon",components:{Icon:r.Z},props:{loading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},icon:{type:Object,required:!0},hasColorFill:{type:Boolean,default:!1}},data(){return{component:null,modalVisible:!1}},computed:{colorFill(){return this.hasColorFill&&this.icon.color?this.icon.color:null},colorFillStyle(){return this.colorFill&&!this.error?{background:this.colorFill}:{}},computedIcon(){const n={...this.icon};return this.colorFill&&delete n.color,n},type(){let n=this.entity.type||"";return n.charAt(0).toUpperCase()+n.slice(1)}}},d=e(3744);const v=(0,d.Z)(u,[["render",s],["__scopeId","data-v-e4043550"]]);var p=v},3390:function(n,t,e){e.r(t),e.d(t,{default:function(){return w}});var l=e(6252),o=e(3577);const a={class:"entity sensor-container"},i={class:"head"},c={class:"col-1 icon"},s={class:"col-s-8 col-m-9 label"},r=["textContent"],u={key:0,class:"col-s-3 col-m-2 pull-right"},d=["textContent"],v=["textContent"];function p(n,t,e,p,m,y){const f=(0,l.up)("EntityIcon");return(0,l.wg)(),(0,l.iD)("div",a,[(0,l._)("div",i,[(0,l._)("div",c,[(0,l.Wm)(f,{icon:n.value.meta?.icon||{},loading:n.loading,error:n.error},null,8,["icon","loading","error"])]),(0,l._)("div",s,[(0,l._)("div",{class:"name",textContent:(0,o.zw)(n.value.name)},null,8,r)]),null!=n.value.value?((0,l.wg)(),(0,l.iD)("div",u,[null!=n.value.unit?((0,l.wg)(),(0,l.iD)("span",{key:0,class:"unit",textContent:(0,o.zw)(n.value.unit)},null,8,d)):(0,l.kq)("",!0),(0,l._)("span",{class:"value",textContent:(0,o.zw)(y.displayValue(n.value.value))},null,8,v)])):(0,l.kq)("",!0)])])}var m=e(3673),y=e(2072),f={name:"EnumSensor",components:{EntityIcon:m["default"]},mixins:[y["default"]],methods:{displayValue(n){return this.value?.values&&"object"===typeof this.value.values&&this.value.values[n]||n}}},h=e(3744);const g=(0,h.Z)(f,[["render",p],["__scopeId","data-v-4623456e"]]);var w=g},2072:function(n,t,e){e.r(t),e.d(t,{default:function(){return w}});var l=e(6252),o=e(3577);const a={class:"entity sensor-container"},i={class:"head"},c={class:"col-1 icon"},s={class:"col-s-8 col-m-9 label"},r=["textContent"],u={key:0,class:"col-s-3 col-m-2 pull-right"},d=["textContent"],v=["textContent"];function p(n,t,e,p,m,y){const f=(0,l.up)("EntityIcon");return(0,l.wg)(),(0,l.iD)("div",a,[(0,l._)("div",i,[(0,l._)("div",c,[(0,l.Wm)(f,{icon:n.value.meta?.icon||{},loading:n.loading,error:n.error},null,8,["icon","loading","error"])]),(0,l._)("div",s,[(0,l._)("div",{class:"name",textContent:(0,o.zw)(n.value.name)},null,8,r)]),null!=n.value.value?((0,l.wg)(),(0,l.iD)("div",u,[null!=n.value.unit?((0,l.wg)(),(0,l.iD)("span",{key:0,class:"unit",textContent:(0,o.zw)(n.value.unit)},null,8,d)):(0,l.kq)("",!0),(0,l._)("span",{class:"value",textContent:(0,o.zw)(n.value.value)},null,8,v)])):(0,l.kq)("",!0)])])}var m=e(7909),y=e(3673),f={name:"Sensor",components:{EntityIcon:y["default"]},mixins:[m["default"]]},h=e(3744);const g=(0,h.Z)(f,[["render",p],["__scopeId","data-v-1db1da05"]]);var w=g},3540:function(n,t,e){n.exports=e.p+"static/img/spinner.c0bee445.gif"}}]);
//# sourceMappingURL=3390.4cfb5013.js.map