From 9b8a502d141a0e8aa2bd7f0f657bb0bf60f6b87a Mon Sep 17 00:00:00 2001 From: Ivelin Ivanov Date: Fri, 17 Jan 2020 10:37:22 -0600 Subject: [PATCH] fix: pairing progress UI --- src/store/pnp/index.js | 9 ++++--- src/views/EdgeConnect.vue | 52 +++++++++++++++++++++++++-------------- 2 files changed, 38 insertions(+), 23 deletions(-) diff --git a/src/store/pnp/index.js b/src/store/pnp/index.js index 17447cf5..f2ad6bea 100644 --- a/src/store/pnp/index.js +++ b/src/store/pnp/index.js @@ -104,7 +104,9 @@ const mutations = { and reused until explicitly reset by the user. */ async function discoverRemotePeerId ({ peer, state, commit }) { - if (!state.remotePeerId) { + if (state.remotePeerId) { + return state.remotePeerId + } else { // first try to find the remote peer ID in the same room const myRoom = new PeerRoom(peer) console.log('Fetching room members', myRoom) @@ -120,11 +122,10 @@ async function discoverRemotePeerId ({ peer, state, commit }) { // ask user for help commit(USER_MESSAGE, `Still looking. - Please make sure you are are on the same local network. + Please make sure you are on the same local network + as the Ambianic Edge device. `) } - } else { - return state.remotePeerId } } diff --git a/src/views/EdgeConnect.vue b/src/views/EdgeConnect.vue index cc5f94c0..186256c2 100644 --- a/src/views/EdgeConnect.vue +++ b/src/views/EdgeConnect.vue @@ -135,22 +135,25 @@