0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-11-22 09:17:56 +01:00

Show current ip in settings window

This commit is contained in:
peteruithoven 2013-10-02 14:46:58 +02:00
parent b6dca873e7
commit 79e2fe1a8a

View File

@ -42,6 +42,7 @@ function SettingsWindow() {
this.networks; this.networks;
this.currentNetwork; // the ssid of the network the box is on 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.selectedNetwork; // the ssid of the selected network in the client mode settings
this.currentLocalIP;
this.clientModeState = SettingsWindow.NOT_CONNECTED; this.clientModeState = SettingsWindow.NOT_CONNECTED;
this.currentAP; this.currentAP;
this.apModeState = SettingsWindow.NO_AP; this.apModeState = SettingsWindow.NO_AP;
@ -335,11 +336,12 @@ function SettingsWindow() {
networkSelector.val(data.ssid); networkSelector.val(data.ssid);
self.showClientSettings(); self.showClientSettings();
self.form.find("#client").prop('checked',true); self.form.find("#client").prop('checked',true);
self.currentLocalIP = data.localip;
self.currentNetwork = data.ssid; self.currentNetwork = data.ssid;
self.selectNetwork(data.ssid); self.selectNetwork(data.ssid);
self.setClientModeState(SettingsWindow.CONNECTED); self.setClientModeState(SettingsWindow.CONNECTED);
self.setAPModeState(SettingsWindow.NO_AP); self.setAPModeState(SettingsWindow.NO_AP);
break; break;
case "ap": case "ap":
@ -407,7 +409,8 @@ function SettingsWindow() {
break; break;
case SettingsWindow.CONNECTED: case SettingsWindow.CONNECTED:
btnConnect.removeAttr("disabled"); btnConnect.removeAttr("disabled");
field.html("Connected to: "+this.currentNetwork); var a = "<a href='http://"+this.currentLocalIP+"' target='_black'>"+this.currentLocalIP+"</a>";
field.html("Connected to: "+this.currentNetwork+". Local ip: "+a);
break; break;
case SettingsWindow.CONNECTING: case SettingsWindow.CONNECTING:
btnConnect.attr("disabled", true); btnConnect.attr("disabled", true);