From 4a413843fa75e63447e6f5cf7e1eeb06376e8d1c Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Fri, 17 May 2024 09:19:39 +0200 Subject: [PATCH 1/2] feat(mobile): use button without text if on mobile Signed-off-by: Simon L --- src/components/TopBar/CallButton.vue | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/components/TopBar/CallButton.vue b/src/components/TopBar/CallButton.vue index e8f44536e43..762e09cba41 100644 --- a/src/components/TopBar/CallButton.vue +++ b/src/components/TopBar/CallButton.vue @@ -30,6 +30,7 @@ autoHide: false, html: true }" + :aria-label="startCallLabel" :disabled="startCallButtonDisabled || loading" :type="startCallButtonType" @click="handleClick"> @@ -38,31 +39,40 @@ - {{ startCallLabel }} + - {{ t('spreed', 'End call') }} + - {{ leaveCallLabel }} + @@ -110,6 +120,7 @@ import { loadState } from '@nextcloud/initial-state' import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js' import NcActions from '@nextcloud/vue/dist/Components/NcActions.js' import NcButton from '@nextcloud/vue/dist/Components/NcButton.js' +import { useIsMobile } from '@nextcloud/vue/dist/Composables/useIsMobile.js' import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip.js' import { useIsInCall } from '../../composables/useIsInCall.js' @@ -190,6 +201,7 @@ export default { breakoutRoomsStore: useBreakoutRoomsStore(), talkHashStore: useTalkHashStore(), settingsStore: useSettingsStore(), + isMobile: useIsMobile(), } }, @@ -269,6 +281,10 @@ export default { return this.silentCall ? t('spreed', 'Start call silently') : t('spreed', 'Start call') }, + endCallLabel() { + return t('spreed', 'End call') + }, + startCallToolTip() { if (this.isNextcloudTalkHashDirty) { return t('spreed', 'Nextcloud Talk was updated, you need to reload the page before you can start or join a call.') From a7e73f69583b028020fdaeba61fb99ca18603258 Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Fri, 31 May 2024 17:37:58 +0200 Subject: [PATCH 2/2] fix: hide text on mobile for TopBar only Signed-off-by: Maksim Sukharev --- src/components/TopBar/CallButton.vue | 22 ++++++++++++++++------ src/components/TopBar/TopBar.vue | 2 +- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/components/TopBar/CallButton.vue b/src/components/TopBar/CallButton.vue index 762e09cba41..8fccb5ec976 100644 --- a/src/components/TopBar/CallButton.vue +++ b/src/components/TopBar/CallButton.vue @@ -39,7 +39,7 @@ -