@@ -12,7 +12,6 @@ import { ConvoHub } from '../../session/conversations/ConversationController';
12
12
import { PubKey } from '../../session/types' ;
13
13
import { ToastUtils } from '../../session/utils' ;
14
14
import { BanType , updateBanOrUnbanUserModal } from '../../state/ducks/modalDialog' ;
15
- import { Flex } from '../basic/Flex' ;
16
15
import { SessionButton , SessionButtonColor , SessionButtonType } from '../basic/SessionButton' ;
17
16
import { SessionSpinner } from '../loading' ;
18
17
import {
@@ -22,8 +21,8 @@ import {
22
21
} from '../SessionWrapperModal' ;
23
22
import { localize } from '../../localization/localeTools' ;
24
23
import { SimpleSessionInput } from '../inputs/SessionInput' ;
25
- import { SpacerSM } from '../basic/Text' ;
26
24
import { ModalDescription } from './shared/ModalDescriptionContainer' ;
25
+ import { ModalFlexContainer } from './shared/ModalFlexContainer' ;
27
26
28
27
async function banOrUnBanUserCall (
29
28
convo : ConversationModel ,
@@ -133,6 +132,7 @@ export const BanOrUnBanUserDialog = (props: {
133
132
onClick = { banOrUnBanUser }
134
133
text = { buttonText }
135
134
disabled = { inProgress }
135
+ buttonColor = { isBan && ! hasPubkeyOnLoad ? SessionButtonColor . Danger : undefined }
136
136
dataTestId = { isBan ? 'ban-user-confirm-button' : 'unban-user-confirm-button' }
137
137
/>
138
138
{ /*
@@ -162,27 +162,27 @@ export const BanOrUnBanUserDialog = (props: {
162
162
</ ModalActionsContainer >
163
163
}
164
164
>
165
- < Flex $container = { true } $flexDirection = "column" $alignItems = "center" width = "100%" >
165
+ < ModalFlexContainer >
166
166
< ModalDescription
167
167
dataTestId = "modal-description"
168
168
localizerProps = { { token : isBan ? 'banUserDescription' : 'banUnbanUserDescription' } }
169
169
/>
170
+
170
171
< SimpleSessionInput
171
172
inputRef = { inputRef }
172
173
placeholder = { localize ( 'accountId' ) . toString ( ) }
173
174
onValueChanged = { setInputBoxValue }
174
175
disabled = { inProgress || ! ! pubkey }
175
176
value = { pubkey ? inputTextToDisplay : inputBoxValue }
176
177
errorDataTestId = "error-message"
178
+ padding = "var(--margins-sm) var(--margins-md)"
177
179
providedError = { '' }
178
180
// don't do anything on enter as we don't know if the user wants to ban or ban-delete-all
179
181
onEnterPressed = { ( ) => { } }
180
182
inputDataTestId = { isBan ? 'ban-user-input' : 'unban-user-input' }
181
183
/>
182
-
183
184
< SessionSpinner loading = { inProgress } />
184
- < SpacerSM />
185
- </ Flex >
185
+ </ ModalFlexContainer >
186
186
</ SessionWrapperModal >
187
187
) ;
188
188
} ;
0 commit comments