commit
f50b89e062
|
@ -95,7 +95,7 @@ input#sendMessage {
|
|||
border: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.panel input {
|
||||
.panel input, .panel .input-group {
|
||||
max-width: 300px;
|
||||
}
|
||||
input[type=text], input[type=password], .badge {
|
||||
|
|
29
index.html
29
index.html
|
@ -10,7 +10,7 @@
|
|||
<link href="css/glowingbear.css" rel="stylesheet" media="screen">
|
||||
<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>
|
||||
<script type="text/javascript" src="js/underscore.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>
|
||||
<script type="text/javascript" src="js/localstorage.js"></script>
|
||||
<script type="text/javascript" src="js/weechat.js"></script>
|
||||
<script type="text/javascript" src="js/websockets.js"></script>
|
||||
|
@ -45,27 +45,28 @@
|
|||
<div class="panel-body">
|
||||
<form class="form-signin" role="form">
|
||||
<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>
|
||||
<div class="input-group">
|
||||
<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>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="password">WeeChat relay password</label>
|
||||
<div class="alert alert-danger" ng-show="passwordError">
|
||||
Error wrong password
|
||||
</div>
|
||||
<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>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" class="checkbox" id="savepassword" ng-model="savepassword">
|
||||
Save password in your browser
|
||||
</label>
|
||||
</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 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">Read encryption instructions for help</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="port">Lines</label>
|
||||
|
|
1246
js/underscore.js
1246
js/underscore.js
File diff suppressed because it is too large
Load Diff
|
@ -323,6 +323,8 @@ weechat.factory('connection', ['$q', '$rootScope', '$log', '$store', 'handlers',
|
|||
|
||||
weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', '$log', 'models', 'connection', function ($rootScope, $scope, $store, $timeout, $log, models, connection, testService) {
|
||||
|
||||
|
||||
if(window.Notification) {
|
||||
// Request notification permission
|
||||
Notification.requestPermission(function (status) {
|
||||
$log.info('Notification permission status:',status);
|
||||
|
@ -330,6 +332,8 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
|||
Notification.permission = status;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
if(window.webkitNotifications != undefined) {
|
||||
if (window.webkitNotifications.checkPermission() == 0) { // 0 is PERMISSION_ALLOWED
|
||||
$log.info('Notification permission status:', window.webkitNotifications.checkPermission() == 0);
|
||||
|
@ -345,7 +349,6 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
|||
}else {
|
||||
$scope.isinstalled = false;
|
||||
}
|
||||
console.log($scope.isinstalled);
|
||||
}
|
||||
}else {
|
||||
$scope.isinstalled = false;
|
||||
|
@ -362,12 +365,6 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
|||
// the user switches a buffer. This will ensure that notifications
|
||||
// are cleared in the buffer the user switches to
|
||||
if($scope.hotlistsync && ab.fullName) {
|
||||
/*
|
||||
doSend(weeChat.Protocol.formatInput({
|
||||
buffer: 'weechat',
|
||||
data: '/buffer ' + ab.fullName
|
||||
}));
|
||||
*/
|
||||
connection.sendCoreCommand('/buffer ' + ab.fullName);
|
||||
}
|
||||
|
||||
|
@ -404,12 +401,12 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
|||
$store.bind($scope, "host", "localhost");
|
||||
$store.bind($scope, "port", "9001");
|
||||
$store.bind($scope, "proto", "weechat");
|
||||
$store.bind($scope, "password", "");
|
||||
$store.bind($scope, "ssl", false);
|
||||
$store.bind($scope, "lines", "40");
|
||||
// TODO checkbox for saving password or not?
|
||||
// $scope.password = "";
|
||||
//
|
||||
$store.bind($scope, "savepassword", false);
|
||||
if($scope.savepassword) {
|
||||
$store.bind($scope, "password", "");
|
||||
}
|
||||
|
||||
// Save setting for displaying only buffers with unread messages
|
||||
$store.bind($scope, "onlyUnread", false);
|
||||
|
|
Loading…
Reference in New Issue