forked from platypush/platypush
Better style for toggle switches
This commit is contained in:
parent
bb28617cc9
commit
d0790aaba3
124 changed files with 107 additions and 113 deletions
|
@ -1 +1 @@
|
|||
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>platypush</title><script defer="defer" type="module" src="/static/js/chunk-vendors.5adf1720.js"></script><script defer="defer" type="module" src="/static/js/app.a93abe27.js"></script><link href="/static/css/chunk-vendors.5cf89a0c.css" rel="stylesheet"><link href="/static/css/app.d92849a2.css" rel="stylesheet"><script defer="defer" src="/static/js/chunk-vendors-legacy.cc8c0644.js" nomodule></script><script defer="defer" src="/static/js/app-legacy.aa2fb82a.js" nomodule></script></head><body><noscript><strong>We're sorry but platypush doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>platypush</title><script defer="defer" type="module" src="/static/js/chunk-vendors.5adf1720.js"></script><script defer="defer" type="module" src="/static/js/app.f7ae2c87.js"></script><link href="/static/css/chunk-vendors.5cf89a0c.css" rel="stylesheet"><link href="/static/css/app.d92849a2.css" rel="stylesheet"><script defer="defer" src="/static/js/chunk-vendors-legacy.cc8c0644.js" nomodule></script><script defer="defer" src="/static/js/app-legacy.4cc2e832.js" nomodule></script></head><body><noscript><strong>We're sorry but platypush doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
|
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/css/1406.b63ad2b2.css
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/css/1406.b63ad2b2.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/css/1474.ab4985b3.css
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/css/1474.ab4985b3.css
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/css/747.b63ad2b2.css
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/css/747.b63ad2b2.css
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/1406-legacy.41c0c47e.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/1406-legacy.41c0c47e.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/js/1406-legacy.41c0c47e.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/1406-legacy.41c0c47e.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,2 +0,0 @@
|
|||
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[2380],{3567:function(e,n,t){t.d(n,{Z:function(){return p}});var i=t(6252),o=t(3577),a=function(e){return(0,i.dD)("data-v-8fae7678"),e=e(),(0,i.Cn)(),e},r=["checked"],s=a((function(){return(0,i._)("div",{class:"switch"},[(0,i._)("div",{class:"dot"})],-1)})),u={class:"label"};function c(e,n,t,a,c,l){return(0,i.wg)(),(0,i.iD)("div",{class:(0,o.C_)(["power-switch",{disabled:t.disabled}]),onClick:n[0]||(n[0]=function(){return l.onInput&&l.onInput.apply(l,arguments)})},[(0,i._)("input",{type:"checkbox",checked:t.value},null,8,r),(0,i._)("label",null,[s,(0,i._)("span",u,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])])],2)}var l={name:"ToggleSwitch",emits:["input"],props:{value:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},methods:{onInput:function(e){if(e.stopPropagation(),this.disabled)return!1;this.$emit("input",e)}}},d=t(3744);const f=(0,d.Z)(l,[["render",c],["__scopeId","data-v-8fae7678"]]);var p=f},4004:function(e,n,t){t.d(n,{Z:function(){return s}});var i=t(8534),o=(t(1539),t(8309),t(5666),t(2628)),a={name:"SwitchesMixin",mixins:[o.Z],props:{pluginName:{type:String,required:!0},bus:{type:Object,required:!0},config:{type:Object,default:function(){return{}}},selected:{type:Boolean,default:!1}},data:function(){return{loading:!1,initialized:!1,selectedDevice:null,devices:{}}},methods:{onRefreshEvent:function(e){e===this.pluginName&&this.refresh()},toggle:function(e,n){var t=this;return(0,i.Z)(regeneratorRuntime.mark((function i(){var o;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return null==n&&(n=e),i.next=3,t.request("".concat(t.pluginName,".toggle"),{device:n});case 3:o=i.sent,t.devices[e].on=o.on;case 5:case"end":return i.stop()}}),i)})))()},refresh:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.loading=!0,n.prev=1,n.next=4,e.request("".concat(e.pluginName,".switch_status"));case 4:e.devices=n.sent.reduce((function(e,n){var t,i=null!==(t=n.name)&&void 0!==t&&t.length?n.name:n.id;return e[i]=n,e}),{});case 5:return n.prev=5,e.loading=!1,n.finish(5);case 8:case"end":return n.stop()}}),n,null,[[1,,5,8]])})))()}},mounted:function(){var e=this;this.$watch((function(){return e.selected}),(function(n){n&&!e.initialized&&(e.refresh(),e.initialized=!0)})),this.bus.on("refresh",this.onRefreshEvent)},unmounted:function(){this.bus.off("refresh",this.onRefreshEvent)}};const r=a;var s=r},8671:function(e,n,t){t.d(n,{Z:function(){return w}});t(8309);var i=t(6252),o=t(9963),a=t(3577),r=function(e){return(0,i.dD)("data-v-38eb9831"),e=e(),(0,i.Cn)(),e},s={class:"name col-l-10 col-m-9 col-s-8"},u=r((function(){return(0,i._)("i",{class:"fa fa-info"},null,-1)})),c=[u],l=["textContent"],d={class:"toggler col-l-2 col-m-3 col-s-4"};function f(e,n,t,r,u,f){var p=(0,i.up)("Loading"),g=(0,i.up)("ToggleSwitch");return(0,i.wg)(),(0,i.iD)("div",{class:"switch",onClick:n[1]||(n[1]=(0,o.iM)((function(){return f.onToggle&&f.onToggle.apply(f,arguments)}),["stop"]))},[t.loading?((0,i.wg)(),(0,i.j4)(p,{key:0})):(0,i.kq)("",!0),(0,i._)("div",s,[t.hasInfo?((0,i.wg)(),(0,i.iD)("button",{key:0,onClick:n[0]||(n[0]=(0,o.iM)((function(){return f.onInfo&&f.onInfo.apply(f,arguments)}),["prevent"]))},c)):(0,i.kq)("",!0),(0,i._)("span",{class:"name-content",textContent:(0,a.zw)(t.name)},null,8,l)]),(0,i._)("div",d,[(0,i.Wm)(g,{disabled:t.loading,value:t.state,onInput:f.onToggle},null,8,["disabled","value","onInput"])])])}var p=t(3567),g=t(1232),h={name:"Switch",components:{Loading:g.Z,ToggleSwitch:p.Z},emits:["toggle","info"],props:{name:{type:String,required:!0},state:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},hasInfo:{type:Boolean,default:!1},id:{type:String}},methods:{onInfo:function(e){return e.stopPropagation(),this.$emit("info"),!1},onToggle:function(e){return e.stopPropagation(),this.$emit("toggle"),!1}}},v=t(3744);const m=(0,v.Z)(h,[["render",f],["__scopeId","data-v-38eb9831"]]);var w=m},2380:function(e,n,t){t.r(n),t.d(n,{default:function(){return p}});t(7941);var i=t(6252),o={class:"switches zwave-mqtt-switches"},a={key:1,class:"no-content"};function r(e,n,t,r,s,u){var c=(0,i.up)("Loading"),l=(0,i.up)("Switch");return(0,i.wg)(),(0,i.iD)("div",o,[e.loading?((0,i.wg)(),(0,i.j4)(c,{key:0})):Object.keys(e.devices).length?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",a,"No Z-Wave switches found.")),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.devices,(function(n,t){return(0,i.wg)(),(0,i.j4)(l,{loading:e.loading,name:t,state:n.on,id:n.id,onToggle:function(i){return e.toggle(t,n.id)},key:t},null,8,["loading","name","state","id","onToggle"])})),128))])}var s=t(1232),u=t(4004),c=t(8671),l={name:"ZwaveMqtt",components:{Switch:c.Z,Loading:s.Z},mixins:[u.Z]},d=t(3744);const f=(0,d.Z)(l,[["render",r],["__scopeId","data-v-c92e52f8"]]);var p=f}}]);
|
||||
//# sourceMappingURL=2380-legacy.44d382a4.js.map
|
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/2380-legacy.b3f2d86a.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/2380-legacy.b3f2d86a.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[2380],{6137:function(e,n,t){t.d(n,{Z:function(){return g}});var i=t(6252),o=t(3577),a=t(9963),r=function(e){return(0,i.dD)("data-v-8e097228"),e=e(),(0,i.Cn)(),e},s=["checked"],u=r((function(){return(0,i._)("div",{class:"switch"},[(0,i._)("div",{class:"dot"})],-1)})),c={class:"label"};function l(e,n,t,r,l,d){return(0,i.wg)(),(0,i.iD)("div",{class:(0,o.C_)(["power-switch",{disabled:t.disabled}]),onClick:n[0]||(n[0]=(0,a.iM)((function(){return d.onInput&&d.onInput.apply(d,arguments)}),["stop"]))},[(0,i._)("input",{type:"checkbox",checked:t.value},null,8,s),(0,i._)("label",null,[u,(0,i._)("span",c,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])])],2)}var d={name:"ToggleSwitch",emits:["input"],props:{value:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},methods:{onInput:function(e){if(this.disabled)return!1;this.$emit("input",e)}}},f=t(3744);const p=(0,f.Z)(d,[["render",l],["__scopeId","data-v-8e097228"]]);var g=p},4004:function(e,n,t){t.d(n,{Z:function(){return s}});var i=t(8534),o=(t(1539),t(8309),t(5666),t(2628)),a={name:"SwitchesMixin",mixins:[o.Z],props:{pluginName:{type:String,required:!0},bus:{type:Object,required:!0},config:{type:Object,default:function(){return{}}},selected:{type:Boolean,default:!1}},data:function(){return{loading:!1,initialized:!1,selectedDevice:null,devices:{}}},methods:{onRefreshEvent:function(e){e===this.pluginName&&this.refresh()},toggle:function(e,n){var t=this;return(0,i.Z)(regeneratorRuntime.mark((function i(){var o;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return null==n&&(n=e),i.next=3,t.request("".concat(t.pluginName,".toggle"),{device:n});case 3:o=i.sent,t.devices[e].on=o.on;case 5:case"end":return i.stop()}}),i)})))()},refresh:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.loading=!0,n.prev=1,n.next=4,e.request("".concat(e.pluginName,".switch_status"));case 4:e.devices=n.sent.reduce((function(e,n){var t,i=null!==(t=n.name)&&void 0!==t&&t.length?n.name:n.id;return e[i]=n,e}),{});case 5:return n.prev=5,e.loading=!1,n.finish(5);case 8:case"end":return n.stop()}}),n,null,[[1,,5,8]])})))()}},mounted:function(){var e=this;this.$watch((function(){return e.selected}),(function(n){n&&!e.initialized&&(e.refresh(),e.initialized=!0)})),this.bus.on("refresh",this.onRefreshEvent)},unmounted:function(){this.bus.off("refresh",this.onRefreshEvent)}};const r=a;var s=r},8671:function(e,n,t){t.d(n,{Z:function(){return w}});t(8309);var i=t(6252),o=t(9963),a=t(3577),r=function(e){return(0,i.dD)("data-v-38eb9831"),e=e(),(0,i.Cn)(),e},s={class:"name col-l-10 col-m-9 col-s-8"},u=r((function(){return(0,i._)("i",{class:"fa fa-info"},null,-1)})),c=[u],l=["textContent"],d={class:"toggler col-l-2 col-m-3 col-s-4"};function f(e,n,t,r,u,f){var p=(0,i.up)("Loading"),g=(0,i.up)("ToggleSwitch");return(0,i.wg)(),(0,i.iD)("div",{class:"switch",onClick:n[1]||(n[1]=(0,o.iM)((function(){return f.onToggle&&f.onToggle.apply(f,arguments)}),["stop"]))},[t.loading?((0,i.wg)(),(0,i.j4)(p,{key:0})):(0,i.kq)("",!0),(0,i._)("div",s,[t.hasInfo?((0,i.wg)(),(0,i.iD)("button",{key:0,onClick:n[0]||(n[0]=(0,o.iM)((function(){return f.onInfo&&f.onInfo.apply(f,arguments)}),["prevent"]))},c)):(0,i.kq)("",!0),(0,i._)("span",{class:"name-content",textContent:(0,a.zw)(t.name)},null,8,l)]),(0,i._)("div",d,[(0,i.Wm)(g,{disabled:t.loading,value:t.state,onInput:f.onToggle},null,8,["disabled","value","onInput"])])])}var p=t(6137),g=t(1232),h={name:"Switch",components:{Loading:g.Z,ToggleSwitch:p.Z},emits:["toggle","info"],props:{name:{type:String,required:!0},state:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},hasInfo:{type:Boolean,default:!1},id:{type:String}},methods:{onInfo:function(e){return e.stopPropagation(),this.$emit("info"),!1},onToggle:function(e){return e.stopPropagation(),this.$emit("toggle"),!1}}},v=t(3744);const m=(0,v.Z)(h,[["render",f],["__scopeId","data-v-38eb9831"]]);var w=m},2380:function(e,n,t){t.r(n),t.d(n,{default:function(){return p}});t(7941);var i=t(6252),o={class:"switches zwave-mqtt-switches"},a={key:1,class:"no-content"};function r(e,n,t,r,s,u){var c=(0,i.up)("Loading"),l=(0,i.up)("Switch");return(0,i.wg)(),(0,i.iD)("div",o,[e.loading?((0,i.wg)(),(0,i.j4)(c,{key:0})):Object.keys(e.devices).length?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",a,"No Z-Wave switches found.")),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.devices,(function(n,t){return(0,i.wg)(),(0,i.j4)(l,{loading:e.loading,name:t,state:n.on,id:n.id,onToggle:function(i){return e.toggle(t,n.id)},key:t},null,8,["loading","name","state","id","onToggle"])})),128))])}var s=t(1232),u=t(4004),c=t(8671),l={name:"ZwaveMqtt",components:{Switch:c.Z,Loading:s.Z},mixins:[u.Z]},d=t(3744);const f=(0,d.Z)(l,[["render",r],["__scopeId","data-v-c92e52f8"]]);var p=f}}]);
|
||||
//# sourceMappingURL=2380-legacy.b3f2d86a.js.map
|
1
platypush/backend/http/webapp/dist/static/js/2380-legacy.b3f2d86a.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/2380-legacy.b3f2d86a.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/2380.73b1a20d.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/2380.73b1a20d.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[2380],{6137:function(e,t,n){n.d(t,{Z:function(){return p}});var i=n(6252),o=n(3577),s=n(9963);const a=e=>((0,i.dD)("data-v-8e097228"),e=e(),(0,i.Cn)(),e),l=["checked"],d=a((()=>(0,i._)("div",{class:"switch"},[(0,i._)("div",{class:"dot"})],-1))),c={class:"label"};function u(e,t,n,a,u,r){return(0,i.wg)(),(0,i.iD)("div",{class:(0,o.C_)(["power-switch",{disabled:n.disabled}]),onClick:t[0]||(t[0]=(0,s.iM)(((...e)=>r.onInput&&r.onInput(...e)),["stop"]))},[(0,i._)("input",{type:"checkbox",checked:n.value},null,8,l),(0,i._)("label",null,[d,(0,i._)("span",c,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])])],2)}var r={name:"ToggleSwitch",emits:["input"],props:{value:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},methods:{onInput(e){if(this.disabled)return!1;this.$emit("input",e)}}},g=n(3744);const h=(0,g.Z)(r,[["render",u],["__scopeId","data-v-8e097228"]]);var p=h},4004:function(e,t,n){n.d(t,{Z:function(){return a}});var i=n(2628),o={name:"SwitchesMixin",mixins:[i.Z],props:{pluginName:{type:String,required:!0},bus:{type:Object,required:!0},config:{type:Object,default:()=>({})},selected:{type:Boolean,default:!1}},data(){return{loading:!1,initialized:!1,selectedDevice:null,devices:{}}},methods:{onRefreshEvent(e){e===this.pluginName&&this.refresh()},async toggle(e,t){null==t&&(t=e);const n=await this.request(`${this.pluginName}.toggle`,{device:t});this.devices[e].on=n.on},async refresh(){this.loading=!0;try{this.devices=(await this.request(`${this.pluginName}.switch_status`)).reduce(((e,t)=>{const n=t.name?.length?t.name:t.id;return e[n]=t,e}),{})}finally{this.loading=!1}}},mounted(){this.$watch((()=>this.selected),(e=>{e&&!this.initialized&&(this.refresh(),this.initialized=!0)})),this.bus.on("refresh",this.onRefreshEvent)},unmounted(){this.bus.off("refresh",this.onRefreshEvent)}};const s=o;var a=s},8671:function(e,t,n){n.d(t,{Z:function(){return w}});var i=n(6252),o=n(9963),s=n(3577);const a=e=>((0,i.dD)("data-v-38eb9831"),e=e(),(0,i.Cn)(),e),l={class:"name col-l-10 col-m-9 col-s-8"},d=a((()=>(0,i._)("i",{class:"fa fa-info"},null,-1))),c=[d],u=["textContent"],r={class:"toggler col-l-2 col-m-3 col-s-4"};function g(e,t,n,a,d,g){const h=(0,i.up)("Loading"),p=(0,i.up)("ToggleSwitch");return(0,i.wg)(),(0,i.iD)("div",{class:"switch",onClick:t[1]||(t[1]=(0,o.iM)(((...e)=>g.onToggle&&g.onToggle(...e)),["stop"]))},[n.loading?((0,i.wg)(),(0,i.j4)(h,{key:0})):(0,i.kq)("",!0),(0,i._)("div",l,[n.hasInfo?((0,i.wg)(),(0,i.iD)("button",{key:0,onClick:t[0]||(t[0]=(0,o.iM)(((...e)=>g.onInfo&&g.onInfo(...e)),["prevent"]))},c)):(0,i.kq)("",!0),(0,i._)("span",{class:"name-content",textContent:(0,s.zw)(n.name)},null,8,u)]),(0,i._)("div",r,[(0,i.Wm)(p,{disabled:n.loading,value:n.state,onInput:g.onToggle},null,8,["disabled","value","onInput"])])])}var h=n(6137),p=n(1232),f={name:"Switch",components:{Loading:p.Z,ToggleSwitch:h.Z},emits:["toggle","info"],props:{name:{type:String,required:!0},state:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},hasInfo:{type:Boolean,default:!1},id:{type:String}},methods:{onInfo(e){return e.stopPropagation(),this.$emit("info"),!1},onToggle(e){return e.stopPropagation(),this.$emit("toggle"),!1}}},v=n(3744);const m=(0,v.Z)(f,[["render",g],["__scopeId","data-v-38eb9831"]]);var w=m},2380:function(e,t,n){n.r(t),n.d(t,{default:function(){return h}});var i=n(6252);const o={class:"switches zwave-mqtt-switches"},s={key:1,class:"no-content"};function a(e,t,n,a,l,d){const c=(0,i.up)("Loading"),u=(0,i.up)("Switch");return(0,i.wg)(),(0,i.iD)("div",o,[e.loading?((0,i.wg)(),(0,i.j4)(c,{key:0})):Object.keys(e.devices).length?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",s,"No Z-Wave switches found.")),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.devices,((t,n)=>((0,i.wg)(),(0,i.j4)(u,{loading:e.loading,name:n,state:t.on,id:t.id,onToggle:i=>e.toggle(n,t.id),key:n},null,8,["loading","name","state","id","onToggle"])))),128))])}var l=n(1232),d=n(4004),c=n(8671),u={name:"ZwaveMqtt",components:{Switch:c.Z,Loading:l.Z},mixins:[d.Z]},r=n(3744);const g=(0,r.Z)(u,[["render",a],["__scopeId","data-v-c92e52f8"]]);var h=g}}]);
|
||||
//# sourceMappingURL=2380.73b1a20d.js.map
|
1
platypush/backend/http/webapp/dist/static/js/2380.73b1a20d.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/2380.73b1a20d.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,2 +0,0 @@
|
|||
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[2380],{3567:function(e,t,n){n.d(t,{Z:function(){return h}});var i=n(6252),o=n(3577);const s=e=>((0,i.dD)("data-v-8fae7678"),e=e(),(0,i.Cn)(),e),a=["checked"],l=s((()=>(0,i._)("div",{class:"switch"},[(0,i._)("div",{class:"dot"})],-1))),d={class:"label"};function c(e,t,n,s,c,u){return(0,i.wg)(),(0,i.iD)("div",{class:(0,o.C_)(["power-switch",{disabled:n.disabled}]),onClick:t[0]||(t[0]=(...e)=>u.onInput&&u.onInput(...e))},[(0,i._)("input",{type:"checkbox",checked:n.value},null,8,a),(0,i._)("label",null,[l,(0,i._)("span",d,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])])],2)}var u={name:"ToggleSwitch",emits:["input"],props:{value:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},methods:{onInput(e){if(e.stopPropagation(),this.disabled)return!1;this.$emit("input",e)}}},r=n(3744);const g=(0,r.Z)(u,[["render",c],["__scopeId","data-v-8fae7678"]]);var h=g},4004:function(e,t,n){n.d(t,{Z:function(){return a}});var i=n(2628),o={name:"SwitchesMixin",mixins:[i.Z],props:{pluginName:{type:String,required:!0},bus:{type:Object,required:!0},config:{type:Object,default:()=>({})},selected:{type:Boolean,default:!1}},data(){return{loading:!1,initialized:!1,selectedDevice:null,devices:{}}},methods:{onRefreshEvent(e){e===this.pluginName&&this.refresh()},async toggle(e,t){null==t&&(t=e);const n=await this.request(`${this.pluginName}.toggle`,{device:t});this.devices[e].on=n.on},async refresh(){this.loading=!0;try{this.devices=(await this.request(`${this.pluginName}.switch_status`)).reduce(((e,t)=>{const n=t.name?.length?t.name:t.id;return e[n]=t,e}),{})}finally{this.loading=!1}}},mounted(){this.$watch((()=>this.selected),(e=>{e&&!this.initialized&&(this.refresh(),this.initialized=!0)})),this.bus.on("refresh",this.onRefreshEvent)},unmounted(){this.bus.off("refresh",this.onRefreshEvent)}};const s=o;var a=s},8671:function(e,t,n){n.d(t,{Z:function(){return w}});var i=n(6252),o=n(9963),s=n(3577);const a=e=>((0,i.dD)("data-v-38eb9831"),e=e(),(0,i.Cn)(),e),l={class:"name col-l-10 col-m-9 col-s-8"},d=a((()=>(0,i._)("i",{class:"fa fa-info"},null,-1))),c=[d],u=["textContent"],r={class:"toggler col-l-2 col-m-3 col-s-4"};function g(e,t,n,a,d,g){const h=(0,i.up)("Loading"),p=(0,i.up)("ToggleSwitch");return(0,i.wg)(),(0,i.iD)("div",{class:"switch",onClick:t[1]||(t[1]=(0,o.iM)(((...e)=>g.onToggle&&g.onToggle(...e)),["stop"]))},[n.loading?((0,i.wg)(),(0,i.j4)(h,{key:0})):(0,i.kq)("",!0),(0,i._)("div",l,[n.hasInfo?((0,i.wg)(),(0,i.iD)("button",{key:0,onClick:t[0]||(t[0]=(0,o.iM)(((...e)=>g.onInfo&&g.onInfo(...e)),["prevent"]))},c)):(0,i.kq)("",!0),(0,i._)("span",{class:"name-content",textContent:(0,s.zw)(n.name)},null,8,u)]),(0,i._)("div",r,[(0,i.Wm)(p,{disabled:n.loading,value:n.state,onInput:g.onToggle},null,8,["disabled","value","onInput"])])])}var h=n(3567),p=n(1232),f={name:"Switch",components:{Loading:p.Z,ToggleSwitch:h.Z},emits:["toggle","info"],props:{name:{type:String,required:!0},state:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},hasInfo:{type:Boolean,default:!1},id:{type:String}},methods:{onInfo(e){return e.stopPropagation(),this.$emit("info"),!1},onToggle(e){return e.stopPropagation(),this.$emit("toggle"),!1}}},v=n(3744);const m=(0,v.Z)(f,[["render",g],["__scopeId","data-v-38eb9831"]]);var w=m},2380:function(e,t,n){n.r(t),n.d(t,{default:function(){return h}});var i=n(6252);const o={class:"switches zwave-mqtt-switches"},s={key:1,class:"no-content"};function a(e,t,n,a,l,d){const c=(0,i.up)("Loading"),u=(0,i.up)("Switch");return(0,i.wg)(),(0,i.iD)("div",o,[e.loading?((0,i.wg)(),(0,i.j4)(c,{key:0})):Object.keys(e.devices).length?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",s,"No Z-Wave switches found.")),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.devices,((t,n)=>((0,i.wg)(),(0,i.j4)(u,{loading:e.loading,name:n,state:t.on,id:t.id,onToggle:i=>e.toggle(n,t.id),key:n},null,8,["loading","name","state","id","onToggle"])))),128))])}var l=n(1232),d=n(4004),c=n(8671),u={name:"ZwaveMqtt",components:{Switch:c.Z,Loading:l.Z},mixins:[d.Z]},r=n(3744);const g=(0,r.Z)(u,[["render",a],["__scopeId","data-v-c92e52f8"]]);var h=g}}]);
|
||||
//# sourceMappingURL=2380.bae8d47d.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/2790-legacy.df38f403.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/2790-legacy.df38f403.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/js/2790-legacy.df38f403.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/2790-legacy.df38f403.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/2790.bf6f297a.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/2790.bf6f297a.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/js/2790.bf6f297a.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/2790.bf6f297a.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/2844-legacy.a6c67900.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/2844-legacy.a6c67900.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/js/2844-legacy.a6c67900.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/2844-legacy.a6c67900.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/2844.357b0781.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/2844.357b0781.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/js/2844.357b0781.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/2844.357b0781.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/3674.3c7517b4.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/3674.3c7517b4.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/3785-legacy.3401a917.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/3785-legacy.3401a917.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/js/3785-legacy.3401a917.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/3785-legacy.3401a917.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/3785.8c572e27.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/3785.8c572e27.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/js/3785.8c572e27.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/3785.8c572e27.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,2 +1,2 @@
|
|||
(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[4276],{4276:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return R}});t(7941);var i=t(6252),r=t(3577),s=t(9963),u=function(e){return(0,i.dD)("data-v-eac2ea44"),e=e(),(0,i.Cn)(),e},c={class:"switches-container"},l={class:"switch-plugins"},o={key:0,class:"no-content"},a=["onClick"],d=["textContent"],p={key:0,class:"refresh col-2"},f=["onClick","disabled"],g=u((function(){return(0,i._)("i",{class:"fa fa-sync"},null,-1)})),h=[g],w={class:"refresh-button"},v=["disabled"],m=u((function(){return(0,i._)("i",{class:"fa fa-sync"},null,-1)})),k=[m];function b(e,n,t,u,g,m){var b=(0,i.up)("Loading");return(0,i.wg)(),(0,i.iD)("div",c,[g.loading?((0,i.wg)(),(0,i.j4)(b,{key:0})):(0,i.kq)("",!0),(0,i._)("div",l,[Object.keys(g.plugins).length?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",o,"No switch plugins configured")),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(Object.keys(g.plugins),(function(e){return(0,i.wg)(),(0,i.iD)("div",{class:"switch-plugin",key:e,onClick:function(n){return g.selectedPlugin=g.selectedPlugin===e?null:e}},[(0,i._)("div",{class:(0,r.C_)(["header",{selected:g.selectedPlugin===e}])},[(0,i._)("div",{class:"name col-10",textContent:(0,r.zw)(e)},null,8,d),g.selectedPlugin===e?((0,i.wg)(),(0,i.iD)("div",p,[(0,i._)("button",{onClick:(0,s.iM)((function(n){return g.bus.emit("refresh",e)}),["stop"]),title:"Refresh plugin",disabled:g.loading},h,8,f)])):(0,i.kq)("",!0)],2),(0,i._)("div",{class:(0,r.C_)(["body",{hidden:g.selectedPlugin!==e}])},[((0,i.wg)(),(0,i.j4)((0,i.LL)(g.components[e]),{config:g.plugins[e],"plugin-name":e,selected:g.selectedPlugin===e,bus:g.bus},null,8,["config","plugin-name","selected","bus"]))],2)],8,a)})),128))]),(0,i._)("div",w,[(0,i._)("button",{onClick:n[0]||(n[0]=function(){return m.refresh&&m.refresh.apply(m,arguments)}),disabled:g.loading,title:"Refresh plugins"},k,8,v)])])}var x=t(8534),_=(t(5666),t(1539),t(4747),t(9600),t(1249),t(4916),t(3123),t(7042),t(8783),t(3948),t(1232)),y=t(2628),C=t(9652),I={name:"Switches",components:{Loading:_.Z},mixins:[y.Z],data:function(){return{loading:!1,plugins:{},components:{},selectedPlugin:null,bus:(0,C.Z)()}},methods:{initPanels:function(){var e=this;this.components={},Object.keys(this.plugins).forEach(function(){var n=(0,x.Z)(regeneratorRuntime.mark((function n(r){var s,u,c;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return s=r.split(".").map((function(e){return e[0].toUpperCase()+e.slice(1)})).join(""),u=null,n.prev=2,n.next=5,t(6371)("./".concat(s,"/Index"));case 5:u=n.sent,n.next=11;break;case 8:return n.prev=8,n.t0=n["catch"](2),n.abrupt("return");case 11:c=(0,i.RC)((0,x.Z)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",u);case 1:case"end":return e.stop()}}),e)})))),e.$options.components[r]=c,e.components[r]=c;case 14:case"end":return n.stop()}}),n,null,[[2,8]])})));return function(e){return n.apply(this,arguments)}}())},refresh:function(){var e=this;return(0,x.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.loading=!0,n.prev=1,n.next=4,e.request("utils.get_switch_plugins");case 4:e.plugins=n.sent,e.initPanels();case 6:return n.prev=6,e.loading=!1,n.finish(6);case 9:case"end":return n.stop()}}),n,null,[[1,,6,9]])})))()}},mounted:function(){this.refresh()}},P=t(3744);const Z=(0,P.Z)(I,[["render",b],["__scopeId","data-v-eac2ea44"]]);var R=Z},6371:function(e,n,t){var i={"./LightHue/Index":[2844,7373,6590,2844],"./Smartthings/Index":[9196,7373,6590,9196],"./SwitchTplink/Index":[3785,7373,6590,3785],"./SwitchWemo/Index":[5210,7373,6590,5210],"./Switchbot/Index":[9694,7373,6590,9694],"./SwitchbotBluetooth/Index":[9694,7373,6590,9694],"./ZigbeeMqtt/Index":[5466,7373,6590,5466],"./Zwave/Index":[7262,7373,6590,7262],"./ZwaveMqtt/Index":[2380,7373,6590,2380]};function r(e){if(!t.o(i,e))return Promise.resolve().then((function(){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}));var n=i[e],r=n[0];return Promise.all(n.slice(1).map(t.e)).then((function(){return t(r)}))}r.keys=function(){return Object.keys(i)},r.id=6371,e.exports=r}}]);
|
||||
//# sourceMappingURL=4276-legacy.6b94488f.js.map
|
||||
(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[4276],{4276:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return R}});t(7941);var i=t(6252),r=t(3577),s=t(9963),u=function(e){return(0,i.dD)("data-v-eac2ea44"),e=e(),(0,i.Cn)(),e},c={class:"switches-container"},l={class:"switch-plugins"},o={key:0,class:"no-content"},a=["onClick"],d=["textContent"],p={key:0,class:"refresh col-2"},f=["onClick","disabled"],g=u((function(){return(0,i._)("i",{class:"fa fa-sync"},null,-1)})),h=[g],w={class:"refresh-button"},v=["disabled"],m=u((function(){return(0,i._)("i",{class:"fa fa-sync"},null,-1)})),k=[m];function b(e,n,t,u,g,m){var b=(0,i.up)("Loading");return(0,i.wg)(),(0,i.iD)("div",c,[g.loading?((0,i.wg)(),(0,i.j4)(b,{key:0})):(0,i.kq)("",!0),(0,i._)("div",l,[Object.keys(g.plugins).length?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",o,"No switch plugins configured")),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(Object.keys(g.plugins),(function(e){return(0,i.wg)(),(0,i.iD)("div",{class:"switch-plugin",key:e,onClick:function(n){return g.selectedPlugin=g.selectedPlugin===e?null:e}},[(0,i._)("div",{class:(0,r.C_)(["header",{selected:g.selectedPlugin===e}])},[(0,i._)("div",{class:"name col-10",textContent:(0,r.zw)(e)},null,8,d),g.selectedPlugin===e?((0,i.wg)(),(0,i.iD)("div",p,[(0,i._)("button",{onClick:(0,s.iM)((function(n){return g.bus.emit("refresh",e)}),["stop"]),title:"Refresh plugin",disabled:g.loading},h,8,f)])):(0,i.kq)("",!0)],2),(0,i._)("div",{class:(0,r.C_)(["body",{hidden:g.selectedPlugin!==e}])},[((0,i.wg)(),(0,i.j4)((0,i.LL)(g.components[e]),{config:g.plugins[e],"plugin-name":e,selected:g.selectedPlugin===e,bus:g.bus},null,8,["config","plugin-name","selected","bus"]))],2)],8,a)})),128))]),(0,i._)("div",w,[(0,i._)("button",{onClick:n[0]||(n[0]=function(){return m.refresh&&m.refresh.apply(m,arguments)}),disabled:g.loading,title:"Refresh plugins"},k,8,v)])])}var x=t(8534),_=(t(5666),t(1539),t(4747),t(9600),t(1249),t(4916),t(3123),t(7042),t(8783),t(3948),t(1232)),y=t(2628),C=t(9652),I={name:"Switches",components:{Loading:_.Z},mixins:[y.Z],data:function(){return{loading:!1,plugins:{},components:{},selectedPlugin:null,bus:(0,C.Z)()}},methods:{initPanels:function(){var e=this;this.components={},Object.keys(this.plugins).forEach(function(){var n=(0,x.Z)(regeneratorRuntime.mark((function n(r){var s,u,c;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return s=r.split(".").map((function(e){return e[0].toUpperCase()+e.slice(1)})).join(""),u=null,n.prev=2,n.next=5,t(6371)("./".concat(s,"/Index"));case 5:u=n.sent,n.next=11;break;case 8:return n.prev=8,n.t0=n["catch"](2),n.abrupt("return");case 11:c=(0,i.RC)((0,x.Z)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",u);case 1:case"end":return e.stop()}}),e)})))),e.$options.components[r]=c,e.components[r]=c;case 14:case"end":return n.stop()}}),n,null,[[2,8]])})));return function(e){return n.apply(this,arguments)}}())},refresh:function(){var e=this;return(0,x.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.loading=!0,n.prev=1,n.next=4,e.request("utils.get_switch_plugins");case 4:e.plugins=n.sent,e.initPanels();case 6:return n.prev=6,e.loading=!1,n.finish(6);case 9:case"end":return n.stop()}}),n,null,[[1,,6,9]])})))()}},mounted:function(){this.refresh()}},P=t(3744);const Z=(0,P.Z)(I,[["render",b],["__scopeId","data-v-eac2ea44"]]);var R=Z},6371:function(e,n,t){var i={"./LightHue/Index":[2844,1474,6590,2844],"./Smartthings/Index":[9196,1474,6590,9196],"./SwitchTplink/Index":[3785,1474,6590,3785],"./SwitchWemo/Index":[5210,1474,6590,5210],"./Switchbot/Index":[9694,1474,6590,9694],"./SwitchbotBluetooth/Index":[9694,1474,6590,9694],"./ZigbeeMqtt/Index":[5466,1474,6590,5466],"./Zwave/Index":[7262,1474,6590,7262],"./ZwaveMqtt/Index":[2380,1474,6590,2380]};function r(e){if(!t.o(i,e))return Promise.resolve().then((function(){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}));var n=i[e],r=n[0];return Promise.all(n.slice(1).map(t.e)).then((function(){return t(r)}))}r.keys=function(){return Object.keys(i)},r.id=6371,e.exports=r}}]);
|
||||
//# sourceMappingURL=4276-legacy.9ed76a69.js.map
|
File diff suppressed because one or more lines are too long
|
@ -1,2 +1,2 @@
|
|||
(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[4276],{4276:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return D}});var s=t(6252),i=t(3577),l=t(9963);const c=e=>((0,s.dD)("data-v-eac2ea44"),e=e(),(0,s.Cn)(),e),o={class:"switches-container"},a={class:"switch-plugins"},u={key:0,class:"no-content"},d=["onClick"],r=["textContent"],h={key:0,class:"refresh col-2"},g=["onClick","disabled"],p=c((()=>(0,s._)("i",{class:"fa fa-sync"},null,-1))),f=[p],w={class:"refresh-button"},b=["disabled"],k=c((()=>(0,s._)("i",{class:"fa fa-sync"},null,-1))),m=[k];function v(e,n,t,c,p,k){const v=(0,s.up)("Loading");return(0,s.wg)(),(0,s.iD)("div",o,[p.loading?((0,s.wg)(),(0,s.j4)(v,{key:0})):(0,s.kq)("",!0),(0,s._)("div",a,[Object.keys(p.plugins).length?(0,s.kq)("",!0):((0,s.wg)(),(0,s.iD)("div",u,"No switch plugins configured")),((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(Object.keys(p.plugins),(e=>((0,s.wg)(),(0,s.iD)("div",{class:"switch-plugin",key:e,onClick:n=>p.selectedPlugin=p.selectedPlugin===e?null:e},[(0,s._)("div",{class:(0,i.C_)(["header",{selected:p.selectedPlugin===e}])},[(0,s._)("div",{class:"name col-10",textContent:(0,i.zw)(e)},null,8,r),p.selectedPlugin===e?((0,s.wg)(),(0,s.iD)("div",h,[(0,s._)("button",{onClick:(0,l.iM)((n=>p.bus.emit("refresh",e)),["stop"]),title:"Refresh plugin",disabled:p.loading},f,8,g)])):(0,s.kq)("",!0)],2),(0,s._)("div",{class:(0,i.C_)(["body",{hidden:p.selectedPlugin!==e}])},[((0,s.wg)(),(0,s.j4)((0,s.LL)(p.components[e]),{config:p.plugins[e],"plugin-name":e,selected:p.selectedPlugin===e,bus:p.bus},null,8,["config","plugin-name","selected","bus"]))],2)],8,d)))),128))]),(0,s._)("div",w,[(0,s._)("button",{onClick:n[0]||(n[0]=(...e)=>k.refresh&&k.refresh(...e)),disabled:p.loading,title:"Refresh plugins"},m,8,b)])])}var y=t(1232),_=t(2628),C=t(9652),x={name:"Switches",components:{Loading:y.Z},mixins:[_.Z],data(){return{loading:!1,plugins:{},components:{},selectedPlugin:null,bus:(0,C.Z)()}},methods:{initPanels(){this.components={},Object.keys(this.plugins).forEach((async e=>{const n=e.split(".").map((e=>e[0].toUpperCase()+e.slice(1))).join("");let i=null;try{i=await t(6371)(`./${n}/Index`)}catch(c){return}const l=(0,s.RC)((async()=>i));this.$options.components[e]=l,this.components[e]=l}))},async refresh(){this.loading=!0;try{this.plugins=await this.request("utils.get_switch_plugins"),this.initPanels()}finally{this.loading=!1}}},mounted(){this.refresh()}},I=t(3744);const P=(0,I.Z)(x,[["render",v],["__scopeId","data-v-eac2ea44"]]);var D=P},6371:function(e,n,t){var s={"./LightHue/Index":[2844,7373,6590,2844],"./Smartthings/Index":[9196,7373,6590,9196],"./SwitchTplink/Index":[3785,7373,6590,3785],"./SwitchWemo/Index":[5210,7373,6590,5210],"./Switchbot/Index":[9694,7373,6590,9694],"./SwitchbotBluetooth/Index":[9694,7373,6590,9694],"./ZigbeeMqtt/Index":[5466,7373,6590,5466],"./Zwave/Index":[7262,7373,6590,7262],"./ZwaveMqtt/Index":[2380,7373,6590,2380]};function i(e){if(!t.o(s,e))return Promise.resolve().then((function(){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}));var n=s[e],i=n[0];return Promise.all(n.slice(1).map(t.e)).then((function(){return t(i)}))}i.keys=function(){return Object.keys(s)},i.id=6371,e.exports=i}}]);
|
||||
//# sourceMappingURL=4276.c7a274f7.js.map
|
||||
(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[4276],{4276:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return D}});var s=t(6252),i=t(3577),l=t(9963);const c=e=>((0,s.dD)("data-v-eac2ea44"),e=e(),(0,s.Cn)(),e),o={class:"switches-container"},a={class:"switch-plugins"},u={key:0,class:"no-content"},d=["onClick"],r=["textContent"],h={key:0,class:"refresh col-2"},g=["onClick","disabled"],p=c((()=>(0,s._)("i",{class:"fa fa-sync"},null,-1))),f=[p],w={class:"refresh-button"},b=["disabled"],k=c((()=>(0,s._)("i",{class:"fa fa-sync"},null,-1))),m=[k];function v(e,n,t,c,p,k){const v=(0,s.up)("Loading");return(0,s.wg)(),(0,s.iD)("div",o,[p.loading?((0,s.wg)(),(0,s.j4)(v,{key:0})):(0,s.kq)("",!0),(0,s._)("div",a,[Object.keys(p.plugins).length?(0,s.kq)("",!0):((0,s.wg)(),(0,s.iD)("div",u,"No switch plugins configured")),((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(Object.keys(p.plugins),(e=>((0,s.wg)(),(0,s.iD)("div",{class:"switch-plugin",key:e,onClick:n=>p.selectedPlugin=p.selectedPlugin===e?null:e},[(0,s._)("div",{class:(0,i.C_)(["header",{selected:p.selectedPlugin===e}])},[(0,s._)("div",{class:"name col-10",textContent:(0,i.zw)(e)},null,8,r),p.selectedPlugin===e?((0,s.wg)(),(0,s.iD)("div",h,[(0,s._)("button",{onClick:(0,l.iM)((n=>p.bus.emit("refresh",e)),["stop"]),title:"Refresh plugin",disabled:p.loading},f,8,g)])):(0,s.kq)("",!0)],2),(0,s._)("div",{class:(0,i.C_)(["body",{hidden:p.selectedPlugin!==e}])},[((0,s.wg)(),(0,s.j4)((0,s.LL)(p.components[e]),{config:p.plugins[e],"plugin-name":e,selected:p.selectedPlugin===e,bus:p.bus},null,8,["config","plugin-name","selected","bus"]))],2)],8,d)))),128))]),(0,s._)("div",w,[(0,s._)("button",{onClick:n[0]||(n[0]=(...e)=>k.refresh&&k.refresh(...e)),disabled:p.loading,title:"Refresh plugins"},m,8,b)])])}var y=t(1232),_=t(2628),C=t(9652),x={name:"Switches",components:{Loading:y.Z},mixins:[_.Z],data(){return{loading:!1,plugins:{},components:{},selectedPlugin:null,bus:(0,C.Z)()}},methods:{initPanels(){this.components={},Object.keys(this.plugins).forEach((async e=>{const n=e.split(".").map((e=>e[0].toUpperCase()+e.slice(1))).join("");let i=null;try{i=await t(6371)(`./${n}/Index`)}catch(c){return}const l=(0,s.RC)((async()=>i));this.$options.components[e]=l,this.components[e]=l}))},async refresh(){this.loading=!0;try{this.plugins=await this.request("utils.get_switch_plugins"),this.initPanels()}finally{this.loading=!1}}},mounted(){this.refresh()}},I=t(3744);const P=(0,I.Z)(x,[["render",v],["__scopeId","data-v-eac2ea44"]]);var D=P},6371:function(e,n,t){var s={"./LightHue/Index":[2844,1474,6590,2844],"./Smartthings/Index":[9196,1474,6590,9196],"./SwitchTplink/Index":[3785,1474,6590,3785],"./SwitchWemo/Index":[5210,1474,6590,5210],"./Switchbot/Index":[9694,1474,6590,9694],"./SwitchbotBluetooth/Index":[9694,1474,6590,9694],"./ZigbeeMqtt/Index":[5466,1474,6590,5466],"./Zwave/Index":[7262,1474,6590,7262],"./ZwaveMqtt/Index":[2380,1474,6590,2380]};function i(e){if(!t.o(s,e))return Promise.resolve().then((function(){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}));var n=s[e],i=n[0];return Promise.all(n.slice(1).map(t.e)).then((function(){return t(i)}))}i.keys=function(){return Object.keys(s)},i.id=6371,e.exports=i}}]);
|
||||
//# sourceMappingURL=4276.728421b8.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/4604-legacy.6d373d71.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/4604-legacy.6d373d71.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/js/4604-legacy.6d373d71.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/4604-legacy.6d373d71.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/4604.3ded66e7.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/4604.3ded66e7.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/js/4604.3ded66e7.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/4604.3ded66e7.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/4764.81b5120a.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/4764.81b5120a.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/js/4764.81b5120a.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/4764.81b5120a.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/5210-legacy.38d0da8d.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/5210-legacy.38d0da8d.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/js/5210-legacy.38d0da8d.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/5210-legacy.38d0da8d.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/5210.fae85e4c.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/5210.fae85e4c.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/js/5210.fae85e4c.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/5210.fae85e4c.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/5466-legacy.112f0d2e.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/5466-legacy.112f0d2e.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[5466],{6137:function(e,n,t){t.d(n,{Z:function(){return p}});var i=t(6252),o=t(3577),a=t(9963),r=function(e){return(0,i.dD)("data-v-8e097228"),e=e(),(0,i.Cn)(),e},s=["checked"],u=r((function(){return(0,i._)("div",{class:"switch"},[(0,i._)("div",{class:"dot"})],-1)})),c={class:"label"};function l(e,n,t,r,l,d){return(0,i.wg)(),(0,i.iD)("div",{class:(0,o.C_)(["power-switch",{disabled:t.disabled}]),onClick:n[0]||(n[0]=(0,a.iM)((function(){return d.onInput&&d.onInput.apply(d,arguments)}),["stop"]))},[(0,i._)("input",{type:"checkbox",checked:t.value},null,8,s),(0,i._)("label",null,[u,(0,i._)("span",c,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])])],2)}var d={name:"ToggleSwitch",emits:["input"],props:{value:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},methods:{onInput:function(e){if(this.disabled)return!1;this.$emit("input",e)}}},f=t(3744);const g=(0,f.Z)(d,[["render",l],["__scopeId","data-v-8e097228"]]);var p=g},4004:function(e,n,t){t.d(n,{Z:function(){return s}});var i=t(8534),o=(t(1539),t(8309),t(5666),t(2628)),a={name:"SwitchesMixin",mixins:[o.Z],props:{pluginName:{type:String,required:!0},bus:{type:Object,required:!0},config:{type:Object,default:function(){return{}}},selected:{type:Boolean,default:!1}},data:function(){return{loading:!1,initialized:!1,selectedDevice:null,devices:{}}},methods:{onRefreshEvent:function(e){e===this.pluginName&&this.refresh()},toggle:function(e,n){var t=this;return(0,i.Z)(regeneratorRuntime.mark((function i(){var o;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return null==n&&(n=e),i.next=3,t.request("".concat(t.pluginName,".toggle"),{device:n});case 3:o=i.sent,t.devices[e].on=o.on;case 5:case"end":return i.stop()}}),i)})))()},refresh:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.loading=!0,n.prev=1,n.next=4,e.request("".concat(e.pluginName,".switch_status"));case 4:e.devices=n.sent.reduce((function(e,n){var t,i=null!==(t=n.name)&&void 0!==t&&t.length?n.name:n.id;return e[i]=n,e}),{});case 5:return n.prev=5,e.loading=!1,n.finish(5);case 8:case"end":return n.stop()}}),n,null,[[1,,5,8]])})))()}},mounted:function(){var e=this;this.$watch((function(){return e.selected}),(function(n){n&&!e.initialized&&(e.refresh(),e.initialized=!0)})),this.bus.on("refresh",this.onRefreshEvent)},unmounted:function(){this.bus.off("refresh",this.onRefreshEvent)}};const r=a;var s=r},8671:function(e,n,t){t.d(n,{Z:function(){return w}});t(8309);var i=t(6252),o=t(9963),a=t(3577),r=function(e){return(0,i.dD)("data-v-38eb9831"),e=e(),(0,i.Cn)(),e},s={class:"name col-l-10 col-m-9 col-s-8"},u=r((function(){return(0,i._)("i",{class:"fa fa-info"},null,-1)})),c=[u],l=["textContent"],d={class:"toggler col-l-2 col-m-3 col-s-4"};function f(e,n,t,r,u,f){var g=(0,i.up)("Loading"),p=(0,i.up)("ToggleSwitch");return(0,i.wg)(),(0,i.iD)("div",{class:"switch",onClick:n[1]||(n[1]=(0,o.iM)((function(){return f.onToggle&&f.onToggle.apply(f,arguments)}),["stop"]))},[t.loading?((0,i.wg)(),(0,i.j4)(g,{key:0})):(0,i.kq)("",!0),(0,i._)("div",s,[t.hasInfo?((0,i.wg)(),(0,i.iD)("button",{key:0,onClick:n[0]||(n[0]=(0,o.iM)((function(){return f.onInfo&&f.onInfo.apply(f,arguments)}),["prevent"]))},c)):(0,i.kq)("",!0),(0,i._)("span",{class:"name-content",textContent:(0,a.zw)(t.name)},null,8,l)]),(0,i._)("div",d,[(0,i.Wm)(p,{disabled:t.loading,value:t.state,onInput:f.onToggle},null,8,["disabled","value","onInput"])])])}var g=t(6137),p=t(1232),h={name:"Switch",components:{Loading:p.Z,ToggleSwitch:g.Z},emits:["toggle","info"],props:{name:{type:String,required:!0},state:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},hasInfo:{type:Boolean,default:!1},id:{type:String}},methods:{onInfo:function(e){return e.stopPropagation(),this.$emit("info"),!1},onToggle:function(e){return e.stopPropagation(),this.$emit("toggle"),!1}}},v=t(3744);const m=(0,v.Z)(h,[["render",f],["__scopeId","data-v-38eb9831"]]);var w=m},5466:function(e,n,t){t.r(n),t.d(n,{default:function(){return g}});t(7941);var i=t(6252),o={class:"switches zigbee-mqtt-switches"},a={key:1,class:"no-content"};function r(e,n,t,r,s,u){var c=(0,i.up)("Loading"),l=(0,i.up)("Switch");return(0,i.wg)(),(0,i.iD)("div",o,[e.loading?((0,i.wg)(),(0,i.j4)(c,{key:0})):Object.keys(e.devices).length?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",a,"No Zigbee switches found.")),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.devices,(function(n,t){return(0,i.wg)(),(0,i.j4)(l,{loading:e.loading,name:t,state:n.on,onToggle:function(n){return e.toggle(t)},key:t},null,8,["loading","name","state","onToggle"])})),128))])}var s=t(1232),u=t(4004),c=t(8671),l={name:"ZigbeeMqtt",components:{Switch:c.Z,Loading:s.Z},mixins:[u.Z]},d=t(3744);const f=(0,d.Z)(l,[["render",r],["__scopeId","data-v-33812db1"]]);var g=f}}]);
|
||||
//# sourceMappingURL=5466-legacy.112f0d2e.js.map
|
1
platypush/backend/http/webapp/dist/static/js/5466-legacy.112f0d2e.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/5466-legacy.112f0d2e.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,2 +0,0 @@
|
|||
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[5466],{3567:function(e,n,t){t.d(n,{Z:function(){return g}});var i=t(6252),o=t(3577),a=function(e){return(0,i.dD)("data-v-8fae7678"),e=e(),(0,i.Cn)(),e},r=["checked"],s=a((function(){return(0,i._)("div",{class:"switch"},[(0,i._)("div",{class:"dot"})],-1)})),u={class:"label"};function c(e,n,t,a,c,l){return(0,i.wg)(),(0,i.iD)("div",{class:(0,o.C_)(["power-switch",{disabled:t.disabled}]),onClick:n[0]||(n[0]=function(){return l.onInput&&l.onInput.apply(l,arguments)})},[(0,i._)("input",{type:"checkbox",checked:t.value},null,8,r),(0,i._)("label",null,[s,(0,i._)("span",u,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])])],2)}var l={name:"ToggleSwitch",emits:["input"],props:{value:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},methods:{onInput:function(e){if(e.stopPropagation(),this.disabled)return!1;this.$emit("input",e)}}},d=t(3744);const f=(0,d.Z)(l,[["render",c],["__scopeId","data-v-8fae7678"]]);var g=f},4004:function(e,n,t){t.d(n,{Z:function(){return s}});var i=t(8534),o=(t(1539),t(8309),t(5666),t(2628)),a={name:"SwitchesMixin",mixins:[o.Z],props:{pluginName:{type:String,required:!0},bus:{type:Object,required:!0},config:{type:Object,default:function(){return{}}},selected:{type:Boolean,default:!1}},data:function(){return{loading:!1,initialized:!1,selectedDevice:null,devices:{}}},methods:{onRefreshEvent:function(e){e===this.pluginName&&this.refresh()},toggle:function(e,n){var t=this;return(0,i.Z)(regeneratorRuntime.mark((function i(){var o;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return null==n&&(n=e),i.next=3,t.request("".concat(t.pluginName,".toggle"),{device:n});case 3:o=i.sent,t.devices[e].on=o.on;case 5:case"end":return i.stop()}}),i)})))()},refresh:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.loading=!0,n.prev=1,n.next=4,e.request("".concat(e.pluginName,".switch_status"));case 4:e.devices=n.sent.reduce((function(e,n){var t,i=null!==(t=n.name)&&void 0!==t&&t.length?n.name:n.id;return e[i]=n,e}),{});case 5:return n.prev=5,e.loading=!1,n.finish(5);case 8:case"end":return n.stop()}}),n,null,[[1,,5,8]])})))()}},mounted:function(){var e=this;this.$watch((function(){return e.selected}),(function(n){n&&!e.initialized&&(e.refresh(),e.initialized=!0)})),this.bus.on("refresh",this.onRefreshEvent)},unmounted:function(){this.bus.off("refresh",this.onRefreshEvent)}};const r=a;var s=r},8671:function(e,n,t){t.d(n,{Z:function(){return w}});t(8309);var i=t(6252),o=t(9963),a=t(3577),r=function(e){return(0,i.dD)("data-v-38eb9831"),e=e(),(0,i.Cn)(),e},s={class:"name col-l-10 col-m-9 col-s-8"},u=r((function(){return(0,i._)("i",{class:"fa fa-info"},null,-1)})),c=[u],l=["textContent"],d={class:"toggler col-l-2 col-m-3 col-s-4"};function f(e,n,t,r,u,f){var g=(0,i.up)("Loading"),p=(0,i.up)("ToggleSwitch");return(0,i.wg)(),(0,i.iD)("div",{class:"switch",onClick:n[1]||(n[1]=(0,o.iM)((function(){return f.onToggle&&f.onToggle.apply(f,arguments)}),["stop"]))},[t.loading?((0,i.wg)(),(0,i.j4)(g,{key:0})):(0,i.kq)("",!0),(0,i._)("div",s,[t.hasInfo?((0,i.wg)(),(0,i.iD)("button",{key:0,onClick:n[0]||(n[0]=(0,o.iM)((function(){return f.onInfo&&f.onInfo.apply(f,arguments)}),["prevent"]))},c)):(0,i.kq)("",!0),(0,i._)("span",{class:"name-content",textContent:(0,a.zw)(t.name)},null,8,l)]),(0,i._)("div",d,[(0,i.Wm)(p,{disabled:t.loading,value:t.state,onInput:f.onToggle},null,8,["disabled","value","onInput"])])])}var g=t(3567),p=t(1232),h={name:"Switch",components:{Loading:p.Z,ToggleSwitch:g.Z},emits:["toggle","info"],props:{name:{type:String,required:!0},state:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},hasInfo:{type:Boolean,default:!1},id:{type:String}},methods:{onInfo:function(e){return e.stopPropagation(),this.$emit("info"),!1},onToggle:function(e){return e.stopPropagation(),this.$emit("toggle"),!1}}},v=t(3744);const m=(0,v.Z)(h,[["render",f],["__scopeId","data-v-38eb9831"]]);var w=m},5466:function(e,n,t){t.r(n),t.d(n,{default:function(){return g}});t(7941);var i=t(6252),o={class:"switches zigbee-mqtt-switches"},a={key:1,class:"no-content"};function r(e,n,t,r,s,u){var c=(0,i.up)("Loading"),l=(0,i.up)("Switch");return(0,i.wg)(),(0,i.iD)("div",o,[e.loading?((0,i.wg)(),(0,i.j4)(c,{key:0})):Object.keys(e.devices).length?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",a,"No Zigbee switches found.")),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.devices,(function(n,t){return(0,i.wg)(),(0,i.j4)(l,{loading:e.loading,name:t,state:n.on,onToggle:function(n){return e.toggle(t)},key:t},null,8,["loading","name","state","onToggle"])})),128))])}var s=t(1232),u=t(4004),c=t(8671),l={name:"ZigbeeMqtt",components:{Switch:c.Z,Loading:s.Z},mixins:[u.Z]},d=t(3744);const f=(0,d.Z)(l,[["render",r],["__scopeId","data-v-33812db1"]]);var g=f}}]);
|
||||
//# sourceMappingURL=5466-legacy.acdc5b3a.js.map
|
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/5466.2c2a80df.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/5466.2c2a80df.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[5466],{6137:function(e,t,n){n.d(t,{Z:function(){return p}});var i=n(6252),o=n(3577),s=n(9963);const a=e=>((0,i.dD)("data-v-8e097228"),e=e(),(0,i.Cn)(),e),l=["checked"],c=a((()=>(0,i._)("div",{class:"switch"},[(0,i._)("div",{class:"dot"})],-1))),d={class:"label"};function u(e,t,n,a,u,r){return(0,i.wg)(),(0,i.iD)("div",{class:(0,o.C_)(["power-switch",{disabled:n.disabled}]),onClick:t[0]||(t[0]=(0,s.iM)(((...e)=>r.onInput&&r.onInput(...e)),["stop"]))},[(0,i._)("input",{type:"checkbox",checked:n.value},null,8,l),(0,i._)("label",null,[c,(0,i._)("span",d,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])])],2)}var r={name:"ToggleSwitch",emits:["input"],props:{value:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},methods:{onInput(e){if(this.disabled)return!1;this.$emit("input",e)}}},g=n(3744);const h=(0,g.Z)(r,[["render",u],["__scopeId","data-v-8e097228"]]);var p=h},4004:function(e,t,n){n.d(t,{Z:function(){return a}});var i=n(2628),o={name:"SwitchesMixin",mixins:[i.Z],props:{pluginName:{type:String,required:!0},bus:{type:Object,required:!0},config:{type:Object,default:()=>({})},selected:{type:Boolean,default:!1}},data(){return{loading:!1,initialized:!1,selectedDevice:null,devices:{}}},methods:{onRefreshEvent(e){e===this.pluginName&&this.refresh()},async toggle(e,t){null==t&&(t=e);const n=await this.request(`${this.pluginName}.toggle`,{device:t});this.devices[e].on=n.on},async refresh(){this.loading=!0;try{this.devices=(await this.request(`${this.pluginName}.switch_status`)).reduce(((e,t)=>{const n=t.name?.length?t.name:t.id;return e[n]=t,e}),{})}finally{this.loading=!1}}},mounted(){this.$watch((()=>this.selected),(e=>{e&&!this.initialized&&(this.refresh(),this.initialized=!0)})),this.bus.on("refresh",this.onRefreshEvent)},unmounted(){this.bus.off("refresh",this.onRefreshEvent)}};const s=o;var a=s},8671:function(e,t,n){n.d(t,{Z:function(){return w}});var i=n(6252),o=n(9963),s=n(3577);const a=e=>((0,i.dD)("data-v-38eb9831"),e=e(),(0,i.Cn)(),e),l={class:"name col-l-10 col-m-9 col-s-8"},c=a((()=>(0,i._)("i",{class:"fa fa-info"},null,-1))),d=[c],u=["textContent"],r={class:"toggler col-l-2 col-m-3 col-s-4"};function g(e,t,n,a,c,g){const h=(0,i.up)("Loading"),p=(0,i.up)("ToggleSwitch");return(0,i.wg)(),(0,i.iD)("div",{class:"switch",onClick:t[1]||(t[1]=(0,o.iM)(((...e)=>g.onToggle&&g.onToggle(...e)),["stop"]))},[n.loading?((0,i.wg)(),(0,i.j4)(h,{key:0})):(0,i.kq)("",!0),(0,i._)("div",l,[n.hasInfo?((0,i.wg)(),(0,i.iD)("button",{key:0,onClick:t[0]||(t[0]=(0,o.iM)(((...e)=>g.onInfo&&g.onInfo(...e)),["prevent"]))},d)):(0,i.kq)("",!0),(0,i._)("span",{class:"name-content",textContent:(0,s.zw)(n.name)},null,8,u)]),(0,i._)("div",r,[(0,i.Wm)(p,{disabled:n.loading,value:n.state,onInput:g.onToggle},null,8,["disabled","value","onInput"])])])}var h=n(6137),p=n(1232),f={name:"Switch",components:{Loading:p.Z,ToggleSwitch:h.Z},emits:["toggle","info"],props:{name:{type:String,required:!0},state:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},hasInfo:{type:Boolean,default:!1},id:{type:String}},methods:{onInfo(e){return e.stopPropagation(),this.$emit("info"),!1},onToggle(e){return e.stopPropagation(),this.$emit("toggle"),!1}}},v=n(3744);const m=(0,v.Z)(f,[["render",g],["__scopeId","data-v-38eb9831"]]);var w=m},5466:function(e,t,n){n.r(t),n.d(t,{default:function(){return h}});var i=n(6252);const o={class:"switches zigbee-mqtt-switches"},s={key:1,class:"no-content"};function a(e,t,n,a,l,c){const d=(0,i.up)("Loading"),u=(0,i.up)("Switch");return(0,i.wg)(),(0,i.iD)("div",o,[e.loading?((0,i.wg)(),(0,i.j4)(d,{key:0})):Object.keys(e.devices).length?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",s,"No Zigbee switches found.")),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.devices,((t,n)=>((0,i.wg)(),(0,i.j4)(u,{loading:e.loading,name:n,state:t.on,onToggle:t=>e.toggle(n),key:n},null,8,["loading","name","state","onToggle"])))),128))])}var l=n(1232),c=n(4004),d=n(8671),u={name:"ZigbeeMqtt",components:{Switch:d.Z,Loading:l.Z},mixins:[c.Z]},r=n(3744);const g=(0,r.Z)(u,[["render",a],["__scopeId","data-v-33812db1"]]);var h=g}}]);
|
||||
//# sourceMappingURL=5466.2c2a80df.js.map
|
1
platypush/backend/http/webapp/dist/static/js/5466.2c2a80df.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/5466.2c2a80df.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,2 +0,0 @@
|
|||
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[5466],{3567:function(e,t,n){n.d(t,{Z:function(){return h}});var i=n(6252),o=n(3577);const s=e=>((0,i.dD)("data-v-8fae7678"),e=e(),(0,i.Cn)(),e),a=["checked"],l=s((()=>(0,i._)("div",{class:"switch"},[(0,i._)("div",{class:"dot"})],-1))),c={class:"label"};function d(e,t,n,s,d,u){return(0,i.wg)(),(0,i.iD)("div",{class:(0,o.C_)(["power-switch",{disabled:n.disabled}]),onClick:t[0]||(t[0]=(...e)=>u.onInput&&u.onInput(...e))},[(0,i._)("input",{type:"checkbox",checked:n.value},null,8,a),(0,i._)("label",null,[l,(0,i._)("span",c,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])])],2)}var u={name:"ToggleSwitch",emits:["input"],props:{value:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},methods:{onInput(e){if(e.stopPropagation(),this.disabled)return!1;this.$emit("input",e)}}},r=n(3744);const g=(0,r.Z)(u,[["render",d],["__scopeId","data-v-8fae7678"]]);var h=g},4004:function(e,t,n){n.d(t,{Z:function(){return a}});var i=n(2628),o={name:"SwitchesMixin",mixins:[i.Z],props:{pluginName:{type:String,required:!0},bus:{type:Object,required:!0},config:{type:Object,default:()=>({})},selected:{type:Boolean,default:!1}},data(){return{loading:!1,initialized:!1,selectedDevice:null,devices:{}}},methods:{onRefreshEvent(e){e===this.pluginName&&this.refresh()},async toggle(e,t){null==t&&(t=e);const n=await this.request(`${this.pluginName}.toggle`,{device:t});this.devices[e].on=n.on},async refresh(){this.loading=!0;try{this.devices=(await this.request(`${this.pluginName}.switch_status`)).reduce(((e,t)=>{const n=t.name?.length?t.name:t.id;return e[n]=t,e}),{})}finally{this.loading=!1}}},mounted(){this.$watch((()=>this.selected),(e=>{e&&!this.initialized&&(this.refresh(),this.initialized=!0)})),this.bus.on("refresh",this.onRefreshEvent)},unmounted(){this.bus.off("refresh",this.onRefreshEvent)}};const s=o;var a=s},8671:function(e,t,n){n.d(t,{Z:function(){return w}});var i=n(6252),o=n(9963),s=n(3577);const a=e=>((0,i.dD)("data-v-38eb9831"),e=e(),(0,i.Cn)(),e),l={class:"name col-l-10 col-m-9 col-s-8"},c=a((()=>(0,i._)("i",{class:"fa fa-info"},null,-1))),d=[c],u=["textContent"],r={class:"toggler col-l-2 col-m-3 col-s-4"};function g(e,t,n,a,c,g){const h=(0,i.up)("Loading"),p=(0,i.up)("ToggleSwitch");return(0,i.wg)(),(0,i.iD)("div",{class:"switch",onClick:t[1]||(t[1]=(0,o.iM)(((...e)=>g.onToggle&&g.onToggle(...e)),["stop"]))},[n.loading?((0,i.wg)(),(0,i.j4)(h,{key:0})):(0,i.kq)("",!0),(0,i._)("div",l,[n.hasInfo?((0,i.wg)(),(0,i.iD)("button",{key:0,onClick:t[0]||(t[0]=(0,o.iM)(((...e)=>g.onInfo&&g.onInfo(...e)),["prevent"]))},d)):(0,i.kq)("",!0),(0,i._)("span",{class:"name-content",textContent:(0,s.zw)(n.name)},null,8,u)]),(0,i._)("div",r,[(0,i.Wm)(p,{disabled:n.loading,value:n.state,onInput:g.onToggle},null,8,["disabled","value","onInput"])])])}var h=n(3567),p=n(1232),f={name:"Switch",components:{Loading:p.Z,ToggleSwitch:h.Z},emits:["toggle","info"],props:{name:{type:String,required:!0},state:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},hasInfo:{type:Boolean,default:!1},id:{type:String}},methods:{onInfo(e){return e.stopPropagation(),this.$emit("info"),!1},onToggle(e){return e.stopPropagation(),this.$emit("toggle"),!1}}},v=n(3744);const m=(0,v.Z)(f,[["render",g],["__scopeId","data-v-38eb9831"]]);var w=m},5466:function(e,t,n){n.r(t),n.d(t,{default:function(){return h}});var i=n(6252);const o={class:"switches zigbee-mqtt-switches"},s={key:1,class:"no-content"};function a(e,t,n,a,l,c){const d=(0,i.up)("Loading"),u=(0,i.up)("Switch");return(0,i.wg)(),(0,i.iD)("div",o,[e.loading?((0,i.wg)(),(0,i.j4)(d,{key:0})):Object.keys(e.devices).length?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",s,"No Zigbee switches found.")),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.devices,((t,n)=>((0,i.wg)(),(0,i.j4)(u,{loading:e.loading,name:n,state:t.on,onToggle:t=>e.toggle(n),key:n},null,8,["loading","name","state","onToggle"])))),128))])}var l=n(1232),c=n(4004),d=n(8671),u={name:"ZigbeeMqtt",components:{Switch:d.Z,Loading:l.Z},mixins:[c.Z]},r=n(3744);const g=(0,r.Z)(u,[["render",a],["__scopeId","data-v-33812db1"]]);var h=g}}]);
|
||||
//# sourceMappingURL=5466.4824c7fa.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/js/5824-legacy.f18a2b68.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/5824-legacy.f18a2b68.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/js/5824.0dd40d21.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/5824.0dd40d21.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/6849-legacy.880b0312.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/6849-legacy.880b0312.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/js/6849-legacy.880b0312.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/6849-legacy.880b0312.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,2 +0,0 @@
|
|||
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[7262],{3567:function(e,n,t){t.d(n,{Z:function(){return p}});var i=t(6252),o=t(3577),a=function(e){return(0,i.dD)("data-v-8fae7678"),e=e(),(0,i.Cn)(),e},r=["checked"],s=a((function(){return(0,i._)("div",{class:"switch"},[(0,i._)("div",{class:"dot"})],-1)})),u={class:"label"};function c(e,n,t,a,c,l){return(0,i.wg)(),(0,i.iD)("div",{class:(0,o.C_)(["power-switch",{disabled:t.disabled}]),onClick:n[0]||(n[0]=function(){return l.onInput&&l.onInput.apply(l,arguments)})},[(0,i._)("input",{type:"checkbox",checked:t.value},null,8,r),(0,i._)("label",null,[s,(0,i._)("span",u,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])])],2)}var l={name:"ToggleSwitch",emits:["input"],props:{value:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},methods:{onInput:function(e){if(e.stopPropagation(),this.disabled)return!1;this.$emit("input",e)}}},d=t(3744);const f=(0,d.Z)(l,[["render",c],["__scopeId","data-v-8fae7678"]]);var p=f},4004:function(e,n,t){t.d(n,{Z:function(){return s}});var i=t(8534),o=(t(1539),t(8309),t(5666),t(2628)),a={name:"SwitchesMixin",mixins:[o.Z],props:{pluginName:{type:String,required:!0},bus:{type:Object,required:!0},config:{type:Object,default:function(){return{}}},selected:{type:Boolean,default:!1}},data:function(){return{loading:!1,initialized:!1,selectedDevice:null,devices:{}}},methods:{onRefreshEvent:function(e){e===this.pluginName&&this.refresh()},toggle:function(e,n){var t=this;return(0,i.Z)(regeneratorRuntime.mark((function i(){var o;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return null==n&&(n=e),i.next=3,t.request("".concat(t.pluginName,".toggle"),{device:n});case 3:o=i.sent,t.devices[e].on=o.on;case 5:case"end":return i.stop()}}),i)})))()},refresh:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.loading=!0,n.prev=1,n.next=4,e.request("".concat(e.pluginName,".switch_status"));case 4:e.devices=n.sent.reduce((function(e,n){var t,i=null!==(t=n.name)&&void 0!==t&&t.length?n.name:n.id;return e[i]=n,e}),{});case 5:return n.prev=5,e.loading=!1,n.finish(5);case 8:case"end":return n.stop()}}),n,null,[[1,,5,8]])})))()}},mounted:function(){var e=this;this.$watch((function(){return e.selected}),(function(n){n&&!e.initialized&&(e.refresh(),e.initialized=!0)})),this.bus.on("refresh",this.onRefreshEvent)},unmounted:function(){this.bus.off("refresh",this.onRefreshEvent)}};const r=a;var s=r},8671:function(e,n,t){t.d(n,{Z:function(){return w}});t(8309);var i=t(6252),o=t(9963),a=t(3577),r=function(e){return(0,i.dD)("data-v-38eb9831"),e=e(),(0,i.Cn)(),e},s={class:"name col-l-10 col-m-9 col-s-8"},u=r((function(){return(0,i._)("i",{class:"fa fa-info"},null,-1)})),c=[u],l=["textContent"],d={class:"toggler col-l-2 col-m-3 col-s-4"};function f(e,n,t,r,u,f){var p=(0,i.up)("Loading"),g=(0,i.up)("ToggleSwitch");return(0,i.wg)(),(0,i.iD)("div",{class:"switch",onClick:n[1]||(n[1]=(0,o.iM)((function(){return f.onToggle&&f.onToggle.apply(f,arguments)}),["stop"]))},[t.loading?((0,i.wg)(),(0,i.j4)(p,{key:0})):(0,i.kq)("",!0),(0,i._)("div",s,[t.hasInfo?((0,i.wg)(),(0,i.iD)("button",{key:0,onClick:n[0]||(n[0]=(0,o.iM)((function(){return f.onInfo&&f.onInfo.apply(f,arguments)}),["prevent"]))},c)):(0,i.kq)("",!0),(0,i._)("span",{class:"name-content",textContent:(0,a.zw)(t.name)},null,8,l)]),(0,i._)("div",d,[(0,i.Wm)(g,{disabled:t.loading,value:t.state,onInput:f.onToggle},null,8,["disabled","value","onInput"])])])}var p=t(3567),g=t(1232),h={name:"Switch",components:{Loading:g.Z,ToggleSwitch:p.Z},emits:["toggle","info"],props:{name:{type:String,required:!0},state:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},hasInfo:{type:Boolean,default:!1},id:{type:String}},methods:{onInfo:function(e){return e.stopPropagation(),this.$emit("info"),!1},onToggle:function(e){return e.stopPropagation(),this.$emit("toggle"),!1}}},v=t(3744);const m=(0,v.Z)(h,[["render",f],["__scopeId","data-v-38eb9831"]]);var w=m},7262:function(e,n,t){t.r(n),t.d(n,{default:function(){return p}});t(7941);var i=t(6252),o={class:"switches zwave-switches"},a={key:1,class:"no-content"};function r(e,n,t,r,s,u){var c=(0,i.up)("Loading"),l=(0,i.up)("Switch");return(0,i.wg)(),(0,i.iD)("div",o,[e.loading?((0,i.wg)(),(0,i.j4)(c,{key:0})):Object.keys(e.devices).length?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",a,"No Z-Wave switches found.")),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.devices,(function(n,t){return(0,i.wg)(),(0,i.j4)(l,{loading:e.loading,name:t,state:n.on,id:n.id,onToggle:function(i){return e.toggle(t,n.id)},key:t},null,8,["loading","name","state","id","onToggle"])})),128))])}var s=t(1232),u=t(4004),c=t(8671),l={name:"Zwave",components:{Switch:c.Z,Loading:s.Z},mixins:[u.Z]},d=t(3744);const f=(0,d.Z)(l,[["render",r],["__scopeId","data-v-6aa1e625"]]);var p=f}}]);
|
||||
//# sourceMappingURL=7262-legacy.3d1734c7.js.map
|
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/7262-legacy.53030e4c.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/7262-legacy.53030e4c.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[7262],{6137:function(e,n,t){t.d(n,{Z:function(){return g}});var i=t(6252),o=t(3577),a=t(9963),r=function(e){return(0,i.dD)("data-v-8e097228"),e=e(),(0,i.Cn)(),e},s=["checked"],u=r((function(){return(0,i._)("div",{class:"switch"},[(0,i._)("div",{class:"dot"})],-1)})),c={class:"label"};function l(e,n,t,r,l,d){return(0,i.wg)(),(0,i.iD)("div",{class:(0,o.C_)(["power-switch",{disabled:t.disabled}]),onClick:n[0]||(n[0]=(0,a.iM)((function(){return d.onInput&&d.onInput.apply(d,arguments)}),["stop"]))},[(0,i._)("input",{type:"checkbox",checked:t.value},null,8,s),(0,i._)("label",null,[u,(0,i._)("span",c,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])])],2)}var d={name:"ToggleSwitch",emits:["input"],props:{value:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},methods:{onInput:function(e){if(this.disabled)return!1;this.$emit("input",e)}}},f=t(3744);const p=(0,f.Z)(d,[["render",l],["__scopeId","data-v-8e097228"]]);var g=p},4004:function(e,n,t){t.d(n,{Z:function(){return s}});var i=t(8534),o=(t(1539),t(8309),t(5666),t(2628)),a={name:"SwitchesMixin",mixins:[o.Z],props:{pluginName:{type:String,required:!0},bus:{type:Object,required:!0},config:{type:Object,default:function(){return{}}},selected:{type:Boolean,default:!1}},data:function(){return{loading:!1,initialized:!1,selectedDevice:null,devices:{}}},methods:{onRefreshEvent:function(e){e===this.pluginName&&this.refresh()},toggle:function(e,n){var t=this;return(0,i.Z)(regeneratorRuntime.mark((function i(){var o;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return null==n&&(n=e),i.next=3,t.request("".concat(t.pluginName,".toggle"),{device:n});case 3:o=i.sent,t.devices[e].on=o.on;case 5:case"end":return i.stop()}}),i)})))()},refresh:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.loading=!0,n.prev=1,n.next=4,e.request("".concat(e.pluginName,".switch_status"));case 4:e.devices=n.sent.reduce((function(e,n){var t,i=null!==(t=n.name)&&void 0!==t&&t.length?n.name:n.id;return e[i]=n,e}),{});case 5:return n.prev=5,e.loading=!1,n.finish(5);case 8:case"end":return n.stop()}}),n,null,[[1,,5,8]])})))()}},mounted:function(){var e=this;this.$watch((function(){return e.selected}),(function(n){n&&!e.initialized&&(e.refresh(),e.initialized=!0)})),this.bus.on("refresh",this.onRefreshEvent)},unmounted:function(){this.bus.off("refresh",this.onRefreshEvent)}};const r=a;var s=r},8671:function(e,n,t){t.d(n,{Z:function(){return w}});t(8309);var i=t(6252),o=t(9963),a=t(3577),r=function(e){return(0,i.dD)("data-v-38eb9831"),e=e(),(0,i.Cn)(),e},s={class:"name col-l-10 col-m-9 col-s-8"},u=r((function(){return(0,i._)("i",{class:"fa fa-info"},null,-1)})),c=[u],l=["textContent"],d={class:"toggler col-l-2 col-m-3 col-s-4"};function f(e,n,t,r,u,f){var p=(0,i.up)("Loading"),g=(0,i.up)("ToggleSwitch");return(0,i.wg)(),(0,i.iD)("div",{class:"switch",onClick:n[1]||(n[1]=(0,o.iM)((function(){return f.onToggle&&f.onToggle.apply(f,arguments)}),["stop"]))},[t.loading?((0,i.wg)(),(0,i.j4)(p,{key:0})):(0,i.kq)("",!0),(0,i._)("div",s,[t.hasInfo?((0,i.wg)(),(0,i.iD)("button",{key:0,onClick:n[0]||(n[0]=(0,o.iM)((function(){return f.onInfo&&f.onInfo.apply(f,arguments)}),["prevent"]))},c)):(0,i.kq)("",!0),(0,i._)("span",{class:"name-content",textContent:(0,a.zw)(t.name)},null,8,l)]),(0,i._)("div",d,[(0,i.Wm)(g,{disabled:t.loading,value:t.state,onInput:f.onToggle},null,8,["disabled","value","onInput"])])])}var p=t(6137),g=t(1232),h={name:"Switch",components:{Loading:g.Z,ToggleSwitch:p.Z},emits:["toggle","info"],props:{name:{type:String,required:!0},state:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},hasInfo:{type:Boolean,default:!1},id:{type:String}},methods:{onInfo:function(e){return e.stopPropagation(),this.$emit("info"),!1},onToggle:function(e){return e.stopPropagation(),this.$emit("toggle"),!1}}},v=t(3744);const m=(0,v.Z)(h,[["render",f],["__scopeId","data-v-38eb9831"]]);var w=m},7262:function(e,n,t){t.r(n),t.d(n,{default:function(){return p}});t(7941);var i=t(6252),o={class:"switches zwave-switches"},a={key:1,class:"no-content"};function r(e,n,t,r,s,u){var c=(0,i.up)("Loading"),l=(0,i.up)("Switch");return(0,i.wg)(),(0,i.iD)("div",o,[e.loading?((0,i.wg)(),(0,i.j4)(c,{key:0})):Object.keys(e.devices).length?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",a,"No Z-Wave switches found.")),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.devices,(function(n,t){return(0,i.wg)(),(0,i.j4)(l,{loading:e.loading,name:t,state:n.on,id:n.id,onToggle:function(i){return e.toggle(t,n.id)},key:t},null,8,["loading","name","state","id","onToggle"])})),128))])}var s=t(1232),u=t(4004),c=t(8671),l={name:"Zwave",components:{Switch:c.Z,Loading:s.Z},mixins:[u.Z]},d=t(3744);const f=(0,d.Z)(l,[["render",r],["__scopeId","data-v-6aa1e625"]]);var p=f}}]);
|
||||
//# sourceMappingURL=7262-legacy.53030e4c.js.map
|
1
platypush/backend/http/webapp/dist/static/js/7262-legacy.53030e4c.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/7262-legacy.53030e4c.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/7262.b0ebadee.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/7262.b0ebadee.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[7262],{6137:function(e,t,n){n.d(t,{Z:function(){return p}});var i=n(6252),o=n(3577),s=n(9963);const a=e=>((0,i.dD)("data-v-8e097228"),e=e(),(0,i.Cn)(),e),l=["checked"],d=a((()=>(0,i._)("div",{class:"switch"},[(0,i._)("div",{class:"dot"})],-1))),c={class:"label"};function u(e,t,n,a,u,r){return(0,i.wg)(),(0,i.iD)("div",{class:(0,o.C_)(["power-switch",{disabled:n.disabled}]),onClick:t[0]||(t[0]=(0,s.iM)(((...e)=>r.onInput&&r.onInput(...e)),["stop"]))},[(0,i._)("input",{type:"checkbox",checked:n.value},null,8,l),(0,i._)("label",null,[d,(0,i._)("span",c,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])])],2)}var r={name:"ToggleSwitch",emits:["input"],props:{value:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},methods:{onInput(e){if(this.disabled)return!1;this.$emit("input",e)}}},g=n(3744);const h=(0,g.Z)(r,[["render",u],["__scopeId","data-v-8e097228"]]);var p=h},4004:function(e,t,n){n.d(t,{Z:function(){return a}});var i=n(2628),o={name:"SwitchesMixin",mixins:[i.Z],props:{pluginName:{type:String,required:!0},bus:{type:Object,required:!0},config:{type:Object,default:()=>({})},selected:{type:Boolean,default:!1}},data(){return{loading:!1,initialized:!1,selectedDevice:null,devices:{}}},methods:{onRefreshEvent(e){e===this.pluginName&&this.refresh()},async toggle(e,t){null==t&&(t=e);const n=await this.request(`${this.pluginName}.toggle`,{device:t});this.devices[e].on=n.on},async refresh(){this.loading=!0;try{this.devices=(await this.request(`${this.pluginName}.switch_status`)).reduce(((e,t)=>{const n=t.name?.length?t.name:t.id;return e[n]=t,e}),{})}finally{this.loading=!1}}},mounted(){this.$watch((()=>this.selected),(e=>{e&&!this.initialized&&(this.refresh(),this.initialized=!0)})),this.bus.on("refresh",this.onRefreshEvent)},unmounted(){this.bus.off("refresh",this.onRefreshEvent)}};const s=o;var a=s},8671:function(e,t,n){n.d(t,{Z:function(){return w}});var i=n(6252),o=n(9963),s=n(3577);const a=e=>((0,i.dD)("data-v-38eb9831"),e=e(),(0,i.Cn)(),e),l={class:"name col-l-10 col-m-9 col-s-8"},d=a((()=>(0,i._)("i",{class:"fa fa-info"},null,-1))),c=[d],u=["textContent"],r={class:"toggler col-l-2 col-m-3 col-s-4"};function g(e,t,n,a,d,g){const h=(0,i.up)("Loading"),p=(0,i.up)("ToggleSwitch");return(0,i.wg)(),(0,i.iD)("div",{class:"switch",onClick:t[1]||(t[1]=(0,o.iM)(((...e)=>g.onToggle&&g.onToggle(...e)),["stop"]))},[n.loading?((0,i.wg)(),(0,i.j4)(h,{key:0})):(0,i.kq)("",!0),(0,i._)("div",l,[n.hasInfo?((0,i.wg)(),(0,i.iD)("button",{key:0,onClick:t[0]||(t[0]=(0,o.iM)(((...e)=>g.onInfo&&g.onInfo(...e)),["prevent"]))},c)):(0,i.kq)("",!0),(0,i._)("span",{class:"name-content",textContent:(0,s.zw)(n.name)},null,8,u)]),(0,i._)("div",r,[(0,i.Wm)(p,{disabled:n.loading,value:n.state,onInput:g.onToggle},null,8,["disabled","value","onInput"])])])}var h=n(6137),p=n(1232),f={name:"Switch",components:{Loading:p.Z,ToggleSwitch:h.Z},emits:["toggle","info"],props:{name:{type:String,required:!0},state:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},hasInfo:{type:Boolean,default:!1},id:{type:String}},methods:{onInfo(e){return e.stopPropagation(),this.$emit("info"),!1},onToggle(e){return e.stopPropagation(),this.$emit("toggle"),!1}}},v=n(3744);const m=(0,v.Z)(f,[["render",g],["__scopeId","data-v-38eb9831"]]);var w=m},7262:function(e,t,n){n.r(t),n.d(t,{default:function(){return h}});var i=n(6252);const o={class:"switches zwave-switches"},s={key:1,class:"no-content"};function a(e,t,n,a,l,d){const c=(0,i.up)("Loading"),u=(0,i.up)("Switch");return(0,i.wg)(),(0,i.iD)("div",o,[e.loading?((0,i.wg)(),(0,i.j4)(c,{key:0})):Object.keys(e.devices).length?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",s,"No Z-Wave switches found.")),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.devices,((t,n)=>((0,i.wg)(),(0,i.j4)(u,{loading:e.loading,name:n,state:t.on,id:t.id,onToggle:i=>e.toggle(n,t.id),key:n},null,8,["loading","name","state","id","onToggle"])))),128))])}var l=n(1232),d=n(4004),c=n(8671),u={name:"Zwave",components:{Switch:c.Z,Loading:l.Z},mixins:[d.Z]},r=n(3744);const g=(0,r.Z)(u,[["render",a],["__scopeId","data-v-6aa1e625"]]);var h=g}}]);
|
||||
//# sourceMappingURL=7262.b0ebadee.js.map
|
1
platypush/backend/http/webapp/dist/static/js/7262.b0ebadee.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/7262.b0ebadee.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,2 +0,0 @@
|
|||
"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[7262],{3567:function(e,t,n){n.d(t,{Z:function(){return h}});var i=n(6252),o=n(3577);const s=e=>((0,i.dD)("data-v-8fae7678"),e=e(),(0,i.Cn)(),e),a=["checked"],l=s((()=>(0,i._)("div",{class:"switch"},[(0,i._)("div",{class:"dot"})],-1))),d={class:"label"};function c(e,t,n,s,c,u){return(0,i.wg)(),(0,i.iD)("div",{class:(0,o.C_)(["power-switch",{disabled:n.disabled}]),onClick:t[0]||(t[0]=(...e)=>u.onInput&&u.onInput(...e))},[(0,i._)("input",{type:"checkbox",checked:n.value},null,8,a),(0,i._)("label",null,[l,(0,i._)("span",d,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])])],2)}var u={name:"ToggleSwitch",emits:["input"],props:{value:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},methods:{onInput(e){if(e.stopPropagation(),this.disabled)return!1;this.$emit("input",e)}}},r=n(3744);const g=(0,r.Z)(u,[["render",c],["__scopeId","data-v-8fae7678"]]);var h=g},4004:function(e,t,n){n.d(t,{Z:function(){return a}});var i=n(2628),o={name:"SwitchesMixin",mixins:[i.Z],props:{pluginName:{type:String,required:!0},bus:{type:Object,required:!0},config:{type:Object,default:()=>({})},selected:{type:Boolean,default:!1}},data(){return{loading:!1,initialized:!1,selectedDevice:null,devices:{}}},methods:{onRefreshEvent(e){e===this.pluginName&&this.refresh()},async toggle(e,t){null==t&&(t=e);const n=await this.request(`${this.pluginName}.toggle`,{device:t});this.devices[e].on=n.on},async refresh(){this.loading=!0;try{this.devices=(await this.request(`${this.pluginName}.switch_status`)).reduce(((e,t)=>{const n=t.name?.length?t.name:t.id;return e[n]=t,e}),{})}finally{this.loading=!1}}},mounted(){this.$watch((()=>this.selected),(e=>{e&&!this.initialized&&(this.refresh(),this.initialized=!0)})),this.bus.on("refresh",this.onRefreshEvent)},unmounted(){this.bus.off("refresh",this.onRefreshEvent)}};const s=o;var a=s},8671:function(e,t,n){n.d(t,{Z:function(){return w}});var i=n(6252),o=n(9963),s=n(3577);const a=e=>((0,i.dD)("data-v-38eb9831"),e=e(),(0,i.Cn)(),e),l={class:"name col-l-10 col-m-9 col-s-8"},d=a((()=>(0,i._)("i",{class:"fa fa-info"},null,-1))),c=[d],u=["textContent"],r={class:"toggler col-l-2 col-m-3 col-s-4"};function g(e,t,n,a,d,g){const h=(0,i.up)("Loading"),p=(0,i.up)("ToggleSwitch");return(0,i.wg)(),(0,i.iD)("div",{class:"switch",onClick:t[1]||(t[1]=(0,o.iM)(((...e)=>g.onToggle&&g.onToggle(...e)),["stop"]))},[n.loading?((0,i.wg)(),(0,i.j4)(h,{key:0})):(0,i.kq)("",!0),(0,i._)("div",l,[n.hasInfo?((0,i.wg)(),(0,i.iD)("button",{key:0,onClick:t[0]||(t[0]=(0,o.iM)(((...e)=>g.onInfo&&g.onInfo(...e)),["prevent"]))},c)):(0,i.kq)("",!0),(0,i._)("span",{class:"name-content",textContent:(0,s.zw)(n.name)},null,8,u)]),(0,i._)("div",r,[(0,i.Wm)(p,{disabled:n.loading,value:n.state,onInput:g.onToggle},null,8,["disabled","value","onInput"])])])}var h=n(3567),p=n(1232),f={name:"Switch",components:{Loading:p.Z,ToggleSwitch:h.Z},emits:["toggle","info"],props:{name:{type:String,required:!0},state:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},hasInfo:{type:Boolean,default:!1},id:{type:String}},methods:{onInfo(e){return e.stopPropagation(),this.$emit("info"),!1},onToggle(e){return e.stopPropagation(),this.$emit("toggle"),!1}}},v=n(3744);const m=(0,v.Z)(f,[["render",g],["__scopeId","data-v-38eb9831"]]);var w=m},7262:function(e,t,n){n.r(t),n.d(t,{default:function(){return h}});var i=n(6252);const o={class:"switches zwave-switches"},s={key:1,class:"no-content"};function a(e,t,n,a,l,d){const c=(0,i.up)("Loading"),u=(0,i.up)("Switch");return(0,i.wg)(),(0,i.iD)("div",o,[e.loading?((0,i.wg)(),(0,i.j4)(c,{key:0})):Object.keys(e.devices).length?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",s,"No Z-Wave switches found.")),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.devices,((t,n)=>((0,i.wg)(),(0,i.j4)(u,{loading:e.loading,name:n,state:t.on,id:t.id,onToggle:i=>e.toggle(n,t.id),key:n},null,8,["loading","name","state","id","onToggle"])))),128))])}var l=n(1232),d=n(4004),c=n(8671),u={name:"Zwave",components:{Switch:c.Z,Loading:l.Z},mixins:[d.Z]},r=n(3744);const g=(0,r.Z)(u,[["render",a],["__scopeId","data-v-6aa1e625"]]);var h=g}}]);
|
||||
//# sourceMappingURL=7262.b389a8de.js.map
|
File diff suppressed because one or more lines are too long
2
platypush/backend/http/webapp/dist/static/js/747.21f6bf7b.js
vendored
Normal file
2
platypush/backend/http/webapp/dist/static/js/747.21f6bf7b.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
platypush/backend/http/webapp/dist/static/js/747.21f6bf7b.js.map
vendored
Normal file
1
platypush/backend/http/webapp/dist/static/js/747.21f6bf7b.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue