Skip to content

Commit

Permalink
Merge pull request #9122 from nextcloud/feat/noid/disable-unsupported…
Browse files Browse the repository at this point in the history
…-featues-on-desktop

Disable unsupported featues on desktop
  • Loading branch information
ShGKme authored Mar 26, 2023
2 parents 16a962b + aa601ab commit 53db9e2
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/components/AvatarWrapper/AvatarWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
:menu-container="menuContainerWithFallback"
menu-position="left"
:disable-tooltip="disableTooltip"
:disable-menu="disableMenu"
:disable-menu="isDisabledMenu"
:show-user-status="showUserStatus"
:show-user-status-compact="showUserStatusCompact"
:preloaded-user-status="preloadedUserStatus"
Expand Down Expand Up @@ -129,6 +129,11 @@ export default {
sizeToString() {
return this.size.toString()
},
isDisabledMenu() {
// NcAvatarMenu doesn't work on Desktop
// See: https://github.com/nextcloud/talk-desktop/issues/34
return IS_DESKTOP || this.disableMenu
},
},
}
</script>
Expand Down
7 changes: 6 additions & 1 deletion src/components/AvatarWrapper/AvatarWrapperSmall.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
:menu-container="menuContainer"
menu-position="left"
:disable-tooltip="disableTooltip"
:disable-menu="disableMenu"
:disable-menu="isDisabledMenu"
:show-user-status="showUserStatus"
:size="size" />
<div v-else
Expand Down Expand Up @@ -129,6 +129,11 @@ export default {
sizeToString() {
return this.size.toString()
},
isDisabledMenu() {
// NcAvatarMenu doesn't work on Desktop
// See: https://github.com/nextcloud/talk-desktop/issues/34
return IS_DESKTOP || this.disableMenu
},
},
}
</script>
Expand Down
5 changes: 5 additions & 0 deletions src/components/CallView/shared/LocalMediaControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,11 @@ export default {
},

toggleScreenSharingMenu() {
if (IS_DESKTOP) {
alert('Unfortunately, Screen sharing is not supported by Nextcloud Talk Preview')
return
}

if (!this.isScreensharingAllowed) {
return
}
Expand Down
5 changes: 5 additions & 0 deletions src/components/MessagesList/MessagesGroup/AuthorAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ export default {
},

disableMenu() {
// NcAvatarMenu doesn't work on Desktop
// See: https://github.com/nextcloud/talk-desktop/issues/34
if (IS_DESKTOP) {
return false
}
// disable the menu if accessing the conversation as guest
// or the message sender is a bridged user
return this.$store.getters.getActorType() === 'guests' || this.authorType === ATTENDEE.ACTOR_TYPE.BRIDGED
Expand Down
7 changes: 7 additions & 0 deletions src/components/TopBar/TopBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
class="conversation-icon"
:offline="isPeerOffline"
:item="conversation"
:disable-menu="isAvatarMenuDisabled"
:hide-favorite="false"
:hide-call="false" />
<!-- conversation header -->
Expand Down Expand Up @@ -285,6 +286,12 @@ export default {
participantsInCallAriaLabel() {
return n('spreed', '%n participant in call', '%n participants in call', this.$store.getters.participantsInCall(this.token))
},

isAvatarMenuDisabled() {
// NcAvatarMenu doesn't work on Desktop
// See: https://github.com/nextcloud/talk-desktop/issues/34
return IS_DESKTOP
},
},

watch: {
Expand Down

0 comments on commit 53db9e2

Please sign in to comment.