Browse Source

slight UX improvement

master
Jovan Gerodetti 10 years ago
parent
commit
57fa8cf6fb
  1. 2
      app/js/controllers.js
  2. 7
      app/js/directives.js
  3. 12
      app/less/mobile.less
  4. 2
      app/partials/mobile/im.html

2
app/js/controllers.js

@ -473,7 +473,7 @@ angular.module('myApp.controllers', ['myApp.i18n']) @@ -473,7 +473,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
skipped: false
};
$scope.voiceRecorder = { time : '', recording : null };
$scope.voiceRecorder = { time : '', recording : null, processing : false };
$scope.openSettings = function () {
$modal.open({

7
app/js/directives.js

@ -1593,17 +1593,22 @@ angular.module('myApp.directives', ['myApp.filters']) @@ -1593,17 +1593,22 @@ angular.module('myApp.directives', ['myApp.filters'])
voiceRecord.on('click', function(){
if (audioRecorder) {
$scope.$parent.$parent.voiceRecorder.processing = true;
audioRecorder.ondataavailable = function(e){
var blob = e.data;
console.log(blob);
$scope.draftMessage.files = [blob];
$scope.draftMessage.isMedia = true;
audioRecorder = null;
$scope.$parent.$parent.voiceRecorder.processing = false;
}
}
});
voiceRecord.on('touchend', function(){
$($window).on('touchend', function(){
if (audioRecorder) {
audioRecorder.stop();
audioStream.stop();

12
app/less/mobile.less

@ -1439,7 +1439,7 @@ a.im_message_fwd_author { @@ -1439,7 +1439,7 @@ a.im_message_fwd_author {
}
}
.im_voice_recording {
.im_voice_recording, .im_processing_recording {
background-color: rgb(23, 23, 23);
color: white;
@ -1461,6 +1461,16 @@ a.im_message_fwd_author { @@ -1461,6 +1461,16 @@ a.im_message_fwd_author {
}
.im_processing_recording {
.im_recorder_indicator i {
background-color: green;
}
.im_record {
display: none;
}
}
.icon-emoji {
display: inline-block;
width: 22px;

2
app/partials/mobile/im.html

@ -130,7 +130,7 @@ @@ -130,7 +130,7 @@
</div>
</div>
<div class="im_send_panel_wrap" ng-show="!historyState.actions()" ng-class="{im_voice_recording: voiceRecorder.recording}">
<div class="im_send_panel_wrap" ng-show="!historyState.actions()" ng-class="{im_voice_recording: voiceRecorder.recording, im_processing_recording: voiceRecorder.processing}">
<div class="im_send_form_wrap1">

Loading…
Cancel
Save