glowingbear-mainbox/index.html

159 lines
7.6 KiB
HTML
Raw Normal View History

2013-02-16 19:18:14 +01:00
<!DOCTYPE html>
<html ng-app="weechat" ng-cloak>
2013-02-16 18:49:20 +01:00
<head>
2013-10-09 17:53:25 +02:00
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title ng-bind-template="WeeChat {{ pageTitle}}"></title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" media="screen">
2013-10-06 12:34:41 +02:00
<link rel="shortcut icon" type="image/png" href="img/favicon.png" >
2013-10-02 01:39:24 +02:00
<link href="css/glowingbear.css" rel="stylesheet" media="screen">
2013-10-11 15:59:55 +02:00
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.2/angular.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.2/angular-sanitize.min.js"></script>
2013-07-28 05:59:12 +02:00
<script type="text/javascript" src="js/underscore.js"></script>
<script type="text/javascript" src="js/localstorage.js"></script>
<script type="text/javascript" src="js/weechat-protocol.js"></script>
2013-02-16 19:18:14 +01:00
<script type="text/javascript" src="js/websockets.js"></script>
2013-10-08 02:42:19 +02:00
<script type="text/javascript" src="js/models.js"></script>
<script type="text/javascript" src="js/plugins.js"></script>
2013-10-07 15:38:47 +02:00
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
2013-02-16 18:49:20 +01:00
</head>
2013-10-11 16:24:25 +02:00
<body ng-controller="WeechatCtrl" ng-keydown="handleKeyPress($event)">
2013-10-09 17:53:25 +02:00
<div ng-hide="connected" class="container">
<h2>
<img src="img/favicon.png">
glowing bear
<small>
WeeChat web frontend
</small>
</h2>
<div class="alert alert-info">WeeChat 0.4.2 or later is required</div>
2013-10-11 23:38:30 +02:00
<div class="alert alert-danger" ng-show="errorMessage">
<strong>Oh no!</strong> We cannot connect!
</div>
<form class="form-signin" role="form">
2013-10-09 17:53:25 +02:00
<div class="form-group">
<label class="control-label" for="host">WeeChat hostname</label>
<input type="text" class="form-control" id="host" ng-model="host" placeholder="Address">
<p class="help-block">Enter the hostname to the WeeChat relay</p>
</div>
<div class="form-group">
<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>
2013-10-09 17:53:25 +02:00
<div class="form-group">
<label class="control-label" for="password">WeeChat relay password</label>
<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>
2013-02-16 19:18:14 +01:00
</div>
2013-10-09 17:53:25 +02:00
<div class="form-group">
<label class="control-label" for="proto">Encryption</label>
<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>
</div>
<div class="form-group">
<label class="control-label" for="port">Lines</label>
<input type="text" class="form-control" id="lines" ng-model="lines" placeholder="40">
<p class="help-block">Enter number of lines to sync from WeeChat on connect</p>
</div>
2013-10-09 17:53:25 +02:00
<button class="btn btn-lg btn-primary" ng-click="connect()">Connect!</button>
2013-10-11 23:38:30 +02:00
</form>
<h3>Instructions</h3>
<div>To start using, please enable relay in your WeeChat client:
<pre>
/set relay.network.password yourpassword
/relay add weechat 9001</pre>
Note: 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.
<h4>Encryption</h4>
If you want to use encrypted session you first have to set up the relay using SSL
<pre>
$ mkdir -p ~/.weechat/ssl
$ cd ~/.weechat/ssl
$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem
</pre>
If WeeChat is already running, you can reload the certificate and private key with command:
<pre>
/relay sslcertkey
/relay add ssl.weechat 8000
</pre>
</div>
</div>
2013-10-09 17:53:25 +02:00
<div class="content" ng-show="connected">
2013-10-11 00:51:18 +02:00
<div id="sidebar">
<ul class="nav nav-pills nav-stacked">
<li class="bufferfilter">
<form role="form">
<input class="form-control" type="text" id="bufferFilter" ng-model="search.$" placeholder="Search">
</form>
<form class="form-inline" role="form">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="onlyUnread">
Unread only
</label>
</div>
</form>
</li>
<li class="label" ng-class="{'active': content.active }" ng-repeat="(key, content) in buffers | toArray | filter:search | filter:hasUnread | orderBy:'content.number':true">
2013-10-11 00:51:18 +02:00
<a href="#" ng-click="setActiveBuffer(content.id)" title="{{ content.fullName }}">
<span class="badge pull-right" ng-class="{'danger': content.notification }" ng-bind="content.unread"></span>
{{ content.shortName }}<span ng-hide="content.shortName">{{ content.fullName }}</span>
</a>
</li>
</ul>
</div>
2013-10-09 17:53:25 +02:00
<div class="bufferlines">
2013-10-12 02:37:11 +02:00
<table>
<tbody>
2013-10-12 20:44:40 +02:00
<tr class="bufferline" ng-repeat-start="bufferline in activeBuffer().lines">
2013-10-12 11:49:14 +02:00
<td class="time">
2013-10-12 02:37:11 +02:00
<span class="date text-muted">
{{ bufferline.date | date:'HH:mm' }}
</span>
</td>
2013-10-12 11:49:14 +02:00
<td class="prefix">
2013-10-12 02:37:11 +02:00
<span ng-repeat="part in bufferline.prefix" class="text" style="{{ part.fg }}">{{ part.text }}</span>
</td>
2013-10-12 11:49:14 +02:00
<td class="message">
2013-10-12 02:37:11 +02:00
<span ng-repeat="part in bufferline.content" class="text" style="{{ part.fg }}">{{ part.text }} </span>
2013-10-08 15:55:07 +02:00
2013-10-12 02:37:11 +02:00
<div ng-repeat="metadata in bufferline.metadata">
<div ng-show="metadata.visible">
<a ng-click="metadata.visible = false">Hide additional content</a>
<div ng-bind-html="metadata.content"></div>
2013-10-12 02:37:11 +02:00
</div>
<div ng-hide="metadata.visible">
<a ng-click="metadata.visible = true">Show additional content</a>
</div>
</div>
</td>
</tr>
2013-10-12 21:06:24 +02:00
<tr class="readmarker" ng-repeat-end ng-show="activeBuffer().lastSeen==$index">
2013-10-12 20:44:40 +02:00
<td colspan="3">
2013-10-12 21:06:24 +02:00
<hr ng-if="activeBuffer().lastSeen==$index" id="readmarker">
2013-10-12 20:44:40 +02:00
</td>
</tr>
2013-10-12 02:37:11 +02:00
</tbody>
</table>
</div>
2013-10-12 02:37:11 +02:00
<div class="push"></div>
</div>
<div id="footer" ng-show="connected">
2013-10-09 17:53:25 +02:00
<div class="navbar navbar-inverse navbar-fixed-bottom">
<form class="form form-horizontal" ng-submit="sendMessage()">
<div class="input-group">
2013-10-11 15:59:55 +02:00
<input id="sendMessage" type="text" class="form-control" ng-model="command" autofocus>
2013-10-09 17:53:25 +02:00
<span class="input-group-btn">
<button class="btn btn-default btn-primary">Send</button>
</span>
</div>
</form>
</div>
</body>
2013-02-16 18:49:20 +01:00
</html>