From ed77f5b7dd63194539f6d363c4d44efcf786bac5 Mon Sep 17 00:00:00 2001 From: greta Date: Fri, 24 Jan 2025 11:55:07 +0100 Subject: [PATCH] fix: close modal after creating conversation Signed-off-by: greta --- src/components/Editor/AddTalkModal.vue | 12 ++++--- src/services/talkService.js | 2 +- src/views/EditSidebar.vue | 45 ++------------------------ 3 files changed, 10 insertions(+), 49 deletions(-) diff --git a/src/components/Editor/AddTalkModal.vue b/src/components/Editor/AddTalkModal.vue index 7fdf68b3a..4f59f6a10 100644 --- a/src/components/Editor/AddTalkModal.vue +++ b/src/components/Editor/AddTalkModal.vue @@ -145,7 +145,7 @@ export default { calendarObjectInstance: this.calendarObjectInstance, location: url, }) - showSuccess(this.$t('calendar', 'Successfully added Talk room link to location.')) + showSuccess(this.$t('calendar', 'Successfully added Talk conversation link to location.')) } else { const NEW_LINE = '\r\n' const updatedDescription = this.calendarObjectInstance.description @@ -156,7 +156,7 @@ export default { calendarObjectInstance: this.calendarObjectInstance, description: updatedDescription, }) - showSuccess(this.$t('calendar', 'Successfully added Talk room link to description.')) + showSuccess(this.$t('calendar', 'Successfully added Talk conversation link to description.')) } this.selectedConversation = conversation @@ -183,18 +183,19 @@ export default { if ((this.calendarObjectInstance.location ?? '').trim() === '') { this.$emit('update-location', url) - showSuccess(this.$t('calendar', 'Successfully added Talk room link to location.')) + showSuccess(this.$t('calendar', 'Successfully added Talk conversation link to location.')) } else { const newDescription = this.calendarObjectInstance.description ? this.calendarObjectInstance.description + NEW_LINE + NEW_LINE + url + NEW_LINE : url this.$emit('update-description', newDescription) - showSuccess(this.$t('calendar', 'Successfully added Talk room link to description.')) + showSuccess(this.$t('calendar', 'Successfully added Talk conversation link to description.')) } + this.closeModal() } catch (error) { console.error('Error creating Talk room:', error) - showError(this.$t('calendar', 'Error creating Talk room.')) + showError(this.$t('calendar', 'Error creating Talk conversation')) } finally { this.creatingTalkRoom = false } @@ -238,6 +239,7 @@ export default { padding: 16px; text-align: right; display: flex; + background-color: var(--color-main-background); } .talk_new-room { margin-right: auto; diff --git a/src/services/talkService.js b/src/services/talkService.js index eed7a85b9..cdee5c28e 100644 --- a/src/services/talkService.js +++ b/src/services/talkService.js @@ -24,7 +24,7 @@ export async function createTalkRoom(eventTitle = null, eventDescription = null, try { const response = await HTTPClient.post(generateOcsUrl('apps/spreed/api/' + apiVersion + '/', 2) + 'room', { roomType: 3, - roomName: eventTitle || t('calendar', 'Chat room for event'), + roomName: eventTitle || t('calendar', 'Talk conversation for event'), }) const conversation = response.data.ocs.data diff --git a/src/views/EditSidebar.vue b/src/views/EditSidebar.vue index e152299a7..50645fbdf 100644 --- a/src/views/EditSidebar.vue +++ b/src/views/EditSidebar.vue @@ -87,7 +87,7 @@