diff --git a/src/main/webapp/modules/sign-in.html b/src/main/webapp/modules/sign-in.html index db3d319..fc72982 100644 --- a/src/main/webapp/modules/sign-in.html +++ b/src/main/webapp/modules/sign-in.html @@ -6,11 +6,31 @@ +
+
+ +
+
+
+
+ + + +
+
+  
+ +
+
+ +
diff --git a/src/main/webapp/resources/css/olympus-v2.css b/src/main/webapp/resources/css/olympus-v2.css index 6d1657f..53ea768 100644 --- a/src/main/webapp/resources/css/olympus-v2.css +++ b/src/main/webapp/resources/css/olympus-v2.css @@ -132,6 +132,10 @@ border-radius: 4px 4px; } +.chat-participant-block .avatar.contact-avatar i { + border-radius: 4px 4px; +} + .contact-space > div { cursor: pointer; font-size: 16px; diff --git a/src/main/webapp/resources/css/olympus.css b/src/main/webapp/resources/css/olympus.css index ee01b55..7779762 100644 --- a/src/main/webapp/resources/css/olympus.css +++ b/src/main/webapp/resources/css/olympus.css @@ -121,17 +121,80 @@ form[role=login] > section { margin-top: 2em; } -form[role=login] section a { +.clickable { + cursor: pointer; +} + +.no-select { + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Safari */ + -khtml-user-select: none; /* Konqueror HTML */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; /* Non-prefixed version, currently + supported by Chrome and Opera */ +} + +.sign-in-users-list { + margin: 25px 0; +} + +.sign-in-user { + min-width: 150px; + color: #1f85ae; +} + +.sign-in-user.ng-leave { + display: none; +} + +.sign-in-users-list div { + display: inline-block; +} + +.sign-in-users-list-scroll { + font-size: 5em; + vertical-align: text-bottom; + margin-bottom: 10px; + color: #1F85AE; + cursor: pointer; +} + +.sign-in-users-list-scroll-disabled { + color: #E6E6E6; + cursor: auto; +} + +a.sign-in-link { color: #a8a8a9; } -form[role=login] h3 { +.sign-in-text { font-size: 30px; font-weight: 300; font-family: lato; text-align: center; color: #6d6e70; - padding: 70px 0 12px 0; + padding: 50px 0 12px 0; +} + +@media(max-width:768px) { + .sign-in-users-list-scroll { + font-size: 3em; + } + + .sign-in-users-list { + margin: 25px 0; + } + + .sign-in-user { + min-width: 100px; + } + + .sign-in-user > img { + width: 50px; + } + } form[role=login] input { diff --git a/src/main/webapp/resources/images/v2/user-blue.svg b/src/main/webapp/resources/images/v2/user-blue.svg new file mode 100644 index 0000000..9455847 --- /dev/null +++ b/src/main/webapp/resources/images/v2/user-blue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main/webapp/resources/js/controllers/sign-in.js b/src/main/webapp/resources/js/controllers/sign-in.js index 1324cd5..c44b4a2 100644 --- a/src/main/webapp/resources/js/controllers/sign-in.js +++ b/src/main/webapp/resources/js/controllers/sign-in.js @@ -168,4 +168,47 @@ olyMod.controller('SignInCtrl', function ($scope, $rootScope, $location, $timeou }); }); + // Auto-login functionality, based on stored credentials + + if (sessionStorage.sid && sessionStorage.auth_token) { + var auth_header = sessionStorage.sid + ":" + sessionStorage.auth_token; + auth_header = "Basic " + btoa(auth_header); + $http({ + method: 'GET', + url: '/restcomm/2012-04-24/Accounts/' + sessionStorage.sid + '/Clients.json', + headers: { + 'Authorization': auth_header + }, + }).then( + function successCallback(response) { + $scope.predefinedClients = response.data; + }, + function errorCallback(response) { + // noop + }); + } + + $scope.loginAs = function(login) { + $scope.sip.username = login; + $scope.mirrorUsername(); + angular.forEach($scope.predefinedClients, function(client) { + if (client.login === login) { + $scope.sip.password = client.password; + } + }); + $timeout(function() { + $scope.connect(); + }); + } + + $scope.startUser = 0; + $scope.maxUsers = 3; + + $scope.nextUsers = function() { + $scope.startUser = Math.min($scope.predefinedClients.length - $scope.maxUsers, $scope.startUser + $scope.maxUsers); + } + + $scope.prevUsers = function() { + $scope.startUser = Math.max(0, $scope.startUser - $scope.maxUsers); + } });