diff options
Diffstat (limited to 'src/components/ConversationSettings/BasicInfo.vue')
-rw-r--r-- | src/components/ConversationSettings/BasicInfo.vue | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/src/components/ConversationSettings/BasicInfo.vue b/src/components/ConversationSettings/BasicInfo.vue index 5c5531fe4..8a2d93465 100644 --- a/src/components/ConversationSettings/BasicInfo.vue +++ b/src/components/ConversationSettings/BasicInfo.vue @@ -32,17 +32,19 @@ :edit-button-aria-label="t('spreed', 'Edit conversation name')" @submit-text="handleUpdateName" @update:editing="handleEditName" /> - <h4 class="app-settings-section__subtitle"> - {{ t('spreed', 'Description') }} - </h4> - <EditableTextField :editable="canFullModerate" - :initial-text="description" - :editing="isEditingDescription" - :loading="isDescriptionLoading" - :edit-button-aria-label="t('spreed', 'Edit conversation description')" - :placeholder="t('spreed', 'Enter a description for this conversation')" - @submit-text="handleUpdateDescription" - @update:editing="handleEditDescription" /> + <template v-if="!isOneToOne"> + <h4 class="app-settings-section__subtitle"> + {{ t('spreed', 'Description') }} + </h4> + <EditableTextField :editable="canFullModerate" + :initial-text="description" + :editing="isEditingDescription" + :loading="isDescriptionLoading" + :edit-button-aria-label="t('spreed', 'Edit conversation description')" + :placeholder="t('spreed', 'Enter a description for this conversation')" + @submit-text="handleUpdateDescription" + @update:editing="handleEditDescription" /> + </template> <template v-if="supportsAvatar"> <h4 class="app-settings-section__subtitle"> {{ t('spreed', 'Picture') }} @@ -62,6 +64,8 @@ import { showError } from '@nextcloud/dialogs' import ConversationAvatarEditor from './ConversationAvatarEditor.vue' import EditableTextField from './EditableTextField.vue' +import { CONVERSATION } from '../../constants.js' + const supportsAvatar = getCapabilities()?.spreed?.features?.includes('avatar') export default { @@ -99,6 +103,11 @@ export default { }, computed: { + isOneToOne() { + return this.conversation.type === CONVERSATION.TYPE.ONE_TO_ONE + || this.conversation.type === CONVERSATION.TYPE.ONE_TO_ONE_FORMER + }, + conversationName() { return this.conversation.displayName }, |