parent
9dfce743cf
commit
ab490074d3
|
@ -13,6 +13,9 @@
|
||||||
<div ng-hide="connected">
|
<div ng-hide="connected">
|
||||||
<form class="form-horizontal">
|
<form class="form-horizontal">
|
||||||
<legend>Connection</legend>
|
<legend>Connection</legend>
|
||||||
|
<div class="alert alert-danger" ng-show="errorMessage">
|
||||||
|
<strong>Oh no!</strong> We cannot connect!
|
||||||
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="hostport">Hostport</label>
|
<label class="control-label" for="hostport">Hostport</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
|
|
|
@ -330,6 +330,9 @@ weechat.factory('connection', ['$rootScope', '$log', 'handlers', 'colors', funct
|
||||||
}
|
}
|
||||||
|
|
||||||
websocket.onerror = function (evt) {
|
websocket.onerror = function (evt) {
|
||||||
|
if (evt.type == "error" && websocket.readyState == 0) {
|
||||||
|
$rootScope.errorMessage = true;
|
||||||
|
}
|
||||||
$log.error("Relay error " + evt.data);
|
$log.error("Relay error " + evt.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue