Only store password if user requests it.

This commit is contained in:
Tor Hveem 2013-10-25 13:43:03 +02:00
parent 09798fed53
commit d3aa1d768d
3 changed files with 23 additions and 22 deletions

View file

@ -95,7 +95,7 @@ input#sendMessage {
border: 0; border: 0;
width: 100%; width: 100%;
} }
.panel input { .panel input, .panel .input-group {
max-width: 300px; max-width: 300px;
} }
input[type=text], input[type=password], .badge { input[type=text], input[type=password], .badge {

View file

@ -45,27 +45,28 @@
<div class="panel-body"> <div class="panel-body">
<form class="form-signin" role="form"> <form class="form-signin" role="form">
<div class="form-group"> <div class="form-group">
<label class="control-label" for="host">WeeChat hostname</label> <label class="control-label" for="host">WeeChat relay hostname and port number</label>
<input type="text" class="form-control" id="host" ng-model="host" placeholder="Address"> <div class="input-group">
<p class="help-block">Enter the hostname to the WeeChat relay</p> <input type="text" class="form-control" id="host" ng-model="host" placeholder="Address">
</div> <input type="text" class="form-control" id="port" ng-model="port" placeholder="9001">
<div class="form-group"> </div>
<label class="control-label" for="port">WeeChat port number</label>
<input type="text" class="form-control" id="port" ng-model="port" placeholder="9001">
<p class="help-block">Enter the the port to the WeeChat relay</p>
</div>
<div class="form-group">
<label class="control-label" for="password">WeeChat relay password</label>
<div class="alert alert-danger" ng-show="passwordError"> <div class="alert alert-danger" ng-show="passwordError">
Error wrong password Error wrong password
</div> </div>
<label class="control-label" for="password">WeeChat relay password</label>
<input type="password" class="form-control" id="password" ng-model="password" placeholder="Password"> <input type="password" class="form-control" id="password" ng-model="password" placeholder="Password">
<p class="help-block">Password will be stored in your browser session</p> <div class="checkbox">
</div> <label>
<div class="form-group"> <input type="checkbox" class="checkbox" id="savepassword" ng-model="savepassword">
<label class="control-label" for="proto">Encryption</label> Save password in your browser
<input type="checkbox" class="form-control" id="ssl" ng-model="ssl"> </label>
<p class="help-block">Read encryption instructions for help</p> </div>
<div class="checkbox">
<label class="control-label " for="ssl">
<input type="checkbox" class="" id="ssl" ng-model="ssl">
Encryption. Read instructions for help
</label>
</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label" for="port">Lines</label> <label class="control-label" for="port">Lines</label>

View file

@ -401,12 +401,12 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
$store.bind($scope, "host", "localhost"); $store.bind($scope, "host", "localhost");
$store.bind($scope, "port", "9001"); $store.bind($scope, "port", "9001");
$store.bind($scope, "proto", "weechat"); $store.bind($scope, "proto", "weechat");
$store.bind($scope, "password", "");
$store.bind($scope, "ssl", false); $store.bind($scope, "ssl", false);
$store.bind($scope, "lines", "40"); $store.bind($scope, "lines", "40");
// TODO checkbox for saving password or not? $store.bind($scope, "savepassword", false);
// $scope.password = ""; if($scope.savepassword) {
// $store.bind($scope, "password", "");
}
// Save setting for displaying only buffers with unread messages // Save setting for displaying only buffers with unread messages
$store.bind($scope, "onlyUnread", false); $store.bind($scope, "onlyUnread", false);