Skip to content

Commit

Permalink
fix(toolbar): disable group call button (#3216)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwoodland committed May 18, 2022
1 parent 1aec573 commit 44a1894
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 12 deletions.
4 changes: 2 additions & 2 deletions components/views/group/clickable/Clickable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export default Vue.extend({
return {
contextMenuValues: [
{ text: this.$t('context.send'), func: this.testFunc },
{ text: this.$t('context.voice'), func: this.testFunc },
{ text: this.$t('context.video'), func: this.testFunc },
// { text: this.$t('context.voice'), func: this.testFunc },
// { text: this.$t('context.video'), func: this.testFunc },
{ text: this.$t('context.remove'), func: this.testFunc },
],
}
Expand Down
40 changes: 30 additions & 10 deletions components/views/navigation/toolbar/Toolbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,36 @@
>
<ToolbarAlerts :notifications="allUnseenNotifications" />
</UiFloatingContainer>
<div
:class="`has-tooltip has-tooltip-bottom has-tooltip-primary has-tooltip-hidden-touch control-button
${!enableRTC || webrtc.activeCall ? 'disabled' : ''}`"
data-cy="toolbar-enable-audio"
:data-tooltip="enableRTC ? $t('controls.call') : $t('controls.not_connected')"
v-if="server"
@click="() => call(['audio'])"
>
<phone-call-icon size="1x" class="control-icon" />
</div>
<template v-if="conversation.type === 'friend'">
<div
:class="`has-tooltip has-tooltip-bottom has-tooltip-primary has-tooltip-hidden-touch control-button
${!enableRTC || webrtc.activeCall ? 'disabled' : ''}`"
data-cy="toolbar-enable-audio"
:data-tooltip="enableRTC ? $t('controls.call') : $t('controls.not_connected')"
v-if="server"
@click="() => call(['audio'])"
>
<phone-call-icon size="1x" class="control-icon" />
</div>
</template>
<template v-else>
<UiComingSoon
v-if="!$device.isMobile"
:tooltipText="$t('coming_soon.group_call')"
:tooltipPosition="'bottom'"
data-cy="toolbar-enable-audio"
>
<div
:class="`has-tooltip has-tooltip-bottom has-tooltip-primary has-tooltip-hidden-touch control-button
${!enableRTC || webrtc.activeCall ? 'disabled' : ''}`"
:data-tooltip="enableRTC ? $t('controls.call') : $t('controls.not_connected')"
v-if="server"
@click="() => call(['audio'])"
>
<phone-call-icon size="1x" class="control-icon" color="grey" />
</div>
</UiComingSoon>
</template>
<!-- <div
:class="`has-tooltip has-tooltip-bottom has-tooltip-primary has-tooltip-hidden-touch control-button
${!enableRTC || webrtc.activeCall ? 'disabled' : ''}`"
Expand Down
1 change: 1 addition & 0 deletions locales/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default {
marketplace: 'Marketplace\nComing Soon',
wallet: 'Wallet\nComing Soon',
archived: 'Archived Messages\nComing Soon',
group_call: 'Group Call\nComing Soon',
sidebar_search: 'Friends and Group search\ncoming soon',
},
global: {
Expand Down

0 comments on commit 44a1894

Please sign in to comment.