Skip to content
This repository
Browse code

Support optionally remembering your info.

  • Loading branch information...
commit 5fdf5d9cfe132659a6d7e7202ac06028c9f746ca 1 parent bc0a61f
Andrew Berry deviantintegral authored

Showing 2 changed files with 13 additions and 3 deletions. Show diff stats Hide diff stats

  1. +10 3 assets/js/views/overview.js
  2. +3 0  views/templates.jade
13 assets/js/views/overview.js
@@ -110,9 +110,16 @@ var OverviewView = Backbone.View.extend({
110 110 irc.socket.emit('connect', connectInfo);
111 111
112 112 // Save standard settings in session storage.
113   - sessionStorage.setItem('nick', nick);
114   - sessionStorage.setItem('realName', realName);
115   - sessionStorage.setItem('server', server);
  113 + if ($('#connect-remember').attr('checked')) {
  114 + sessionStorage.setItem('nick', nick);
  115 + sessionStorage.setItem('realName', realName);
  116 + sessionStorage.setItem('server', server);
  117 + }
  118 + else {
  119 + sessionStorage.removeItem('nick');
  120 + sessionStorage.removeItem('realName');
  121 + sessionStorage.removeItem('server');
  122 + }
116 123 }
117 124 },
118 125
3  views/templates.jade
@@ -48,6 +48,9 @@ script(id="overview_connection", type="text/html")
48 48 .control-group
49 49 label(for="connect-realName") Real Name
50 50 input#connect-realName(type="text")
  51 + .control-group
  52 + label(for="connect-remember") Remember Me
  53 + input#connect-remember(type="checkbox",checked="checked")
51 54 .connect-more-options.hide
52 55 .control-group
53 56 label(for="connect-port") Port

0 comments on commit 5fdf5d9

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