platypush/platypush/backend/http/webapp/dist/static/js/3459.70ac42db.js

2 lines
1.5 KiB
JavaScript

"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[3459],{3459:function(t,e,o){o.r(e),o.d(e,{default:function(){return h}});var l=o(6252),n=o(3577),r=o(3540);const c={key:0,src:r,class:"loading"},i={key:1,class:"fas fa-circle-exclamation error"};function s(t,e,o,r,s,a){const u=(0,l.up)("Icon");return(0,l.wg)(),(0,l.iD)("div",{class:(0,n.C_)(["entity-icon-container",{"with-color-fill":!!a.colorFill}]),style:(0,n.j5)(a.colorFillStyle)},[o.loading?((0,l.wg)(),(0,l.iD)("img",c)):o.error?((0,l.wg)(),(0,l.iD)("i",i)):((0,l.wg)(),(0,l.j4)(u,(0,n.vs)((0,l.dG)({key:2},a.computedIconNormalized)),null,16))],6)}var a=o(1478),u={name:"EntityIcon",components:{Icon:a.Z},props:{loading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},entity:{type:Object,required:!0},icon:{type:Object,default:()=>{}},hasColorFill:{type:Boolean,default:!1}},data(){return{component:null,modalVisible:!1}},computed:{computedIcon(){let t={...this.entity?.meta?.icon||{}};return Object.keys(this.icon||{}).length&&(t=this.icon),{...t}},colorFill(){return this.hasColorFill&&this.computedIcon.color},colorFillStyle(){return this.colorFill&&!this.error?{background:this.colorFill}:{}},computedIconNormalized(){const t={...this.computedIcon};return this.colorFill&&delete t.color,t},type(){let t=this.entity.type||"";return t.charAt(0).toUpperCase()+t.slice(1)}}},p=o(3744);const d=(0,p.Z)(u,[["render",s],["__scopeId","data-v-4fad24e6"]]);var h=d},3540:function(t,e,o){t.exports=o.p+"static/img/spinner.c0bee445.gif"}}]);
//# sourceMappingURL=3459.70ac42db.js.map