zwave-js-ui
Version:
Z-Wave Control Panel and MQTT Gateway
9 lines (5 loc) • 1.53 kB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./FirmwareUpdates-ChucsiRT.js","./index-B9yS4Bcc.js","./index-Bm7DxUwf.css"])))=>i.map(i=>d[i]);
import{_ as s,d as n,z as d,I as i,r as p,o as c,l as u}from"./index-B9yS4Bcc.js";const m={components:{FirmwareUpdates:n(()=>d(()=>import("./FirmwareUpdates-ChucsiRT.js"),__vite__mapDeps([0,1,2]),import.meta.url))},mixins:[i],props:{node:{type:Object,required:!0},socket:{type:Object,required:!0}},data(){return{showDowngrades:void 0}},methods:{async updateFirmware(e){if(await this.app.confirm("Firmware Upgrade",`<p>Are you sure you want to upgrade your controller to <b>v${e.version}</b>?</p>
<p><strong>We don't take any responsibility if devices upgraded using Z-Wave JS don't work after an update. Always double-check that the correct update is about to be installed</strong></p>
<p>This will download the desired firmware update from the <a href="https://github.com/zwave-js/firmware-updates/">Z-Wave JS firmware update service</a> and start the upgrade process.</p>
`,"warning",{confirmText:"Upgrade",cancelText:"Cancel",width:"500px"})){const t=await this.app.apiRequest("firmwareUpdateOTW",[e]);await this.app.handleFwUpdateResponse(t)}}}};function w(e,t,a,l,h,r){const o=p("FirmwareUpdates");return c(),u(o,{node:a.node,socket:a.socket,"hide-targets":!0,"hide-downgrades":!0,onUpdateFirmware:r.updateFirmware},null,8,["node","socket","onUpdateFirmware"])}const _=s(m,[["render",w]]);export{_ as default};