UNPKG

zwave-js-ui

Version:

Z-Wave Control Panel and MQTT Gateway

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