glowingbear-mainbox/websockets.html

63 lines
2.2 KiB
HTML
Raw Normal View History

2013-02-16 19:18:14 +01:00
<!DOCTYPE html>
2013-02-18 00:49:42 +01:00
<html ng-app="weechat">
2013-02-16 18:49:20 +01:00
<head>
2013-02-16 19:18:14 +01:00
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<script type="text/javascript" src="js/angular.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/protocol.js"></script>
2013-02-16 19:18:14 +01:00
<script type="text/javascript" src="js/websockets.js"></script>
2013-02-16 18:49:20 +01:00
</head>
<body>
2013-02-16 19:18:14 +01:00
<div ng-controller="WeechatCtrl">
2013-02-18 00:49:42 +01:00
<div ng-hide="connected">
2013-02-16 19:18:14 +01:00
<form class="form-horizontal">
<legend>Connection</legend>
<div class="control-group">
<label class="control-label" for="hostport">Hostport</label>
<div class="controls">
<input type="text" id="hostport" ng-model="hostport" placeholder="Hostport">
</div>
</div>
<div class="control-group">
<label class="control-label" for="proto">Proto</label>
<div class="controls">
<input type="text" id="proto" ng-model="proto" placeholder="proto">
</div>
</div>
<div class="control-group">
<label class="control-label" for="password">Password</label>
<div class="controls">
<input type="text" id="password" ng-model="password" placeholder="Password">
</div>
</div>
<div class="control-group">
<div class="controls">
2013-02-18 00:49:42 +01:00
<button class="btn btn-primary" ng-click="connect()">Connect!</button>
2013-02-16 19:18:14 +01:00
</div>
</div>
</form>
</div>
2013-02-18 00:49:42 +01:00
<div ng-show="connected">
2013-07-30 15:22:37 +02:00
2013-07-30 15:01:08 +02:00
<div ng-repeat="(key, content) in buffers">
2013-07-30 15:22:37 +02:00
<a ng-click="setActiveBuffer(key)">{{ content.full_name }}</a>
2013-07-30 15:01:08 +02:00
</div>
2013-07-30 15:22:37 +02:00
<div ng-repeat="bufferline in activeBuffer.lines">
<span ng-repeat="part in bufferline.message" class="text">
{{ part.text }}
</span>
<div ng-bind-html-unsafe="bufferline.metadata"></div>
<br>
2013-02-18 00:49:42 +01:00
</div>
<form ng-submit="sendMessage()">
2013-02-18 00:49:42 +01:00
<input type="text" ng-model="command"></input>
<input type="submit" class="btn btn-primary"></button>
</form>
2013-02-16 19:18:14 +01:00
</div>
</div>
2013-02-16 18:49:20 +01:00
</body>
</html>