-
+ Welcome to the chat client! Select a server, or create a new one.
diff --git a/scripts/profiles.js b/scripts/profiles.js
index f3c79a6..10781d3 100644
--- a/scripts/profiles.js
+++ b/scripts/profiles.js
@@ -1,9 +1,8 @@
-// Create a profiles varible
+// Setup some varibles
var profiles;
-
-// Create a connections varible
var connections = [];
+var active_profile;
// Load the profiles
fs.readFile("profiles.json", "utf-8", function(err, data)
@@ -32,6 +31,9 @@ fs.readFile("profiles.json", "utf-8", function(err, data)
// Connect to the server
profile_connect(i);
}
+
+ document.getElementById("chat-menu-profiles").style.bottom =
+ document.getElementById("chat-menu-config").style.height;
});
function profile_save()
@@ -71,13 +73,14 @@ function profile_connect(id)
function profile_switch_to(id)
{
-
+ // Set the active profile
+ active_profile = id;
}
function profiles_reload()
{
// Get the chat menu id
- var chat_menu = document.getElementById("chat-menu");
+ var chat_menu = document.getElementById("chat-menu-profiles");
// Reset it
chat_menu.innerHTML = "";
@@ -99,10 +102,27 @@ function profiles_reload()
}
// Set the html for the list item
- profile.innerHTML = ""+profiles[i].username+"@"+profiles[i].hostname+port_display+"";
// Add the profile to the menu
chat_menu.appendChild(profile);
}
}
+
+function switch_new_profile()
+{
+ // Set the html
+ document.getElementById("chat-main").innerHTML = "\
+