Skip to content

Commit

Permalink
fix(toolbar): disable call button when in call (#3299)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwoodland authored May 25, 2022
1 parent d14325a commit 3c3337d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions components/views/navigation/toolbar/Toolbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
data-cy="toolbar-enable-audio"
:data-tooltip="enableRTC ? $t('controls.call') : $t('controls.not_connected')"
v-if="server"
@click="() => call(['audio'])"
@click="handleCall"
>
<phone-call-icon size="1x" class="control-icon" />
</div>
Expand All @@ -81,7 +81,7 @@
${!enableRTC || webrtc.activeCall ? 'disabled' : ''}`"
:data-tooltip="enableRTC ? $t('controls.call') : $t('controls.not_connected')"
v-if="server"
@click="() => call(['audio'])"
@click="handleCall"
>
<phone-call-icon size="1x" class="control-icon" color="grey" />
</div>
Expand Down
5 changes: 2 additions & 3 deletions components/views/navigation/toolbar/Toolbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@
}
.disabled {
&:extend(.font-muted);
&,
svg {
cursor: not-allowed !important;
& {
cursor: not-allowed;
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions components/views/navigation/toolbar/Toolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,12 @@ export default Vue.extend({
kinds,
})
},
handleCall() {
if (!this.enableRTC || this.webrtc.activeCall) {
return
}
this.call(['audio'])
},
},
})
</script>
Expand Down

0 comments on commit 3c3337d

Please sign in to comment.