Skip to content

Commit

Permalink
fix(modal): mount nested modals inside global modals
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 DorraJaouad committed Apr 2, 2024
1 parent 289284f commit 3a13ce6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
:conversation-name="conversationName"
:permissions="conversationPermissions"
:loading="loading"
nested-container=".conversation-permissions-editor"
@close="handleClosePermissionsEditor"
@submit="handleSubmitPermissions" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</template>
</NcButton>
<NcModal v-if="logModal"
:container="container"
container=".matterbridge-settings"
@close="closeLogModal">
<div class="modal__content">
<textarea v-model="processLog" class="log-content" />
Expand All @@ -82,7 +82,7 @@
:type="types[part.type]"
:editing="part.editing"
:editable="!enabled"
:container="container"
container=".matterbridge-settings"
@edit-clicked="onEditClicked(i)"
@delete-part="onDelete(i)" />
</li>
Expand Down
11 changes: 10 additions & 1 deletion src/components/PermissionsEditor/PermissionsEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ export default {
default: '',
},

nestedContainer: {
type: String,
default: null,
},

/**
* The conversation's name. Don't provide this when modifying
* participants' permissions.
Expand Down Expand Up @@ -148,7 +153,7 @@ export default {

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

modalTitle() {
Expand Down Expand Up @@ -262,4 +267,8 @@ export default {
margin: 0 auto;
}

// TODO remove after https://github.com/nextcloud-libraries/nextcloud-vue/issues/5228
:deep(.modal-wrapper--small .modal-container) {
width: 400px !important;
}
</style>

0 comments on commit 3a13ce6

Please sign in to comment.