From fd43c37d1ce57532c2d53328fa5e2bb51ea8d1fa Mon Sep 17 00:00:00 2001 From: greta Date: Mon, 6 Jan 2025 11:40:38 +0100 Subject: [PATCH] fixup! feat:select existing talk roomfor convesations Signed-off-by: greta --- src/components/Editor/AddTalkModal.vue | 60 ++++++++++++++++++++------ src/views/EditSidebar.vue | 8 +++- 2 files changed, 54 insertions(+), 14 deletions(-) diff --git a/src/components/Editor/AddTalkModal.vue b/src/components/Editor/AddTalkModal.vue index c2ad63829..e57d3a297 100644 --- a/src/components/Editor/AddTalkModal.vue +++ b/src/components/Editor/AddTalkModal.vue @@ -5,17 +5,23 @@ @open="fetchTalkConversations"> @@ -29,12 +35,17 @@ import axios from '@nextcloud/axios' import { createTalkRoom } from '../../services/talkService.js' import { showError, showSuccess } from '@nextcloud/dialogs' import { generateOcsUrl } from '@nextcloud/router' +import IconAdd from 'vue-material-design-icons/Plus.vue' +import useCalendarObjectInstanceStore from '../../store/calendarObjects.js' +import { mapStores } from 'pinia'; + export default { name: 'AddTalkModal', components: { NcButton, NcModal, + IconAdd, }, props: { calendarObjectInstance: { @@ -53,12 +64,16 @@ export default { creatingTalkRoom: false, } }, + computed: { + ...mapStores(useCalendarObjectInstanceStore), + + }, methods: { async fetchTalkConversations() { try { const response = await axios.get(generateOcsUrl('apps/spreed/api/v1/room')) this.talkConversations = response.data.ocs.data.filter(conversation => - conversation.joinable || conversation.is_moderator, + conversation.joinable ) } catch (error) { console.error('Error fetching Talk conversations:', error) @@ -113,5 +128,24 @@ export default { } - diff --git a/src/views/EditSidebar.vue b/src/views/EditSidebar.vue index 02baa6b23..92d018323 100644 --- a/src/views/EditSidebar.vue +++ b/src/views/EditSidebar.vue @@ -91,10 +91,14 @@ @update:value="updateLocation" /> + {{ t('calendar','Add Talk') }} @@ -326,6 +330,7 @@ import { mapStores, mapState } from 'pinia' import AddTalkModal from '../components/Editor/AddTalkModal.vue' import { createTalkRoom, doesContainTalkLink } from '../services/talkService.js' import { showError, showSuccess } from '@nextcloud/dialogs' +import IconCheck from 'vue-material-design-icons/Check.vue' export default { name: 'EditSidebar', @@ -361,6 +366,7 @@ export default { AttachmentsList, CalendarPickerHeader, PropertyTitle, + IconCheck, }, mixins: [ EditorMixin, @@ -761,13 +767,13 @@ export default { display: flex; align-items: center; gap: 4px; + width: 100%; } .add-talk-button { flex-shrink: 0; } .property-location { margin-top: 10px; - margin-left: -43px; flex-grow: 1; } .property-description {