platypush/platypush/backend/http/webapp/dist/static/js/2072-legacy.5f0a7198.js

2 lines
2.6 KiB
JavaScript

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