Skip to content

Commit

Permalink
fix: remove container prop in NcModal and related components
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <[email protected]>
  • Loading branch information
Antreesy authored and backportbot[bot] committed Sep 25, 2024
1 parent 39650dc commit 6a43eeb
Show file tree
Hide file tree
Showing 20 changed files with 8 additions and 112 deletions.
7 changes: 1 addition & 6 deletions src/components/BreakoutRoomsEditor/BreakoutRoomsEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
-->

<template>
<NcModal :container="container"
:class="{'modal-mask__participants-step': isEditingParticipants}"
<NcModal :class="{'modal-mask__participants-step': isEditingParticipants}"
:label-id="dialogHeaderId"
v-on="$listeners">
<div class="breakout-rooms-editor"
Expand Down Expand Up @@ -130,10 +129,6 @@ export default {
},
computed: {
container() {
return this.$store.getters.getMainContainerSelector()
},
modalTitle() {
return this.isEditingParticipants
? t('spreed', 'Assign participants to rooms')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
:aria-label="t('spreed', 'Conversation settings')"
:name="t('spreed', 'Conversation settings')"
:open.sync="showSettings"
:show-navigation="true"
:container="container">
show-navigation>
<NcAppSettingsSection id="basic-info"
:name="t('spreed', 'Basic Info')">
<BasicInfo :conversation="conversation"
Expand Down Expand Up @@ -161,10 +160,6 @@ export default {
},
computed: {
container() {
return this.$store.getters.getMainContainerSelector()
},
canUserEnableSIP() {
return this.conversation.canEnableSIP
},
Expand Down
7 changes: 1 addition & 6 deletions src/components/GuestWelcomeWindow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
-->

<template>
<NcModal :container="container"
:can-close="false"
<NcModal :can-close="false"
:close-on-click-outside="false"
:label-id="dialogHeaderId"
size="small">
Expand Down Expand Up @@ -100,10 +99,6 @@ export default {
},
computed: {
container() {
return this.$store.getters.getMainContainerSelector()
},
conversation() {
return this.$store.getters.conversation(this.token)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<NcDialog :open="modal"
:name="t('spreed', 'Call a phone number')"
class="call-phone"
:container="container"
size="normal"
close-on-click-outside
@update:open="closeModal">
Expand Down Expand Up @@ -81,12 +80,6 @@ export default {
}
},
computed: {
container() {
return this.$store.getters.getMainContainerSelector()
},
},
expose: ['showModal'],
watch: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@
<template v-if="isDialogOpen" #extra>
<NcDialog :open.sync="isDialogOpen"
:name="t('spreed','Delete conversation')"
:message="dialogMessage"
:container="container">
:message="dialogMessage">
<template #actions>
<NcButton type="tertiary" @click="isDialogOpen = false">
{{ t('spreed', 'No') }}
Expand Down Expand Up @@ -208,10 +207,6 @@ export default {
},
computed: {
container() {
return this.$store.getters.getMainContainerSelector()
},
canFavorite() {
return this.item.participantType !== PARTICIPANT.TYPE.USER_SELF_JOINED
},
Expand Down
5 changes: 0 additions & 5 deletions src/components/LeftSidebar/InvitationHandler.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<template>
<NcDialog :open.sync="modal"
:name="t('spreed', 'Pending invitations')"
:container="container"
size="normal"
close-on-click-outside>
<div class="inbox">
Expand Down Expand Up @@ -115,10 +114,6 @@ export default {
},
computed: {
container() {
return this.$store.getters.getMainContainerSelector()
},
invitations() {
const invitations = {}
for (const id in this.federationStore.pendingShares) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

<template>
<RoomSelector v-if="modal"
:container="container"
list-open-conversations
show-postable-only
:dialog-title="dialogTitle"
Expand Down Expand Up @@ -39,10 +38,6 @@ export default {
},
computed: {
container() {
return this.$store.getters.getMainContainerSelector()
},
dialogTitle() {
return t('spreed', 'Join open conversations')
},
Expand Down
5 changes: 0 additions & 5 deletions src/components/MediaSettings/MediaSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

<template>
<NcModal v-if="modal"
:container="container"
:label-id="dialogHeaderId"
@close="closeModal">
<div class="media-settings">
Expand Down Expand Up @@ -331,10 +330,6 @@ export default {
},
computed: {
container() {
return this.$store.getters.getMainContainerSelector()
},
displayName() {
return this.$store.getters.getDisplayName()
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<!-- First step of the flow: selection of the room to which forward the
message to -->
<RoomSelector v-if="!showForwardedConfirmation"
:container="container"
show-postable-only
:dialog-title="dialogTitle"
:dialog-subtitle="dialogSubtitle"
Expand All @@ -20,7 +19,6 @@
message has been forwarded -->
<NcDialog v-else
:name="dialogTitle"
:container="container"
close-on-click-outside
@update:open="handleClose">
<NcEmptyContent :description="t('spreed', 'The message has been forwarded to {selectedConversationName}', { selectedConversationName })">
Expand Down Expand Up @@ -96,10 +94,6 @@ export default {
},
computed: {
container() {
return this.$store.getters.getMainContainerSelector()
},
dialogTitle() {
return t('spreed', 'Forward message')
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
class="translate-dialog"
:name="t('spreed', 'Translate message')"
size="large"
:container="container"
close-on-click-outside
@update:open="$emit('close')">
<template v-if="isMounted" #default>
Expand Down Expand Up @@ -119,10 +118,6 @@ export default {
},
computed: {
container() {
return this.$store.getters.getMainContainerSelector()
},
userLanguage() {
return navigator.language.substring(0, 2)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

<template>
<NcDialog :name="t('spreed', 'Reactions')"
:container="container"
close-on-click-outside
@update:open="closeModal">
<div class="reactions__modal">
Expand Down Expand Up @@ -104,10 +103,6 @@ export default {
},

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

reactionsOverview() {
const mergedReactionsMap = {}
const modifiedDetailedReactions = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<NcModal v-show="page !== 2"
class="new-group-conversation"
:close-on-click-outside="!isFilled"
:container="container"
:label-id="dialogHeaderPrepId"
@close="closeModal">
<h2 :id="dialogHeaderPrepId" class="new-group-conversation__header nc-dialog-alike-header">
Expand Down Expand Up @@ -69,7 +68,6 @@

<!-- Third page : this is the confirmation page-->
<NcModal v-if="page === 2"
:container="container"
:label-id="dialogHeaderResId"
@close="closeModal">
<NcEmptyContent>
Expand Down Expand Up @@ -192,10 +190,6 @@ export default {
},
computed: {
container() {
return this.$store.getters.getMainContainerSelector()
},
isPublic() {
return this.newConversation.type === CONVERSATION.TYPE.PUBLIC
},
Expand Down
5 changes: 0 additions & 5 deletions src/components/NewMessage/NewMessagePollEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<template>
<NcDialog :name="t('spreed', 'Create new poll')"
:close-on-click-outside="!isFilled"
:container="container"
v-on="$listeners"
@update:open="dismissEditor">
<!-- Poll Question -->
Expand Down Expand Up @@ -118,10 +117,6 @@ export default {
},
computed: {
container() {
return this.$store.getters.getMainContainerSelector()
},
isFilled() {
return !!this.pollQuestion || this.pollOptions.some(option => option)
},
Expand Down
8 changes: 2 additions & 6 deletions src/components/PermissionsEditor/PermissionsEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<template>
<NcModal size="small"
:container="container"
:container="nestedContainer"
:label-id="dialogHeaderId"
v-on="$listeners">
<div class="wrapper">
Expand Down Expand Up @@ -101,7 +101,7 @@ export default {
nestedContainer: {
type: String,
default: null,
default: undefined,
},
/**
Expand Down Expand Up @@ -151,10 +151,6 @@ export default {
},
computed: {
container() {
return this.nestedContainer ?? this.$store.getters.getMainContainerSelector()
},
modalTitle() {
if (this.displayName) {
return t('spreed', 'In this conversation <strong>{user}</strong> can:', {
Expand Down
5 changes: 0 additions & 5 deletions src/components/PollViewer/PollViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<template>
<NcModal v-if="id"
size="small"
:container="container"
:label-id="dialogHeaderId"
@close="dismissModal">
<div v-if="poll" class="poll-modal">
Expand Down Expand Up @@ -161,10 +160,6 @@ export default {
return this.activePoll?.token
},
container() {
return this.$store.getters.getMainContainerSelector()
},
poll() {
return this.pollsStore.getPoll(this.token, this.id)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@

<!-- Participants editor -->
<NcModal v-if="showParticipantsEditor"
:container="container"
:label-id="dialogHeaderId"
@close="closeParticipantsEditor">
<div class="breakout-rooms-actions__editor">
Expand Down Expand Up @@ -216,10 +215,6 @@ export default {
return this.mainToken !== this.$store.getters.getToken()
},
container() {
return this.$store.getters.getMainContainerSelector()
},
manageBreakoutRoomsTitle() {
return t('spreed', 'Manage breakout rooms')
},
Expand Down
7 changes: 1 addition & 6 deletions src/components/RightSidebar/Participants/Participant.vue
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,7 @@
<!-- Confirmation required to remove participant -->
<NcDialog v-if="isRemoveDialogOpen"
:open.sync="isRemoveDialogOpen"
:name="removeParticipantLabel"
:container="container">
:name="removeParticipantLabel">
<p> {{ removeDialogMessage }} </p>
<template v-if="showBanOption">
<NcCheckboxRadioSwitch :checked.sync="isBanParticipant">
Expand Down Expand Up @@ -434,10 +433,6 @@ export default {
},
computed: {
container() {
return this.$store.getters.getMainContainerSelector()
},
participantNavigationId() {
return this.participant.actorType + '_' + this.participant.actorId
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

<template>
<NcModal size="large"
:container="container"
:label-id="dialogHeaderId"
v-on="$listeners">
<div class="shared-items-browser">
Expand Down Expand Up @@ -97,10 +96,6 @@ export default {
scroller() {
return this.$refs.scroller
},
container() {
return this.$store.getters.getMainContainerSelector()
},
},
watch: {
Expand Down
6 changes: 0 additions & 6 deletions src/components/RoomSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

<template>
<NcDialog :name="dialogTitle"
:container="container"
close-on-click-outside
@update:open="close">
<template #default>
Expand Down Expand Up @@ -80,11 +79,6 @@ export default {
},
props: {
container: {
type: String,
default: undefined,
},
dialogTitle: {
type: String,
default: t('spreed', 'Link to a conversation'),
Expand Down
Loading

0 comments on commit 6a43eeb

Please sign in to comment.