Adding small hover effect to message composition icon buttons. Removing extra method call.

pull/1834/head
Warrick Corfe-Tan 4 years ago
parent 123a60483e
commit 91eafd389a

@ -153,9 +153,9 @@ $session-font-h4: 16px;
color: subtle($color); color: subtle($color);
} }
@mixin pulse-color($color) { @mixin pulse-color($color, $repetition) {
animation: pulseColor 2s infinite; animation: pulseColor 2s $repetition;
@keyframes pulseColor { @keyframes pulseColor {
0% { 0% {
@ -217,23 +217,6 @@ $session-fadein-duration: 0.1s;
} }
} }
@keyframes pulse-shadow {
0% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
}
70% {
transform: scale(1);
box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
}
100% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
}
}
// ////////////////////////////////////////////// // //////////////////////////////////////////////
// ///////////////// Various //////////////////// // ///////////////// Various ////////////////////
// ////////////////////////////////////////////// // //////////////////////////////////////////////

@ -187,7 +187,13 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
opacity: 0.8; opacity: 0.7;
&:hover {
opacity: 1;
transform: scale(0.95);
transition: $session-transition-duration;
}
.send { .send {
padding: $session-margin-xs; padding: $session-margin-xs;
@ -436,7 +442,7 @@
background-color: $session-color-danger-alt; background-color: $session-color-danger-alt;
margin: 0 $session-margin-sm; margin: 0 $session-margin-sm;
@include pulse-color($session-color-danger-alt); @include pulse-color($session-color-danger-alt, infinite);
} }
} }
} }

@ -133,7 +133,7 @@ class SessionRecordingInner extends React.Component<Props, State> {
displayTimeString += remainingTimeString; displayTimeString += remainingTimeString;
} }
const actionPauseFn = isPlaying ? this.pauseAudio : this.stopRecordingStream; const actionPauseFn = isPlaying ? this.pauseAudio : this.onStopRecordingClick;
return ( return (
<div role="main" className="session-recording" tabIndex={0} onKeyDown={this.onKeyDown}> <div role="main" className="session-recording" tabIndex={0} onKeyDown={this.onKeyDown}>
@ -348,20 +348,19 @@ class SessionRecordingInner extends React.Component<Props, State> {
this.recorder = undefined; this.recorder = undefined;
this.audioBlobMp3 = blob; this.audioBlobMp3 = blob;
this.updateAudioElementAndDuration();
// Stop recording // Stop recording
this.stopRecordingState(); this.stopRecordingState();
} }
/**
* Stops recording and sets up audio element, updates recording state.
*/
private async onStopRecordingClick() { private async onStopRecordingClick() {
this.stopRecordingStream(); this.stopRecordingStream();
this.updateAudioElementAndDuration(); this.updateAudioElementAndDuration();
this.stopRecordingState();
} }
/** /**
* Creates an audio element using the recorded audio blob. * Creates an audio element using the recorded audio blob.
* Updates the duration for displaying audio duration. * Updates the duration for displaying audio duration.

Loading…
Cancel
Save