Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(toolbar): disable group call button #3216

Merged
merged 2 commits into from
May 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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