mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-19 00:11:47 +01:00
Kill ng-animate with fire because it's terrible (was causing the page to be very sluggish). Do the call icons in pure CSS3 and use one less image to boot (in some browsers the phone icon will be the wrong browser but they can deal).
This commit is contained in:
parent
0046df4b51
commit
f842bca471
6 changed files with 15 additions and 9 deletions
|
@ -21,8 +21,8 @@ limitations under the License.
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'eventStreamService'])
|
angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'eventStreamService'])
|
||||||
.controller('MatrixWebClientController', ['$scope', '$location', '$rootScope', '$timeout', '$animate', 'matrixService', 'mPresence', 'eventStreamService', 'eventHandlerService', 'matrixPhoneService', 'modelService',
|
.controller('MatrixWebClientController', ['$scope', '$location', '$rootScope', '$timeout', 'matrixService', 'mPresence', 'eventStreamService', 'eventHandlerService', 'matrixPhoneService', 'modelService',
|
||||||
function($scope, $location, $rootScope, $timeout, $animate, matrixService, mPresence, eventStreamService, eventHandlerService, matrixPhoneService, modelService) {
|
function($scope, $location, $rootScope, $timeout, matrixService, mPresence, eventStreamService, eventHandlerService, matrixPhoneService, modelService) {
|
||||||
|
|
||||||
// Check current URL to avoid to display the logout button on the login page
|
// Check current URL to avoid to display the logout button on the login page
|
||||||
$scope.location = $location.path();
|
$scope.location = $location.path();
|
||||||
|
@ -30,8 +30,8 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even
|
||||||
// disable nganimate for the local and remote video elements because ngAnimate appears
|
// disable nganimate for the local and remote video elements because ngAnimate appears
|
||||||
// to be buggy and leaves animation classes on the video elements causing them to show
|
// to be buggy and leaves animation classes on the video elements causing them to show
|
||||||
// when they should not (their animations are pure CSS3)
|
// when they should not (their animations are pure CSS3)
|
||||||
$animate.enabled(false, angular.element('#localVideo'));
|
//$animate.enabled(false, angular.element('#localVideo'));
|
||||||
$animate.enabled(false, angular.element('#remoteVideo'));
|
//$animate.enabled(false, angular.element('#remoteVideo'));
|
||||||
|
|
||||||
// Update the location state when the ng location changed
|
// Update the location state when the ng location changed
|
||||||
$rootScope.$on('$routeChangeSuccess', function (event, current, previous) {
|
$rootScope.$on('$routeChangeSuccess', function (event, current, previous) {
|
||||||
|
|
|
@ -66,6 +66,15 @@ textarea, input {
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
|
transition: transform linear 0.5s;
|
||||||
|
transition: -webkit-transform linear 0.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.callIcon.ended {
|
||||||
|
transform: rotateZ(45deg);
|
||||||
|
-webkit-transform: rotateZ(45deg);
|
||||||
|
filter: hue-rotate(-90deg);
|
||||||
|
-webkit-filter: hue-rotate(-90deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
#callEndedIcon {
|
#callEndedIcon {
|
||||||
|
|
|
@ -16,7 +16,6 @@ limitations under the License.
|
||||||
|
|
||||||
var matrixWebClient = angular.module('matrixWebClient', [
|
var matrixWebClient = angular.module('matrixWebClient', [
|
||||||
'ngRoute',
|
'ngRoute',
|
||||||
'ngAnimate',
|
|
||||||
'MatrixWebClientController',
|
'MatrixWebClientController',
|
||||||
'LoginController',
|
'LoginController',
|
||||||
'RegisterController',
|
'RegisterController',
|
||||||
|
|
|
@ -112,7 +112,7 @@ angular.module('MatrixCall', [])
|
||||||
} else {
|
} else {
|
||||||
var iceServers = [];
|
var iceServers = [];
|
||||||
// https://github.com/EricssonResearch/openwebrtc/issues/85
|
// https://github.com/EricssonResearch/openwebrtc/issues/85
|
||||||
if (MatrixCall.turnServer /*&& !this.isOpenWebRTC()*/) {
|
if (MatrixCall.turnServer && !this.isOpenWebRTC()) {
|
||||||
if (MatrixCall.turnServer.uris) {
|
if (MatrixCall.turnServer.uris) {
|
||||||
iceServers.push({
|
iceServers.push({
|
||||||
'urls': MatrixCall.turnServer.uris,
|
'urls': MatrixCall.turnServer.uris,
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 378 B |
|
@ -16,7 +16,6 @@
|
||||||
<script src="js/angular.js"></script>
|
<script src="js/angular.js"></script>
|
||||||
<script src="js/angular-route.min.js"></script>
|
<script src="js/angular-route.min.js"></script>
|
||||||
<script src="js/angular-sanitize.min.js"></script>
|
<script src="js/angular-sanitize.min.js"></script>
|
||||||
<script src="js/angular-animate.min.js"></script>
|
|
||||||
<script src="js/jquery.peity.min.js"></script>
|
<script src="js/jquery.peity.min.js"></script>
|
||||||
<script src="js/angular-peity.js"></script>
|
<script src="js/angular-peity.js"></script>
|
||||||
<script type='text/javascript' src="js/ui-bootstrap-tpls-0.11.2.js"></script>
|
<script type='text/javascript' src="js/ui-bootstrap-tpls-0.11.2.js"></script>
|
||||||
|
@ -66,8 +65,7 @@
|
||||||
<div id="headerContent" ng-hide="'/login' == location || '/register' == location">
|
<div id="headerContent" ng-hide="'/login' == location || '/register' == location">
|
||||||
<div id="callBar" ng-show="currentCall">
|
<div id="callBar" ng-show="currentCall">
|
||||||
<img id="callPeerImage" ng-show="currentCall.userProfile.avatar_url" ngSrc="{{ currentCall.userProfile.avatar_url }}" />
|
<img id="callPeerImage" ng-show="currentCall.userProfile.avatar_url" ngSrc="{{ currentCall.userProfile.avatar_url }}" />
|
||||||
<img class="callIcon" src="img/green_phone.png" ng-show="currentCall.state != 'ended'" />
|
<img class="callIcon" src="img/green_phone.png" ng-show="!!currentCall" ng-class="currentCall.state" />
|
||||||
<img class="callIcon" id="callEndedIcon" src="img/red_phone.png" ng-show="currentCall.state == 'ended'" />
|
|
||||||
<div id="callPeerNameAndState">
|
<div id="callPeerNameAndState">
|
||||||
<span id="callPeerName">{{ currentCall.userProfile.displayname }}</span>
|
<span id="callPeerName">{{ currentCall.userProfile.displayname }}</span>
|
||||||
<br />
|
<br />
|
||||||
|
|
Loading…
Reference in a new issue