From 79e2fe1a8ae097a85b99f7d7eb6c1b9ceb249841 Mon Sep 17 00:00:00 2001 From: peteruithoven Date: Wed, 2 Oct 2013 14:46:58 +0200 Subject: [PATCH] Show current ip in settings window --- js/SettingsWindow.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/js/SettingsWindow.js b/js/SettingsWindow.js index 9937c56..c015b6b 100644 --- a/js/SettingsWindow.js +++ b/js/SettingsWindow.js @@ -42,6 +42,7 @@ function SettingsWindow() { this.networks; this.currentNetwork; // the ssid of the network the box is on this.selectedNetwork; // the ssid of the selected network in the client mode settings + this.currentLocalIP; this.clientModeState = SettingsWindow.NOT_CONNECTED; this.currentAP; this.apModeState = SettingsWindow.NO_AP; @@ -335,11 +336,12 @@ function SettingsWindow() { networkSelector.val(data.ssid); self.showClientSettings(); self.form.find("#client").prop('checked',true); - + + self.currentLocalIP = data.localip; self.currentNetwork = data.ssid; self.selectNetwork(data.ssid); self.setClientModeState(SettingsWindow.CONNECTED); - + self.setAPModeState(SettingsWindow.NO_AP); break; case "ap": @@ -407,7 +409,8 @@ function SettingsWindow() { break; case SettingsWindow.CONNECTED: btnConnect.removeAttr("disabled"); - field.html("Connected to: "+this.currentNetwork); + var a = ""+this.currentLocalIP+""; + field.html("Connected to: "+this.currentNetwork+". Local ip: "+a); break; case SettingsWindow.CONNECTING: btnConnect.attr("disabled", true);