Skip to content

Commit

Permalink
fix(FilePicker): provide correct container for FilePicker
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy authored and backportbot[bot] committed Mar 27, 2024
1 parent 5b00c6b commit a41f0cd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 24 deletions.
10 changes: 3 additions & 7 deletions src/components/ConversationSettings/ConversationAvatarEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@
<div class="avatar__buttons">
<!-- Set emoji as avatar -->
<template v-if="!showCropper">
<NcEmojiPicker :per-line="5" :container="container" @select="setEmoji">
<NcEmojiPicker :per-line="5" container="#vue-avatar-section" @select="setEmoji">
<NcButton :title="t('spreed', 'Set emoji as conversation picture')"
:aria-label="t('spreed', 'Set emoji as conversation picture')">
<template #icon>
<EmoticonOutline :size="20" />
</template>
</NcButton>
</NcEmojiPicker>
<NcColorPicker v-if="emojiAvatar" v-model="backgroundColor" :container="container">
<NcColorPicker v-if="emojiAvatar" v-model="backgroundColor" container="#vue-avatar-section">
<NcButton :title="t('spreed', 'Set background color for conversation picture')"
:aria-label="t('spreed', 'Set background color for conversation picture')">
<template #icon>
Expand Down Expand Up @@ -111,7 +111,7 @@

<FilePickerVue v-if="showFilePicker"
:name="t('spreed', 'Choose your conversation picture')"
:container="container"
container="#vue-avatar-section"
:buttons="filePickerButtons"
:multiselect="false"
:mimetype-filter="validMimeTypes"
Expand Down Expand Up @@ -216,10 +216,6 @@ export default {
},

computed: {
container() {
return this.$store.getters.getMainContainerSelector()
},

inputId() {
return `account-property-${this.conversation.displayName}`
},
Expand Down
3 changes: 1 addition & 2 deletions src/components/MediaSettings/MediaSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,7 @@ export default {
}
}

:deep(.modal-container) {
display: flex !important;
:deep(.modal-wrapper--normal > .modal-container) {
max-width: 500px !important;
}
</style>
6 changes: 1 addition & 5 deletions src/components/MediaSettings/VideoBackgroundEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<FilePickerVue v-if="showFilePicker"
:name="t('spreed', 'File to share')"
:path="relativeBackgroundsFolderPath"
:container="container"
container=".background-editor"
:buttons="filePickerButtons"
:multiselect="false"
@close="showFilePicker = false" />
Expand Down Expand Up @@ -154,10 +154,6 @@ export default {
},

computed: {
container() {
return this.$store.getters.getMainContainerSelector()
},

isCustomBackground() {
return this.selectedBackground !== 'none'
&& this.selectedBackground !== 'blur'
Expand Down
19 changes: 9 additions & 10 deletions src/components/SettingsDialog/SettingsDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@
@click="showFilePicker = true">
{{ t('spreed', 'Browse …') }}
</NcButton>
<FilePickerVue v-if="showFilePicker"
:name="t('spreed', 'Select location for attachments')"
:path="attachmentFolder"
container=".app-settings-section__wrapper"
:buttons="filePickerButtons"
:multiselect="false"
:mimetype-filter="['httpd/unix-directory']"
allow-pick-directory
@close="showFilePicker = false" />
</div>
</NcAppSettingsSection>
<NcAppSettingsSection v-if="!isGuest"
Expand Down Expand Up @@ -160,16 +169,6 @@
</div>
</dl>
</NcAppSettingsSection>

<FilePickerVue v-if="showFilePicker"
:name="t('spreed', 'Select location for attachments')"
:path="attachmentFolder"
:container="container"
:buttons="filePickerButtons"
:multiselect="false"
:mimetype-filter="['httpd/unix-directory']"
allow-pick-directory
@close="showFilePicker = false" />
</NcAppSettingsDialog>
</template>

Expand Down

0 comments on commit a41f0cd

Please sign in to comment.