diff --git a/stylesheets/_modal.scss b/stylesheets/_modal.scss
index 5e5c0709c..8b2d9f1dc 100644
--- a/stylesheets/_modal.scss
+++ b/stylesheets/_modal.scss
@@ -1,9 +1,9 @@
.modal {
- position: fixed;
+ position: absolute;
top: 0;
left: 0;
- height: 100%;
- width: 100%;
+ height: 100vh;
+ width: 100vw;
background-color: rgba(0, 0, 0, 0.3);
padding: 0 20px;
z-index: 100;
diff --git a/ts/components/conversation/ModeratorsAddDialog.tsx b/ts/components/conversation/ModeratorsAddDialog.tsx
index dcb1076ef..21c80924b 100644
--- a/ts/components/conversation/ModeratorsAddDialog.tsx
+++ b/ts/components/conversation/ModeratorsAddDialog.tsx
@@ -9,6 +9,7 @@ import { Flex } from '../basic/Flex';
import { ConversationModel } from '../../models/conversation';
import { ApiV2 } from '../../opengroup/opengroupV2';
import { processDecrypted } from '../../receiver/dataMessage';
+import { SessionWrapperModal } from '../session/SessionWrapperModal';
interface Props {
convo: ConversationModel;
onClose: any;
@@ -146,12 +147,14 @@ export const AddModeratorsDialog = (props: any) => {
let channelAPI: any;
useEffect(() => {
- async function getPublicSendData {
+ async function getPublicSendData () {
if (props.convo.isOpenGroupV1()) {
channelAPI = await convo.getPublicSendData();
}
setFirstLoading(false);
}
+
+ getPublicSendData();
}, [])
@@ -160,7 +163,7 @@ export const AddModeratorsDialog = (props: any) => {
// if we don't have valid data entered by the user
const pubkey = PubKey.from(inputBoxValue);
if (!pubkey) {
- window.log.info('invalid pubkey for adding as moderator:', this.state.inputBoxValue);
+ window.log.info('invalid pubkey for adding as moderator:', inputBoxValue);
ToastUtils.pushInvalidPubKey();
return;
}
@@ -211,7 +214,7 @@ export const AddModeratorsDialog = (props: any) => {
return (
- onClose()} theme={theme}>
+ onClose()} theme={theme}>
{renderContent && (
<>
@@ -236,7 +239,7 @@ export const AddModeratorsDialog = (props: any) => {
)}
-
+
);
}
diff --git a/ts/components/conversation/ModeratorsRemoveDialog.tsx b/ts/components/conversation/ModeratorsRemoveDialog.tsx
index 6e982650c..b86df6f6a 100644
--- a/ts/components/conversation/ModeratorsRemoveDialog.tsx
+++ b/ts/components/conversation/ModeratorsRemoveDialog.tsx
@@ -11,6 +11,7 @@ import { ContactType, SessionMemberListItem } from '../session/SessionMemberList
import { SessionModal } from '../session/SessionModal';
import { SessionSpinner } from '../session/SessionSpinner';
import _ from 'lodash';
+import { SessionWrapperModal } from '../session/SessionWrapperModal';
interface Props {
convo: ConversationModel;
onClose: any;
@@ -60,7 +61,7 @@ export class RemoveModeratorsDialog extends React.Component {
const renderContent = !firstLoading;
return (
-
+
{renderContent && (
<>
@@ -91,7 +92,7 @@ export class RemoveModeratorsDialog extends React.Component {
-
+
);
}
diff --git a/ts/components/session/ActionsPanel.tsx b/ts/components/session/ActionsPanel.tsx
index 3f9c856e8..cd6863b2f 100644
--- a/ts/components/session/ActionsPanel.tsx
+++ b/ts/components/session/ActionsPanel.tsx
@@ -33,12 +33,9 @@ import { OpenGroupManagerV2 } from '../../opengroup/opengroupV2/OpenGroupManager
import { loadDefaultRooms } from '../../opengroup/opengroupV2/ApiUtil';
import { forceRefreshRandomSnodePool } from '../../session/snode_api/snodePool';
import { SwarmPolling } from '../../session/snode_api/swarmPolling';
-import _, { divide } from 'lodash';
import { ActionPanelOnionStatusLight, OnionPathModal } from '../OnionStatusDialog';
import { EditProfileDialog } from '../EditProfileDialog';
import { StateType } from '../../state/reducer';
-import { updateConfirmModal } from "../../state/ducks/modalDialog";
-import { useInView } from 'react-intersection-observer';
import { SessionConfirm } from './SessionConfirm';
// tslint:disable-next-line: no-import-side-effect no-submodule-imports
diff --git a/ts/components/session/conversation/SessionConversation.tsx b/ts/components/session/conversation/SessionConversation.tsx
index 48053eb5e..3ec085910 100644
--- a/ts/components/session/conversation/SessionConversation.tsx
+++ b/ts/components/session/conversation/SessionConversation.tsx
@@ -34,6 +34,8 @@ import { getDecryptedMediaUrl } from '../../../session/crypto/DecryptedAttachmen
import { deleteOpenGroupMessages } from '../../../interactions/conversation';
import { ConversationTypeEnum } from '../../../models/conversation';
import { SessionButtonColor } from '../SessionButton';
+import { AddModeratorsDialog } from '../../conversation/ModeratorsAddDialog';
+import { RemoveModeratorsDialog } from '../../conversation/ModeratorsRemoveDialog';
@@ -68,6 +70,8 @@ interface State {
// lightbox options
lightBoxOptions?: any;
+
+ modal: JSX.Element | null;
}
interface Props {
@@ -102,6 +106,7 @@ export class SessionConversation extends React.Component {
showOptionsPane: false,
stagedAttachments: [],
isDraggingFile: false,
+ modal: null
};
this.compositionBoxRef = React.createRef();
this.messageContainerRef = React.createRef();
@@ -291,6 +296,7 @@ export class SessionConversation extends React.Component {
/>
+ { this.state.modal ? this.state.modal : null}
@@ -514,11 +520,29 @@ export class SessionConversation extends React.Component {
window.Whisper.events.trigger('leaveClosedGroup', conversation);
},
onAddModerators: () => {
- window.Whisper.events.trigger('addModerators', conversation);
+ // window.Whisper.events.trigger('addModerators', conversation);
+ this.setState({
+ ...this.state,
+ modal: (
+ this.setState({ ...this.state, modal: null })}
+ theme={this.props.theme}
+ >)
+ })
},
onRemoveModerators: () => {
- window.Whisper.events.trigger('removeModerators', conversation);
+ // window.Whisper.events.trigger('removeModerators', conversation);
+ this.setState({
+ ...this.state,
+ modal: (
+ this.setState({ ...this.state, modal: null })}
+ theme={this.props.theme}
+ >)
+ })
},
onShowLightBox: (lightBoxOptions = {}) => {
this.setState({ lightBoxOptions });
diff --git a/ts/components/session/conversation/SessionRightPanel.tsx b/ts/components/session/conversation/SessionRightPanel.tsx
index 3530ae30a..8b30a5235 100644
--- a/ts/components/session/conversation/SessionRightPanel.tsx
+++ b/ts/components/session/conversation/SessionRightPanel.tsx
@@ -235,10 +235,10 @@ class SessionRightPanel extends React.Component {
const leaveGroupString = isPublic
? window.i18n('leaveGroup')
: isKickedFromGroup
- ? window.i18n('youGotKickedFromGroup')
- : left
- ? window.i18n('youLeftTheGroup')
- : window.i18n('leaveGroup');
+ ? window.i18n('youGotKickedFromGroup')
+ : left
+ ? window.i18n('youLeftTheGroup')
+ : window.i18n('leaveGroup');
const disappearingMessagesOptions = timerOptions.map(option => {
return {