fix: hide text on mobile for TopBar only

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
This commit is contained in:
Maksim Sukharev 2024-05-31 17:37:58 +02:00
parent 8a194ee8ee
commit 1d6ea36d71
No known key found for this signature in database
GPG key ID: 6349D071889BD1D5
2 changed files with 17 additions and 7 deletions

View file

@ -23,7 +23,7 @@
<VideoOutlineIcon v-else-if="silentCall" :size="20" />
<VideoIcon v-else :size="20" />
</template>
<template v-if="!isMobile" #default>
<template v-if="showButtonText" #default>
{{ startCallLabel }}
</template>
</NcButton>
@ -36,7 +36,7 @@
<template #icon>
<PhoneHangup :size="20" />
</template>
<template v-if="!isMobile" #default>
<template v-if="showButtonText" #default>
{{ endCallLabel }}
</template>
</NcButton>
@ -49,14 +49,14 @@
<template #icon>
<VideoOff :size="20" />
</template>
<template v-if="!isMobile" #default>
<template v-if="showButtonText" #default>
{{ leaveCallLabel }}
</template>
</NcButton>
<NcActions v-else-if="showLeaveCallButton && (canEndForAll || isBreakoutRoom)"
:disabled="loading"
:aria-label="leaveCallCombinedLabel"
:menu-name="!isMobile ? leaveCallCombinedLabel : undefined"
:menu-name="showButtonText ? leaveCallCombinedLabel : undefined"
force-name
:container="container"
:type="isScreensharing ? 'tertiary' : 'error'">
@ -176,7 +176,15 @@ export default {
isScreensharing: {
type: Boolean,
default: false,
}
},
/**
* Whether the to use text on button at mobile view
*/
shrinkOnMobile: {
type: Boolean,
default: false,
},
},
setup() {
@ -209,7 +217,9 @@ export default {
conversation() {
return this.$store.getters.conversation(this.token) || this.$store.getters.dummyConversation
},
showButtonText() {
return !this.isMobile || !this.shrinkOnMobile
},
showRecordingWarning() {
return [CALL.RECORDING.VIDEO_STARTING, CALL.RECORDING.AUDIO_STARTING,
CALL.RECORDING.VIDEO, CALL.RECORDING.AUDIO].includes(this.conversation.callRecording)

View file

@ -78,7 +78,7 @@
:model="localMediaModel"
@open-breakout-rooms-editor="showBreakoutRoomsEditor = true" />
<CallButton :is-screensharing="!!localMediaModel.attributes.localScreen" />
<CallButton shrink-on-mobile :is-screensharing="!!localMediaModel.attributes.localScreen" />
<!-- sidebar toggle -->
<template v-if="showOpenSidebarButton">