FS-8976 [verto_communicator] Properly alert that the login has failed vs silently failing and sitting there.
This commit is contained in:
parent
ad03c5c354
commit
b6057f10de
|
@ -92,6 +92,7 @@
|
|||
"LOGIN_INFORMATION": "Login Information",
|
||||
"SAVE_LOGIN_INFORMATION": "Save Login Information",
|
||||
"INVALID_LOGIN_FIELDS": "Verify the fields below and try again.",
|
||||
"INVALID_SETTINGS_FIELDS": "Verify the settings below and try again.",
|
||||
"NAME": "Name",
|
||||
"YOUR_NAME": "Your name",
|
||||
"EMAIL": "Email",
|
||||
|
|
|
@ -92,6 +92,7 @@
|
|||
"LOGIN_INFORMATION": "Informações de login",
|
||||
"SAVE_LOGIN_INFORMATION": "Salvar informações de login",
|
||||
"INVALID_LOGIN_FIELDS": "Verifique os campos abaixo e tente novamente.",
|
||||
"INVALID_SETTINGS_FIELDS": "Verifique as configurações abaixo e tente novamente.",
|
||||
"NAME": "Nome",
|
||||
"YOUR_NAME": "Seu nome",
|
||||
"EMAIL": "E-mail",
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
<p>{{ 'INVALID_LOGIN_FIELDS' | translate }}</p>
|
||||
</div>
|
||||
|
||||
<div ng-show="loginFailed" class="alert alert-danger">
|
||||
<p>{{ 'INVALID_SETTINGS_FIELDS' | translate }}</p>
|
||||
</div>
|
||||
|
||||
<form name="form" class="css-form" novalidate ng-init="advanced = false">
|
||||
<div class="form-group {{ (((!form.name.$pristine || form.$submitted) && !form.name.$valid) ? 'has-error': '') }}">
|
||||
<label class="control-label" for="login-name">{{ 'NAME' | translate}}</label>
|
||||
|
@ -19,25 +23,25 @@
|
|||
<input type="email" name="email" class="form-control" id="login-email" placeholder="{{ 'YOUR_EMAIL' | translate}}" required="" ng-model="verto.data.email" ng-model-options="{debounce: 250}">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-hide="!advanced">
|
||||
<div class="form-group" ng-show="advanced || loginFailed">
|
||||
<label class="control-label" for="login-user">{{ 'USER' | translate}}</label>
|
||||
<input type="text" class="form-control" id="login-user" placeholder="{{ 'USER' | translate}}" ng-model="verto.data.login">
|
||||
</div>
|
||||
<div class="form-group" ng-hide="!advanced">
|
||||
<div class="form-group" ng-show="advanced || loginFailed">
|
||||
<label class="control-label" for="login-password">{{ 'PASSWORD' | translate}}</label>
|
||||
<input type="password" class="form-control" id="login-password" placeholder={{ 'PASSWORD' | translate}} ng-model="verto.data.password">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-hide="!advanced">
|
||||
<div class="form-group" ng-show="advanced || loginFailed">
|
||||
<label class="control-label" for="login-callerid">{{ 'CALLER_ID' | translate}}</label>
|
||||
<input type="text" class="form-control" id="login-callerid" placeholder="{{ 'CALLER_ID' | translate}}" ng-model="verto.data.callerid">
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-hide="!advanced">
|
||||
<div class="form-group" ng-show="advanced || loginFailed">
|
||||
<label class="control-label" for="login-hostname">{{ 'HOSTNAME' | translate}}</label>
|
||||
<input type="text" class="form-control" id="login-hostname" placeholder="{{ 'HOSTNAME' | translate}}" ng-model="verto.data.hostname">
|
||||
</div>
|
||||
<div class="form-group" ng-hide="!advanced">
|
||||
<div class="form-group" ng-show="advanced || loginFailed">
|
||||
<label class="control-label" for="login-wsurl">{{ 'WEBSOCKET_URL' | translate}}</label>
|
||||
<input type="text" class="form-control" id="login-wsurl" placeholder="{{ 'WEBSOCKET_URL' | translate}}" ng-model="verto.data.wsURL">
|
||||
</div>
|
||||
|
|
|
@ -117,13 +117,13 @@ var updateReq;
|
|||
|
||||
var updateVideoSize = function(ms) {
|
||||
if (!ms) ms = 500;
|
||||
|
||||
|
||||
clearTimeout(updateReq);
|
||||
updateReq = setTimeout(function () {
|
||||
var videoElem = jQuery('#webcam');
|
||||
videoElem.width("");
|
||||
videoElem.height("");
|
||||
|
||||
|
||||
var w = videoElem.width();
|
||||
var h = videoElem.height();
|
||||
var new_w, new_h;
|
||||
|
@ -577,6 +577,7 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
|
|||
var callbacks = {
|
||||
onWSLogin: function(v, success) {
|
||||
data.connected = success;
|
||||
$rootScope.loginFailed = !success;
|
||||
$rootScope.$emit('ws.login', success);
|
||||
console.debug('Connected to verto server:', success);
|
||||
|
||||
|
@ -679,7 +680,6 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
|
|||
|
||||
onWSClose: function(v, success) {
|
||||
console.debug('onWSClose:', success);
|
||||
|
||||
$rootScope.$emit('ws.close', success);
|
||||
},
|
||||
|
||||
|
@ -825,9 +825,9 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
|
|||
|
||||
screenshare: function(destination, callback) {
|
||||
|
||||
|
||||
|
||||
var that = this;
|
||||
|
||||
|
||||
if (storage.data.selectedShare !== "screen") {
|
||||
|
||||
console.log('share screen from device ' + storage.data.selectedShare);
|
||||
|
@ -856,9 +856,9 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
|
|||
StreamTrack.addEventListener('ended', stopSharing);
|
||||
// (stream.getVideoTracks()[0]).onended = stopSharing;
|
||||
}
|
||||
|
||||
|
||||
console.log("screenshare started");
|
||||
|
||||
|
||||
function stopSharing() {
|
||||
if(that.data.shareCall) {
|
||||
that.screenshareHangup();
|
||||
|
@ -866,16 +866,16 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
data.shareCall = call;
|
||||
|
||||
|
||||
console.log('shareCall', data);
|
||||
|
||||
|
||||
data.mutedMic = false;
|
||||
data.mutedVideo = false;
|
||||
|
||||
|
||||
that.refreshDevices();
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue