diff --git a/index.html b/index.html index a3a7e2f..2a147af 100644 --- a/index.html +++ b/index.html @@ -151,7 +151,8 @@
{{ cliContact.advName }}
-
+
+
Login
Close
@@ -510,6 +511,28 @@ alert("Failed to get battery voltage!"); } }, + async login(contact) { + + // ask user for password + const password = prompt("Please enter Admin, or Guest password"); + if(!password){ + return; + } + + try { + + // log in to repeater + const response = await this.connection.login(contact.publicKey, password); + console.log("login response", response); + + // show status response + alert(`login response:\n${JSON.stringify(response, null, 4)}`); + + } catch(e) { + alert(`Failed to login: ${e}`); + } + + }, async statusRequest(contact) { // ask user for password