Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default {

methods: {
userStatusUpdated(state) {
if (this.token) {
if (this.token && this.participantsList.find(participant => participant.actorId === state.userId)) {
this.$store.dispatch('updateUser', {
token: this.token,
participantIdentifier: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,10 @@ export default {
},

actionIcon() {
if (this.isModerator) {
return ''
}

if (this.attendeePermissions === PARTICIPANT.PERMISSIONS.MAX_CUSTOM) {
return 'LockOpenVariant'
} else if (this.attendeePermissions === PARTICIPANT.PERMISSIONS.CUSTOM) {
Expand Down
74 changes: 42 additions & 32 deletions src/components/RightSidebar/RightSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
@update:active="handleUpdateActive"
@closed="handleClosed"
@close="handleClose">
<template slot="description">
<template #description>
<LobbyStatus v-if="canFullModerate && hasLobbyEnabled" :token="token" />
</template>
<NcAppSidebarTab v-if="isInCall"
id="chat"
:order="1"
:name="t('spreed', 'Chat')">
<template slot="icon">
<template #icon>
<Message :size="20" />
</template>
<ChatView :is-visible="opened" />
Expand All @@ -46,7 +46,7 @@
ref="participantsTab"
:order="2"
:name="participantsText">
<template slot="icon">
<template #icon>
<AccountMultiple :size="20" />
</template>
<ParticipantsTab :is-active="activeTab === 'participants'"
Expand All @@ -58,7 +58,7 @@
ref="breakout-rooms"
:order="3"
:name="breakoutRoomsText">
<template slot="icon">
<template #icon>
<DotsCircle :size="20" />
</template>
<BreakoutRoomsTab :main-token="mainConversationToken"
Expand All @@ -69,7 +69,7 @@
id="details-tab"
:order="4"
:name="t('spreed', 'Details')">
<template slot="icon">
<template #icon>
<InformationOutline :size="20" />
</template>
<SetGuestUsername v-if="!getUserId" />
Expand All @@ -79,7 +79,7 @@
<div v-if="!getUserId" id="app-settings">
<div id="app-settings-header">
<NcButton type="tertiary" @click="showSettings">
<template slot="icon">
<template #icon>
<CogIcon :size="20" />
</template>
{{ t('spreed', 'Settings') }}
Expand All @@ -92,7 +92,7 @@
ref="sharedItemsTab"
:order="5"
:name="t('spreed', 'Shared items')">
<template slot="icon">
<template #icon>
<FolderMultipleImage :size="20" />
</template>
<SharedItemsTab :active="activeTab === 'shared-items'" />
Expand Down Expand Up @@ -300,26 +300,23 @@ export default {
},

isInCall(newValue) {
// Waiting for chat tab to mount / destroy
this.$nextTick(() => {
if (newValue) {
// Set 'chat' tab as active, and switch to it if sidebar is open
this.activeTab = 'chat'
return
}

// If 'chat' tab wasn't active, leave it as is
if (this.activeTab !== 'chat') {
return
}

// In other case switch to other tabs
if (this.isOneToOne) {
this.activeTab = 'shared-items'
} else {
this.activeTab = 'participants'
}
})
if (newValue) {
// Set 'chat' tab as active, and switch to it if sidebar is open
this.activeTab = 'chat'
return
}

// If 'chat' tab wasn't active, leave it as is
if (this.activeTab !== 'chat') {
return
}

// In other case switch to other tabs
if (this.isOneToOne) {
this.activeTab = 'shared-items'
} else {
this.activeTab = 'participants'
}
},

token() {
Expand All @@ -328,11 +325,6 @@ export default {
}
},

$slots() {
console.debug('Sidebar slots changed, re rendering')
this.$forceUpdate()
},

// Switch tab for guest if he is demoted from moderators
isModeratorOrUser(newValue) {
if (!newValue) {
Expand Down Expand Up @@ -383,6 +375,24 @@ export default {
flex-direction: column;
}

// FIXME upstream: move styles to nextcloud-vue library
:deep(.app-sidebar-tabs__nav) {
padding: 0 10px;

.checkbox-radio-switch__label {
text-align: center;
justify-content: flex-start;
}

.checkbox-radio-switch__icon {
flex-basis: auto;

span {
margin: 0;
}
}
}

.app-sidebar-tabs__content #tab-chat {
/* Remove padding to maximize the space for the chat view. */
padding: 0;
Expand Down