зеркало из https://github.com/nextcloud/spreed.git
Open correct sidebar tabs when clicking the toggles
Signed-off-by: Marco <marcoambrosini@icloud.com>
This commit is contained in:
Родитель
fe2f54ab44
Коммит
19e3bfac00
|
@ -95,7 +95,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { emit } from '@nextcloud/event-bus'
|
||||
import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'
|
||||
import NcAppSidebar from '@nextcloud/vue/dist/Components/NcAppSidebar.js'
|
||||
import NcAppSidebarTab from '@nextcloud/vue/dist/Components/NcAppSidebarTab.js'
|
||||
import SharedItemsTab from './SharedItems/SharedItemsTab.vue'
|
||||
|
@ -274,6 +274,14 @@ export default {
|
|||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
subscribe('spreed:select-active-sidebar-tab', this.handleUpdateActive)
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
unsubscribe('spreed:select-active-sidebar-tab', this.handleUpdateActive)
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleClose() {
|
||||
this.dismissEditing()
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
<!-- Call time -->
|
||||
<CallTime v-if="isInCall"
|
||||
:start="1668761491"
|
||||
:start="conversation.callStartTime"
|
||||
:is-recording="isRecording"
|
||||
@stop-recording="isRecording = false" />
|
||||
|
||||
|
@ -85,7 +85,7 @@
|
|||
:container="container">
|
||||
<NcActionButton v-if="isInCall"
|
||||
key="openSideBarButtonMessageText"
|
||||
@click="openSidebar">
|
||||
@click="openSidebar('chat')">
|
||||
<template #icon>
|
||||
<MessageText :size="20"
|
||||
fill-color="#ffffff" />
|
||||
|
@ -104,7 +104,7 @@
|
|||
class="top-bar__button"
|
||||
close-after-click="true"
|
||||
:type="isInCall ? 'tertiary-on-primary': 'tertiary'"
|
||||
@click="openSidebar">
|
||||
@click="openSidebar('participants')">
|
||||
<template #icon>
|
||||
<AccountMultiple :size="20"
|
||||
:fill-color="isInCall ? '#ffffff': ''" />
|
||||
|
@ -341,7 +341,10 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
openSidebar() {
|
||||
openSidebar(activeTab) {
|
||||
if (activeTab) {
|
||||
emit('spreed:select-active-sidebar-tab', activeTab)
|
||||
}
|
||||
this.$store.dispatch('showSidebar')
|
||||
BrowserStorage.setItem('sidebarOpen', 'true')
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче