move confirm action on right on all dialogs

pull/2116/head
Audric Ackermann 4 years ago
parent e33b6eadc4
commit 18e13b9b98
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -108,17 +108,16 @@ export const SessionWrapperModal = (props: SessionWrapperModalType) => {
{props.children} {props.children}
<div className="session-modal__button-group"> <div className="session-modal__button-group">
{onConfirm ? (
<SessionButton onClick={props.onConfirm}>
{confirmText || window.i18n('ok')}
</SessionButton>
) : null}
{onClose && showClose ? ( {onClose && showClose ? (
<SessionButton onClick={props.onClose}> <SessionButton onClick={props.onClose}>
{cancelText || window.i18n('close')} {cancelText || window.i18n('close')}
</SessionButton> </SessionButton>
) : null} ) : null}
{onConfirm ? (
<SessionButton onClick={props.onConfirm}>
{confirmText || window.i18n('ok')}
</SessionButton>
) : null}
</div> </div>
</div> </div>
</div> </div>

@ -37,8 +37,8 @@ export const AdminLeaveClosedGroupDialog = (props: Props) => {
<p>{warningAsAdmin}</p> <p>{warningAsAdmin}</p>
<div className="session-modal__button-group"> <div className="session-modal__button-group">
<SessionButton text={okText} onClick={onClickOK} buttonColor={SessionButtonColor.Danger} />
<SessionButton text={cancelText} onClick={closeDialog} /> <SessionButton text={cancelText} onClick={closeDialog} />
<SessionButton text={okText} onClick={onClickOK} buttonColor={SessionButtonColor.Danger} />
</div> </div>
</SessionWrapperModal> </SessionWrapperModal>
); );

@ -70,12 +70,12 @@ export const SessionNicknameDialog = (props: Props) => {
/> />
<div className="session-modal__button-group"> <div className="session-modal__button-group">
<SessionButton text={window.i18n('cancel')} onClick={onClickClose} />
<SessionButton <SessionButton
text={window.i18n('ok')} text={window.i18n('ok')}
onClick={saveNickname} onClick={saveNickname}
buttonColor={SessionButtonColor.Green} buttonColor={SessionButtonColor.Green}
/> />
<SessionButton text={window.i18n('cancel')} onClick={onClickClose} />
</div> </div>
</SessionWrapperModal> </SessionWrapperModal>
); );

@ -104,13 +104,12 @@ export class SessionPasswordDialog extends React.Component<Props, State> {
{this.showError()} {this.showError()}
<div className="session-modal__button-group"> <div className="session-modal__button-group">
<SessionButton text={window.i18n('cancel')} onClick={this.closeDialog} />
<SessionButton <SessionButton
text={window.i18n('ok')} text={window.i18n('ok')}
buttonColor={confirmButtonColor} buttonColor={confirmButtonColor}
onClick={this.setPassword} onClick={this.setPassword}
/> />
<SessionButton text={window.i18n('cancel')} onClick={this.closeDialog} />
</div> </div>
</SessionWrapperModal> </SessionWrapperModal>
); );

@ -71,9 +71,8 @@ const Password = (props: PasswordProps) => {
<SpacerLG /> <SpacerLG />
<div className="session-modal__button-group"> <div className="session-modal__button-group">
<SessionButton text={i18n('ok')} onClick={confirmPassword} />
<SessionButton text={i18n('cancel')} onClick={onClose} /> <SessionButton text={i18n('cancel')} onClick={onClose} />
<SessionButton text={i18n('ok')} onClick={confirmPassword} />
</div> </div>
</> </>
); );

Loading…
Cancel
Save