mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-14 02:56:48 +00:00
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",
|
"LOGIN_INFORMATION": "Login Information",
|
||||||
"SAVE_LOGIN_INFORMATION": "Save Login Information",
|
"SAVE_LOGIN_INFORMATION": "Save Login Information",
|
||||||
"INVALID_LOGIN_FIELDS": "Verify the fields below and try again.",
|
"INVALID_LOGIN_FIELDS": "Verify the fields below and try again.",
|
||||||
|
"INVALID_SETTINGS_FIELDS": "Verify the settings below and try again.",
|
||||||
"NAME": "Name",
|
"NAME": "Name",
|
||||||
"YOUR_NAME": "Your name",
|
"YOUR_NAME": "Your name",
|
||||||
"EMAIL": "Email",
|
"EMAIL": "Email",
|
||||||
|
@ -92,6 +92,7 @@
|
|||||||
"LOGIN_INFORMATION": "Informações de login",
|
"LOGIN_INFORMATION": "Informações de login",
|
||||||
"SAVE_LOGIN_INFORMATION": "Salvar informações de login",
|
"SAVE_LOGIN_INFORMATION": "Salvar informações de login",
|
||||||
"INVALID_LOGIN_FIELDS": "Verifique os campos abaixo e tente novamente.",
|
"INVALID_LOGIN_FIELDS": "Verifique os campos abaixo e tente novamente.",
|
||||||
|
"INVALID_SETTINGS_FIELDS": "Verifique as configurações abaixo e tente novamente.",
|
||||||
"NAME": "Nome",
|
"NAME": "Nome",
|
||||||
"YOUR_NAME": "Seu nome",
|
"YOUR_NAME": "Seu nome",
|
||||||
"EMAIL": "E-mail",
|
"EMAIL": "E-mail",
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
<p>{{ 'INVALID_LOGIN_FIELDS' | translate }}</p>
|
<p>{{ 'INVALID_LOGIN_FIELDS' | translate }}</p>
|
||||||
</div>
|
</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">
|
<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': '') }}">
|
<div class="form-group {{ (((!form.name.$pristine || form.$submitted) && !form.name.$valid) ? 'has-error': '') }}">
|
||||||
<label class="control-label" for="login-name">{{ 'NAME' | translate}}</label>
|
<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}">
|
<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>
|
||||||
|
|
||||||
<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>
|
<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">
|
<input type="text" class="form-control" id="login-user" placeholder="{{ 'USER' | translate}}" ng-model="verto.data.login">
|
||||||
</div>
|
</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>
|
<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">
|
<input type="password" class="form-control" id="login-password" placeholder={{ 'PASSWORD' | translate}} ng-model="verto.data.password">
|
||||||
</div>
|
</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>
|
<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">
|
<input type="text" class="form-control" id="login-callerid" placeholder="{{ 'CALLER_ID' | translate}}" ng-model="verto.data.callerid">
|
||||||
</div>
|
</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>
|
<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">
|
<input type="text" class="form-control" id="login-hostname" placeholder="{{ 'HOSTNAME' | translate}}" ng-model="verto.data.hostname">
|
||||||
</div>
|
</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>
|
<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">
|
<input type="text" class="form-control" id="login-wsurl" placeholder="{{ 'WEBSOCKET_URL' | translate}}" ng-model="verto.data.wsURL">
|
||||||
</div>
|
</div>
|
||||||
|
@ -117,13 +117,13 @@ var updateReq;
|
|||||||
|
|
||||||
var updateVideoSize = function(ms) {
|
var updateVideoSize = function(ms) {
|
||||||
if (!ms) ms = 500;
|
if (!ms) ms = 500;
|
||||||
|
|
||||||
clearTimeout(updateReq);
|
clearTimeout(updateReq);
|
||||||
updateReq = setTimeout(function () {
|
updateReq = setTimeout(function () {
|
||||||
var videoElem = jQuery('#webcam');
|
var videoElem = jQuery('#webcam');
|
||||||
videoElem.width("");
|
videoElem.width("");
|
||||||
videoElem.height("");
|
videoElem.height("");
|
||||||
|
|
||||||
var w = videoElem.width();
|
var w = videoElem.width();
|
||||||
var h = videoElem.height();
|
var h = videoElem.height();
|
||||||
var new_w, new_h;
|
var new_w, new_h;
|
||||||
@ -577,6 +577,7 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
|
|||||||
var callbacks = {
|
var callbacks = {
|
||||||
onWSLogin: function(v, success) {
|
onWSLogin: function(v, success) {
|
||||||
data.connected = success;
|
data.connected = success;
|
||||||
|
$rootScope.loginFailed = !success;
|
||||||
$rootScope.$emit('ws.login', success);
|
$rootScope.$emit('ws.login', success);
|
||||||
console.debug('Connected to verto server:', success);
|
console.debug('Connected to verto server:', success);
|
||||||
|
|
||||||
@ -679,7 +680,6 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
|
|||||||
|
|
||||||
onWSClose: function(v, success) {
|
onWSClose: function(v, success) {
|
||||||
console.debug('onWSClose:', success);
|
console.debug('onWSClose:', success);
|
||||||
|
|
||||||
$rootScope.$emit('ws.close', success);
|
$rootScope.$emit('ws.close', success);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -825,9 +825,9 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
|
|||||||
|
|
||||||
screenshare: function(destination, callback) {
|
screenshare: function(destination, callback) {
|
||||||
|
|
||||||
|
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
if (storage.data.selectedShare !== "screen") {
|
if (storage.data.selectedShare !== "screen") {
|
||||||
|
|
||||||
console.log('share screen from device ' + storage.data.selectedShare);
|
console.log('share screen from device ' + storage.data.selectedShare);
|
||||||
@ -856,9 +856,9 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
|
|||||||
StreamTrack.addEventListener('ended', stopSharing);
|
StreamTrack.addEventListener('ended', stopSharing);
|
||||||
// (stream.getVideoTracks()[0]).onended = stopSharing;
|
// (stream.getVideoTracks()[0]).onended = stopSharing;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("screenshare started");
|
console.log("screenshare started");
|
||||||
|
|
||||||
function stopSharing() {
|
function stopSharing() {
|
||||||
if(that.data.shareCall) {
|
if(that.data.shareCall) {
|
||||||
that.screenshareHangup();
|
that.screenshareHangup();
|
||||||
@ -866,16 +866,16 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
data.shareCall = call;
|
data.shareCall = call;
|
||||||
|
|
||||||
console.log('shareCall', data);
|
console.log('shareCall', data);
|
||||||
|
|
||||||
data.mutedMic = false;
|
data.mutedMic = false;
|
||||||
data.mutedVideo = false;
|
data.mutedVideo = false;
|
||||||
|
|
||||||
that.refreshDevices();
|
that.refreshDevices();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user