Skip to content

Commit

Permalink
fix(call): prevent call time jumping
Browse files Browse the repository at this point in the history
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
  • Loading branch information
ShGKme authored and backportbot[bot] committed Nov 21, 2024
1 parent 0685962 commit d945765
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions src/components/TopBar/CallTime.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
:size="20"
fill-color="var(--color-loading-light)" />
</template>
{{ formattedTime(callTime) }}
<span class="call-time__text">
<span class="call-time__placeholder">{{ placeholderCallTime }}</span>
<span>{{ formattedCallTime }}</span>
</span>
</NcButton>
</template>

Expand Down Expand Up @@ -153,6 +156,14 @@ export default {

return ''
},

formattedCallTime() {
return formattedTime(this.callTime)
},

placeholderCallTime() {
return this.formattedCallTime.replace(/\d/g, '0')
},
},

watch: {
Expand All @@ -174,11 +185,6 @@ export default {

methods: {
t,
/**
* Calculates the stopwatch string given the callTime (ms)
*
*/
formattedTime,

stopRecording() {
this.$store.dispatch('stopCallRecording', {
Expand Down Expand Up @@ -230,6 +236,17 @@ export default {
align-items: center;
height: var(--default-clickable-area);
font-weight: bold;

&__text {
display: flex;
flex-direction: column;
align-items: center;
}

&__placeholder {
height: 0;
overflow: hidden;
}
}

:deep(.button-vue) {
Expand Down

0 comments on commit d945765

Please sign in to comment.