slight UX improvement
This commit is contained in:
parent
e9144e5703
commit
57fa8cf6fb
@ -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({
|
||||
|
@ -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();
|
||||
|
@ -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 {
|
||||
|
||||
}
|
||||
|
||||
.im_processing_recording {
|
||||
.im_recorder_indicator i {
|
||||
background-color: green;
|
||||
}
|
||||
|
||||
.im_record {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-emoji {
|
||||
display: inline-block;
|
||||
width: 22px;
|
||||
|
@ -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…
x
Reference in New Issue
Block a user