Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

default ports being displayed, and toggles for SSL. also bumped font …

…down to 12 as it looks a little cleaner
  • Loading branch information...
commit 049e1b7db1cc34b212c2dca01f19e56e2be39927 1 parent d96ad89
Daniel Insley authored
View
6 assets/css/subway.css
@@ -8,6 +8,7 @@ html { overflow: hidden; }
position: absolute;
zoom: 1;
padding: 0;
+ font-size: 12px;
}
.container-fluid:before, .container-fluid:after {
display: table;
@@ -109,6 +110,11 @@ html { overflow: hidden; }
background: #434950;
}
+#ssl-self-signed {
+ display: none;
+}
+
+
#user-box div{
padding: 10px 25px;
background: #434950;
View
15 assets/js/views/overview.js
@@ -7,7 +7,8 @@ var OverviewView = Backbone.View.extend({
'click #connect-button': 'connect',
'click #login-button': 'login_register',
'click #register-button': 'login_register',
- 'keypress': 'connectOnEnter'
+ 'keypress': 'connectOnEnter',
+ 'click #connect-secure': 'toggle_ssl_options'
},
el: '.content',
@@ -75,6 +76,7 @@ var OverviewView = Backbone.View.extend({
selfSigned: selfSigned,
password: password
};
+
irc.me = new User(connectInfo);
irc.me.on('change:nick', irc.appView.renderUserBox);
irc.socket.emit('connect', connectInfo);
@@ -85,16 +87,20 @@ var OverviewView = Backbone.View.extend({
var action = event.target.innerHTML.toLowerCase() || event.action.toLowerCase();
event.preventDefault();
$('.error').removeClass('error');
+
var username = $('#' + action + '-username').val();
var password = $('#' + action + '-password').val();
+
if (!username) {
$('#' + action + '-username').closest('.clearfix').addClass('error');
$('#' + action + '-username').addClass('error');
}
+
if (!password) {
$('#' + action + '-password').closest('.clearfix').addClass('error');
$('#login-password').addClass('error');
}
+
if(username && password){
$('form').append(ich.load_image());
$('#' + action + '-button').addClass('disabled');
@@ -104,6 +110,13 @@ var OverviewView = Backbone.View.extend({
username: username,
password: password
});
+ },
+
+ toggle_ssl_options: function(event) {
+ var port = $('#connect-secure').is(':checked') ? 6697 : 6667
+ $('#connect-port').attr('placeholder', port)
+ $('#ssl-self-signed').toggle();
}
+
});
View
2  lib/irchandler.js
@@ -123,7 +123,7 @@ var irchandler = exports.irchandler = function(socket) {
}
if(client === undefined) {
client = new irc.Client(data.server, data.nick, {
- port: data.port || 6667,
+ port: data.port || (data.secure ? 6697 : 6667),
password: data.password,
secure: data.secure,
selfSigned: data.selfSigned,
View
12 views/templates.jade
@@ -39,22 +39,22 @@ script(id="overview_connection", type="text/html")
.controls
input#connect-server(type="text")
.control-group
- label(for="connect-nick") Nick
- .controls
- input#connect-nick(type="text")
- .control-group
label(for="connect-port") Port
.controls
- input#connect-port(type="text")
+ input#connect-port.input-small(type="text", placeholder="6667")
.control-group
label(for="connect-secure") SSL
.controls
input#connect-secure(type="checkbox")
- .control-group
+ .control-group#ssl-self-signed
label(for="connect-selfSigned") Self-signed SSL Cert
.controls
input#connect-selfSigned(type="checkbox")
.control-group
+ label(for="connect-nick") Nick
+ .controls
+ input#connect-nick(type="text")
+ .control-group
label(for="connect-password") Password
.controls
input#connect-password(type="password")

0 comments on commit 049e1b7

Please sign in to comment.
Something went wrong with that request. Please try again.