Browse Source

Merge pull request #11939 from nextcloud/fix/noid/filepicker-container

fix(FilePicker): provide correct container for FilePicker
pull/11941/head
Maksim Sukharev 2 years ago
committed by GitHub
parent
commit
62596a9c3e
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 10
      src/components/ConversationSettings/ConversationAvatarEditor.vue
  2. 3
      src/components/MediaSettings/MediaSettings.vue
  3. 6
      src/components/MediaSettings/VideoBackgroundEditor.vue
  4. 19
      src/components/SettingsDialog/SettingsDialog.vue

10
src/components/ConversationSettings/ConversationAvatarEditor.vue

@ -44,7 +44,7 @@
<div class="avatar__buttons"> <div class="avatar__buttons">
<!-- Set emoji as avatar --> <!-- Set emoji as avatar -->
<template v-if="!showCropper"> <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')" <NcButton :title="t('spreed', 'Set emoji as conversation picture')"
:aria-label="t('spreed', 'Set emoji as conversation picture')"> :aria-label="t('spreed', 'Set emoji as conversation picture')">
<template #icon> <template #icon>
@ -52,7 +52,7 @@
</template> </template>
</NcButton> </NcButton>
</NcEmojiPicker> </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')" <NcButton :title="t('spreed', 'Set background color for conversation picture')"
:aria-label="t('spreed', 'Set background color for conversation picture')"> :aria-label="t('spreed', 'Set background color for conversation picture')">
<template #icon> <template #icon>
@ -111,7 +111,7 @@
<FilePickerVue v-if="showFilePicker" <FilePickerVue v-if="showFilePicker"
:name="t('spreed', 'Choose your conversation picture')" :name="t('spreed', 'Choose your conversation picture')"
:container="container"
container="#vue-avatar-section"
:buttons="filePickerButtons" :buttons="filePickerButtons"
:multiselect="false" :multiselect="false"
:mimetype-filter="validMimeTypes" :mimetype-filter="validMimeTypes"
@ -217,10 +217,6 @@ export default {
}, },
computed: { computed: {
container() {
return this.$store.getters.getMainContainerSelector()
},
inputId() { inputId() {
return `account-property-${this.conversation.displayName}` return `account-property-${this.conversation.displayName}`
}, },

3
src/components/MediaSettings/MediaSettings.vue

@ -757,8 +757,7 @@ export default {
} }
} }
:deep(.modal-container) {
display: flex !important;
:deep(.modal-wrapper--normal > .modal-container) {
max-width: 500px !important; max-width: 500px !important;
} }
</style> </style>

6
src/components/MediaSettings/VideoBackgroundEditor.vue

@ -80,7 +80,7 @@
<FilePickerVue v-if="showFilePicker" <FilePickerVue v-if="showFilePicker"
:name="t('spreed', 'File to share')" :name="t('spreed', 'File to share')"
:path="relativeBackgroundsFolderPath" :path="relativeBackgroundsFolderPath"
:container="container"
container=".background-editor"
:buttons="filePickerButtons" :buttons="filePickerButtons"
:multiselect="false" :multiselect="false"
@close="showFilePicker = false" /> @close="showFilePicker = false" />
@ -154,10 +154,6 @@ export default {
}, },
computed: { computed: {
container() {
return this.$store.getters.getMainContainerSelector()
},
isCustomBackground() { isCustomBackground() {
return this.selectedBackground !== 'none' return this.selectedBackground !== 'none'
&& this.selectedBackground !== 'blur' && this.selectedBackground !== 'blur'

19
src/components/SettingsDialog/SettingsDialog.vue

@ -45,6 +45,15 @@
@click="showFilePicker = true"> @click="showFilePicker = true">
{{ t('spreed', 'Browse …') }} {{ t('spreed', 'Browse …') }}
</NcButton> </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> </div>
</NcAppSettingsSection> </NcAppSettingsSection>
<NcAppSettingsSection v-if="!isGuest" <NcAppSettingsSection v-if="!isGuest"
@ -166,16 +175,6 @@
</div> </div>
</dl> </dl>
</NcAppSettingsSection> </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> </NcAppSettingsDialog>
</template> </template>

Loading…
Cancel
Save