Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 5 additions & 2 deletions src/components/NewMessage/NewMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ import { parseSpecialSymbols } from '../../utils/textParse.ts'
const disableKeyboardShortcuts = OCP.Accessibility.disableKeyboardShortcuts()
const supportTypingStatus = getCapabilities()?.spreed?.config?.chat?.['typing-privacy'] !== undefined
const canEditMessage = getCapabilities()?.spreed?.features?.includes('edit-messages')
const attachmentsAllowed = getCapabilities()?.spreed?.config?.attachments?.allowed
const supportFederationV1 = getCapabilities()?.spreed?.features?.includes('federation-v1')

export default {
name: 'NewMessage',
Expand Down Expand Up @@ -407,17 +409,18 @@ export default {

canShareFiles() {
return !this.currentUserIsGuest
&& (!supportFederationV1 || !this.conversation.remoteServer)
},

canUploadFiles() {
return getCapabilities()?.spreed?.config?.attachments?.allowed
return attachmentsAllowed && this.canShareFiles
&& this.$store.getters.getAttachmentFolderFreeSpace() !== 0
&& this.canShareFiles
},

canCreatePoll() {
return !this.isOneToOne && !this.noChatPermission
&& this.conversation.type !== CONVERSATION.TYPE.NOTE_TO_SELF
&& (!supportFederationV1 || !this.conversation.remoteServer)
},

currentConversationIsJoined() {
Expand Down
16 changes: 14 additions & 2 deletions src/components/RightSidebar/RightSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
:main-conversation="mainConversation"
:is-active="activeTab === 'breakout-rooms'" />
</NcAppSidebarTab>
<NcAppSidebarTab v-if="!getUserId || showSIPSettings"
<NcAppSidebarTab v-if="showDetailsTab"
id="details-tab"
:order="4"
:name="t('spreed', 'Details')">
Expand All @@ -87,7 +87,7 @@
</div>
</div>
</NcAppSidebarTab>
<NcAppSidebarTab v-if="getUserId"
<NcAppSidebarTab v-if="showSharedItemsTab"
id="shared-items"
ref="sharedItemsTab"
:order="5"
Expand All @@ -108,6 +108,7 @@ import FolderMultipleImage from 'vue-material-design-icons/FolderMultipleImage.v
import InformationOutline from 'vue-material-design-icons/InformationOutline.vue'
import Message from 'vue-material-design-icons/Message.vue'

import { getCapabilities } from '@nextcloud/capabilities'
import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'

import NcAppSidebar from '@nextcloud/vue/dist/Components/NcAppSidebar.js'
Expand All @@ -125,6 +126,8 @@ import SetGuestUsername from '../SetGuestUsername.vue'
import { CONVERSATION, WEBINAR, PARTICIPANT } from '../../constants.js'
import BrowserStorage from '../../services/BrowserStorage.js'

const supportFederationV1 = getCapabilities()?.spreed?.features?.includes('federation-v1')

export default {
name: 'RightSidebar',
components: {
Expand Down Expand Up @@ -266,13 +269,22 @@ export default {

showBreakoutRoomsTab() {
return this.getUserId && !this.isOneToOne
&& (!supportFederationV1 || !this.conversation.remoteServer)
&& (this.breakoutRoomsConfigured || this.conversation.breakoutRoomMode === CONVERSATION.BREAKOUT_ROOM_MODE.FREE || this.conversation.objectType === CONVERSATION.OBJECT_TYPE.BREAKOUT_ROOM)
},

showParticipantsTab() {
return (this.getUserId || this.isModeratorOrUser) && !this.isOneToOne && !this.isNoteToSelf
},

showSharedItemsTab() {
return this.getUserId && (!supportFederationV1 || !this.conversation.remoteServer)
},

showDetailsTab() {
return !this.getUserId || this.showSIPSettings
},

isNoteToSelf() {
return this.conversation.type === CONVERSATION.TYPE.NOTE_TO_SELF
},
Expand Down
4 changes: 4 additions & 0 deletions src/components/TopBar/CallButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ import VideoBoxOff from 'vue-material-design-icons/VideoBoxOff.vue'
import VideoOff from 'vue-material-design-icons/VideoOff.vue'
import VideoOutlineIcon from 'vue-material-design-icons/VideoOutline.vue'

import { getCapabilities } from '@nextcloud/capabilities'
import { showError } from '@nextcloud/dialogs'
import { emit } from '@nextcloud/event-bus'
import { loadState } from '@nextcloud/initial-state'
Expand All @@ -119,6 +120,8 @@ import { useSettingsStore } from '../../stores/settings.js'
import { useTalkHashStore } from '../../stores/talkHash.js'
import { blockCalls, unsupportedWarning } from '../../utils/browserCheck.js'

const supportFederationV1 = getCapabilities()?.spreed?.features?.includes('federation-v1')

export default {
name: 'CallButton',

Expand Down Expand Up @@ -298,6 +301,7 @@ export default {
return this.callEnabled
&& this.conversation.type !== CONVERSATION.TYPE.NOTE_TO_SELF
&& this.conversation.readOnly === CONVERSATION.STATE.READ_WRITE
&& (!supportFederationV1 || !this.conversation.remoteServer)
&& !this.isInCall
},

Expand Down