Collapse for frontpage, and style inputs

This commit is contained in:
Tor Hveem 2013-10-15 16:09:08 +02:00
parent d1ab293b4b
commit 001024db7d
2 changed files with 109 additions and 49 deletions

View File

@ -71,6 +71,26 @@ input#sendMessage {
border: 0; border: 0;
width: 100%; width: 100%;
} }
.panel input {
max-width: 300px;
}
input[type=text], input[type=password] {
color: black;
border: 0;
-webkit-box-shadow:
inset 0 0 8px rgba(0,0,0,0.4),
0 0 16px rgba(0,0,0,0.4);
-moz-box-shadow:
inset 0 0 8px rgba(0,0,0,0.4),
0 0 16px rgba(0,0,0,0.4);
box-shadow:
inset 0 0 8px rgba(0,0,0,0.4),
0 0 16px rgba(0,0,0,0.4);
background: rgba(255,255,255,0.5);
}
#sidebar, .panel {
background: #282828;
}
#sidebar { #sidebar {
position: fixed; position: fixed;
width: 12%; width: 12%;
@ -78,8 +98,7 @@ input#sendMessage {
height: 100%; height: 100%;
min-width: 130px; min-width: 130px;
overflow: auto; overflow: auto;
background: #282828; }
}
.content { .content {
height: 100%; height: 100%;
min-height: 100%; min-height: 100%;

View File

@ -32,6 +32,17 @@
<div class="alert alert-danger" ng-show="errorMessage"> <div class="alert alert-danger" ng-show="errorMessage">
<strong>Oh no!</strong> We cannot connect! <strong>Oh no!</strong> We cannot connect!
</div> </div>
<div class="panel-group" id="accordion">
<div class="panel ">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
Connection settings
</a>
</h4>
</div>
<div id="collapseOne" class="panel-collapse collapse in">
<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 hostname</label>
@ -51,7 +62,7 @@
<div class="form-group"> <div class="form-group">
<label class="control-label" for="proto">Encryption</label> <label class="control-label" for="proto">Encryption</label>
<input type="checkbox" class="form-control" id="ssl" ng-model="ssl"> <input type="checkbox" class="form-control" id="ssl" ng-model="ssl">
<p class="help-block">Check the box if you want to encrypt communication between browser and WeeChat. <strong>Note</strong>: Due to a <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=594502">bug</a> encryption will not work in Firefox. You must also first visit the URL https://weechathost:relayport/ to accept the certificate</p> <p class="help-block">Read encryption instructions for help</p>
</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>
@ -60,27 +71,57 @@
</div> </div>
<button class="btn btn-lg btn-primary" ng-click="connect()">Connect!</button> <button class="btn btn-lg btn-primary" ng-click="connect()">Connect!</button>
</form> </form>
</div>
<h3>Instructions</h3> </div>
</div>
<div class="panel ">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">
Usage instructions
</a>
</h4>
</div>
<div id="collapseTwo" class="panel-collapse collapse">
<div class="panel-body">
<div>To start using, please enable relay in your WeeChat client: <div>To start using, please enable relay in your WeeChat client:
<pre> <pre>
/set relay.network.password yourpassword /set relay.network.password yourpassword
/relay add weechat 9001</pre> /relay add weechat 9001</pre>
<span class="label label-warning">WeeChat version 0.4.2 or higher is required.</span><br> <span class="label label-warning">WeeChat version 0.4.2 or higher is required.</span><br>
The communication goes directly between your browser and your weechat in clear text. The communication goes directly between your browser and your weechat in clear text.
Connection settings are saved between sessions, including password, in your own browser. Connection settings are saved between sessions, including password, in your own browser.
<h4>Encryption</h4> </div>
If you want to use encrypted session you first have to set up the relay using SSL </div>
</div>
<div class="panel ">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseThree">
Encryption instructions
</a>
</h4>
</div>
<div id="collapseThree" class="panel-collapse collapse">
<div class="panel-body">
If you check the encryption box, communication between browser and WeeChat will be encrypted.<br>
<strong>Note</strong>: Due to a <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=594502">bug</a> encryption will not work in Firefox. You must also first visit the URL https://weechathost:relayport/ to accept the certificate</p>
If you want to use encrypted session you first have to set up the relay using SSL like this:
<pre> <pre>
$ mkdir -p ~/.weechat/ssl $ mkdir -p ~/.weechat/ssl
$ cd ~/.weechat/ssl $ cd ~/.weechat/ssl
$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem $ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem
</pre> </pre>
If WeeChat is already running, you can reload the certificate and private key with command: If WeeChat is already running, you can reload the certificate and private key with command:
<pre> <pre>
/relay sslcertkey /relay sslcertkey
/relay add ssl.weechat 8000 /relay add ssl.weechat 8000
</pre> </pre>
</div>
</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
<div class="content" ng-show="connected"> <div class="content" ng-show="connected">