glowingbear-mainbox/index.html

370 lines
19 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, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<title ng-bind-template="{{ notificationStatus }}WeeChat {{ pageTitle}}"></title>
2014-02-26 01:50:24 +01:00
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link rel="shortcut icon" sizes="128x128" href="img/weechat_logo_128x128.png">
<link rel="apple-touch-icon" sizes="128x128" href="img/weechat_logo_128x128.png">
2013-10-06 12:34:41 +02:00
<link rel="shortcut icon" type="image/png" href="img/favicon.png" >
<link href="css/style.css" rel="stylesheet" media="screen">
2013-10-02 01:39:24 +02:00
<link href="css/glowingbear.css" rel="stylesheet" media="screen">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
2014-02-10 22:10:46 +01:00
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.12/angular.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.12/angular-route.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.12/angular-sanitize.min.js"></script>
2014-02-18 14:50:38 +01:00
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.12/angular-touch.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.12/angular-animate.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>
<script type="text/javascript" src="3rdparty/inflate.min.js"></script>
<script type="text/javascript" src="js/localstorage.js"></script>
<script type="text/javascript" src="js/weechat.js"></script>
2013-10-27 00:44:48 +02:00
<script type="text/javascript" src="js/irc-utils.js"></script>
2014-02-07 02:32:25 +01:00
<script type="text/javascript" src="js/glowingbear.js"></script>
2014-02-08 16:46:58 +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>
<script type="text/javascript" src="3rdparty/bindonce.min.js"></script>
<script type="text/javascript" src="3rdparty/favico-0.3.4-mod.min.js"></script>
2014-02-26 01:50:24 +01:00
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/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>
2013-10-16 14:13:23 +02:00
<img alt="logo" src="img/favicon.png">
2013-10-09 17:53:25 +02:00
glowing bear
<small>
2014-02-13 00:04:24 +01:00
WeeChat web frontend
2013-10-09 17:53:25 +02:00
</small>
</h2>
2013-10-11 23:38:30 +02:00
<div class="alert alert-danger" ng-show="errorMessage">
2014-02-13 00:04:24 +01:00
<strong>Connection error</strong> The client was unable to connect to the WeeChat relay
2013-10-11 23:38:30 +02:00
</div>
<div class="panel-group" id="accordion">
2013-10-22 13:26:35 +02:00
<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>
2013-02-16 19:18:14 +01:00
</div>
<div id="collapseOne" class="panel-collapse collapse in">
<div class="panel-body">
<form class="form-signin" role="form">
<div class="form-group">
<label class="control-label" for="host">WeeChat relay hostname and port number</label>
<div class="input-group">
<input type="text" class="form-control monospace" id="host" ng-model="host" placeholder="Address">
<input type="text" class="form-control monospace" id="port" ng-model="port" placeholder="9001">
</div>
2014-02-18 19:13:23 +01:00
<label class="control-label" for="password">WeeChat relay password</label>
<input type="password" class="form-control monospace" id="password" ng-model="password" placeholder="Password">
<div class="alert alert-danger" ng-show="passwordError">
Error: wrong password
</div>
<div class="checkbox">
2014-02-13 00:03:54 +01:00
<label class="control-label" for="savepassword">
<input type="checkbox" id="savepassword" ng-model="savepassword">
Save password in your browser
</label>
</div>
<div class="checkbox">
2014-02-13 00:04:24 +01:00
<label class="control-label" for="ssl">
<input type="checkbox" id="ssl" ng-model="ssl">
Encryption. Read instructions for help
</label>
</div>
</div>
2013-10-16 14:25:07 +02:00
<button class="btn btn-lg btn-primary" ng-click="connect()">Connect <i class="glyphicon glyphicon-chevron-right"></i></button>
</form>
</div>
</div>
</div>
2013-10-22 13:26:35 +02:00
<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">
<h3>Configuring the relay</h3>
2013-12-19 15:54:45 +01:00
<div>To start using glowing bear, please enable the relay plugin in your WeeChat client:
2013-10-26 08:36:06 +02:00
<pre>
/set relay.network.password yourpassword
/relay add weechat 9001
</pre>
2013-12-19 15:54:45 +01:00
<span class="label label-danger">WeeChat version 0.4.2 or higher is required.</span><br>
The communication goes directly between your browser and your WeeChat relay in plain text. Check the instructions below for help on setting up encrypted communication.
Connection settings, including your password, are saved locally in your own browser between sessions.
<br>
<h3>Shortcuts</h3>
Glowing Bear has a few shortcuts:
<ul>
<li>ALT-n: Toggle nicklist</li>
<li>ALT-l: Focus on input bar</li>
<li>ALT-[0-9]: Focus on buffer</li>
<li>ALT-a: Focus on next buffer with activity</li>
2014-02-28 00:14:33 +01:00
<li>ALT-&lt;: Switch to previous buffer</li>
<li>ALT-g: Focus on buffer list filter</li>
2014-02-28 00:31:32 +01:00
<li>Esc: disconnect</li>
<li>arrow keys: history navigation</li>
</ul>
2013-10-22 13:26:35 +02:00
</div>
</div>
</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">
2013-12-19 15:54:45 +01:00
If you check the encryption box, the 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. Unless you are using a certificate trusted by your browser, you must also first visit the URL https://weechathost:relayport/ to mark the certificate as trusted.</p>
If you want to use an encrypted session you first have to set up the relay to use SSL. It is easiest to use a self-signed certificate, which you can create like this:
2013-10-26 08:36:06 +02:00
<pre>
$ mkdir -p ~/.weechat/ssl
$ cd ~/.weechat/ssl
$ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out relay.pem
2013-10-26 08:36:06 +02:00
</pre>
If WeeChat is already running, you can reload the certificate and private key and set up an encrypted relay on port 8000 with these commands:
2013-10-26 08:36:06 +02:00
<pre>
/relay sslcertkey
/relay add ssl.weechat 8000
</pre>
2013-10-21 15:51:05 +02:00
</div>
</div>
</div>
<div class="panel" ng-hide="isinstalled">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseFour">
Install app
</a>
</h4>
</div>
<div id="collapseFour" class="panel-collapse collapse">
<div class="panel-body">
<p>You don't need to install anything to use this app, it should work with any modern browser. Start using it <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">right now</a>! However, there are a few ways to improve integration with your operating system.</p>
<h3>Firefox</h3>
<p>If you have a recent version of Firefox you can install glowing bear as an app. Click the button to install.</p>
<button class="btn btn-lg btn-primary" ng-click="install()">Install Firefox app <i class="glyphicon glyphicon-chevron-right"></i></button>
<h3>Chrome</h3>
<p>To install glowing bear as an app in Chrome, select <kbd>Menu - Add to home screen</kbd> (Android) or <kbd>Menu - Tools - Create Application Shortcuts</kbd> (desktop version).</p>
</div>
</div>
</div>
2014-02-13 00:03:22 +01:00
<div class="panel">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseFive">
Get involved
</a>
</h4>
</div>
<div id="collapseFive" class="panel-collapse collapse">
<div class="panel-body">
<p>Glowing bear is built by a small group of developers in their free time. As we're always trying to improve it, we would love getting your feedback and help. If that sounds like something you might enjoy, check out our <a href="https://github.com/cormier/glowing-bear">project page</a> on GitHub!</p>
<p>If you're interested in contributing or simply want to say hello, head over to <strong>#glowing-bear</strong> on <strong>freenode!</strong> We won't bite, promise (-ish).</p>
</div>
</div>
</div>
</div>
2013-10-11 23:38:30 +02:00
</div>
</div>
2013-10-09 17:53:25 +02:00
<div class="content" ng-show="connected">
2014-02-13 00:04:24 +01:00
<div id="topbar">
<div class="brand">
<a href="#" ng-click="swipeSidebar()">
2014-02-13 00:04:24 +01:00
<img alt="brand" src="img/favicon.png" title="Connected to {{ host }}:{{ port}}">
</a>
<button ng-show="debugMode" ng-click="countWatchers()">Count<br />Watchers</button>
</div>
<div class="title" ng-bind-html="activeBuffer().title | irclinky:'_blank'"></div>
2014-02-13 00:04:24 +01:00
<div class="actions pull-right vertical-line-left">
2014-02-26 02:09:10 +01:00
<div class="pull-left">
<a class="" data-toggle="modal" data-target="#settingsModal" title="Options menu">
2014-02-13 00:04:24 +01:00
<i class="glyphicon glyphicon-cog"></i>
</a>
2014-02-26 02:09:10 +01:00
</div>
<a ng-click="disconnect()" title="Disconnect from WeeChat">
<i class="glyphicon glyphicon-remove"></i>
</a>
</div>
</div>
<div bindonce id="sidebar" ng-show="showSidebar" ng-swipe-left="swipeSidebar()" class="vertical-line">
<ul class="nav nav-pills nav-stacked" ng-class="{'indented': (predicate === 'serverSortKey')}">
<li class="bufferfilter">
<form role="form">
<input class="form-control monospace" type="text" id="bufferFilter" ng-model="search" ng-keydown="handleSearchBoxKey($event)" placeholder="Search">
</form>
</li>
<li class="buffer" ng-class="{'active': content.active, 'indent': content.indent }" ng-repeat="(key, content) in (filteredBuffers = (buffers | toArray | filter:{fullName:search} | filter:hasUnread | orderBy:predicate))">
<a href="#" ng-click="setActiveBuffer(content.id)" title="{{ content.fullName }}">
<span class="badge pull-right" ng-hide="content.notification" ng-if="content.unread" ng-bind="content.unread"></span>
<span class="badge pull-right danger" ng-show="content.notification" ng-bind="content.notification"></span>
<span class="buffername">{{ content.shortName }}</span><span ng-hide="content.shortName">{{ content.fullName }}</span>
</a>
</li>
</ul>
</div>
2014-02-28 00:00:37 +01:00
<div bindonce id="bufferlines" class="monospace" ng-swipe-right="swipeSidebar()" ng-swipe-left="openNick()" ng-class="{'withnicklist': showNicklist, 'withsidebar': showSidebar}">
2014-02-26 02:09:10 +01:00
<div id="nicklist" ng-show="showNicklist" ng-swipe-right="closeNick()" class="vertical-line-left">
<ul class="nicklistgroup list-unstyled" ng-repeat="group in activeBuffer().nicklist">
<li ng-repeat="nick in group.nicks|orderBy:'name'" ng-click="openBuffer(nick.name)">
<a ng-click="nickAction(nick)"><span bo-class="nick.prefixClasses" bo-text="nick.prefix"></span><span bo-class="nick.nameClasses" bo-text="nick.name"></span></a>
</li>
</ul>
</div>
2014-02-28 00:00:37 +01:00
<table ng-class="{'notimestamp':notimestamp}">
2014-02-26 02:09:10 +01:00
<tbody>
<tr class="bufferline">
<td ng-hide="noMoreLines" colspan="3">
2014-02-26 02:09:10 +01:00
<a class="fetchmorelines" ng-click="fetchMoreLines()" ng-hide="loadingLines">Fetch more lines</a>
<span ng-show="loadingLines">Fetching more lines...</span>
</td>
</tr>
</tbody>
<tbody ng-repeat="bufferline in (bufferlines = activeBuffer().lines)">
<tr class="bufferline">
<td class="time">
<span class="date" bo-class="{'repeated-time': bufferline.shortTime==bufferlines[$index-1].shortTime}">
<span class="cof-chat_time cob-chat_time coa-chat_time" bo-text="bufferline.date|date:'HH'"></span><span class="cof-chat_time_delimiters cob-chat_time_delimiters coa-chat_time_delimiters">:</span><span class="cof-chat_time cob-chat_time coa-chat_time" bo-text="bufferline.date|date:'mm'"></span>
</span>
</td>
<td class="prefix"><span ng-repeat="part in bufferline.prefix" bo-class="part.classes" bo-html="part.text"></span></td>
<td class="message">
<div ng-repeat="metadata in bufferline.metadata">
<div plugin data="metadata"></div>
</div>
<span ng-repeat="part in bufferline.content" class="text" bo-class="part.classes" bo-html="part.text|irclinky:'_blank'"></span>
</td>
</tr>
<tr class="readmarker" ng-if="activeBuffer().lastSeen==$index">
<td colspan="3">
<hr id="readmarker">
</td>
</tr>
</tbody>
</table>
</div>
<div class="push"></div>
</div>
<div id="footer" ng-show="connected">
<div class="navbar navbar-inverse navbar-fixed-bottom" ng-class="{'withnicklist': showNicklist, 'withsidebar': showSidebar}">
<div input-bar input-id="sendMessage"></div>
</div>
<div id="settingsModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Settings</h4>
</div>
<div class="modal-body">
<p>Settings will be stored in your browser.</p>
<ul class="">
2014-02-13 00:04:24 +01:00
<li>
<form class="form-inline" role="form">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="onlyUnread">
Only show unread
</label>
</div>
</form>
</li>
<li>
<form class="form-inline" role="form">
<div class="checkbox">
2014-02-16 21:38:10 +01:00
<label>
2014-02-13 00:04:24 +01:00
<input type="checkbox" ng-model="notimestamp">
Hide timestamps
</label>
</div>
</form>
</li>
<li>
<form class="form-inline" role="form">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="noembed">
Hide embedded content by default
</label>
</div>
</form>
</li>
<li>
<form class="form-inline" role="form">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="hotlistsync">
Sync hotlist with WeeChat
</label>
</div>
</form>
</li>
<li>
<form class="form-inline" role="form">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="nonicklist">
Hide nicklist
</label>
</div>
</form>
</li>
<li>
<form class="form-inline" role="form">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="orderbyserver">
Order channels by server
</label>
</div>
</form>
</li>
<li>
<form class="form-inline" role="form">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="useFavico">
Display unread count in favicon
</label>
</div>
</form>
</li>
2014-02-13 00:04:24 +01:00
<li>
<form class="form-inline" role="form">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="debugMode">
Debug Mode
</label>
</div>
</form>
</li>
</ul>
</div>
2014-02-26 02:09:10 +01:00
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</body>
2013-02-16 18:49:20 +01:00
</html>