UNPKG

zwave-js-ui

Version:

Z-Wave Control Panel and MQTT Gateway

2 lines (1 loc) 1.29 kB
import{_ as c,a as u,e as l,h as r,w as m,c as o,H as i,k as g,t as y,O as d,x as h,z as a}from"./index-DwzE-W2i.js";const k={data:()=>({requiredKeys:["S2_Unauthenticated","S2_Authenticated","S2_AccessControl","S0_Legacy"],requiredKeysLongRange:["S2_Authenticated","S2_AccessControl"]}),computed:{...u(h,["zwave"]),missingKeys(){const t=this.zwave.securityKeys||{},e=[];for(const s of this.requiredKeys)(!t[s]||t[s].length!==32)&&e.push(s);return e},missingZwlrKeys(){const t=this.zwave.securityKeysLongRange||{},e=[];for(const s of this.requiredKeysLongRange)(!t[s]||t[s].length!==32)&&e.push(s);return e}}},K={key:0},_={key:1};function f(t,e,s,p,S,n){return n.missingKeys.length>0||n.missingZwlrKeys.length>0?(a(),l(d,{key:0,"max-width":"600px",density:"compact",border:"start",type:"warning"},{default:m(()=>[n.missingKeys.length>0?(a(),o("p",K,[e[0]||(e[0]=g(" Some Z-Wave security keys are missing: ",-1)),i("strong",null,y(n.missingKeys.join(", ")),1)])):r("",!0),n.missingZwlrKeys.length>0?(a(),o("p",_,[e[1]||(e[1]=g(" Some Z-Wave Long Range security keys are missing: ",-1)),i("strong",null,y(n.missingZwlrKeys.join(", ")),1)])):r("",!0),e[2]||(e[2]=i("span",null,"Please make sure to set the keys in Settings.",-1))]),_:1})):r("",!0)}const x=c(k,[["render",f]]);export{x as default};