diff options
author | Takeshi Umeda <noel.yoshiba@gmail.com> | 2021-08-06 19:14:13 +0900 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2021-08-09 23:45:58 +0200 |
commit | 8681ef85d0728b9d34dc62785fab6fcec30ba95c (patch) | |
tree | f048b304f0d4f0f49e51c2edb8b74ccae6ac89e6 /app/javascript/flavours/glitch/features/ui/components | |
parent | 8d55cb7d711723fe2a35377ee2443cb11de11cc3 (diff) |
[Glitch] Fix logout link not working in safari
Port b2875b1864d5bd72e6902ffc842d1be6818c210e to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/ui/components')
-rw-r--r-- | app/javascript/flavours/glitch/features/ui/components/confirmation_modal.js | 9 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/features/ui/components/link_footer.js | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/components/confirmation_modal.js b/app/javascript/flavours/glitch/features/ui/components/confirmation_modal.js index 47a49c0c7..a665b9fb1 100644 --- a/app/javascript/flavours/glitch/features/ui/components/confirmation_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/confirmation_modal.js @@ -13,16 +13,23 @@ class ConfirmationModal extends React.PureComponent { onConfirm: PropTypes.func.isRequired, secondary: PropTypes.string, onSecondary: PropTypes.func, + closeWhenConfirm: PropTypes.bool, onDoNotAsk: PropTypes.func, intl: PropTypes.object.isRequired, }; + static defaultProps = { + closeWhenConfirm: true, + }; + componentDidMount() { this.button.focus(); } handleClick = () => { - this.props.onClose(); + if (this.props.closeWhenConfirm) { + this.props.onClose(); + } this.props.onConfirm(); if (this.props.onDoNotAsk && this.doNotAskCheckbox.checked) { this.props.onDoNotAsk(); diff --git a/app/javascript/flavours/glitch/features/ui/components/link_footer.js b/app/javascript/flavours/glitch/features/ui/components/link_footer.js index 40ef506cc..722b47140 100644 --- a/app/javascript/flavours/glitch/features/ui/components/link_footer.js +++ b/app/javascript/flavours/glitch/features/ui/components/link_footer.js @@ -18,6 +18,7 @@ const mapDispatchToProps = (dispatch, { intl }) => ({ dispatch(openModal('CONFIRM', { message: intl.formatMessage(messages.logoutMessage), confirm: intl.formatMessage(messages.logoutConfirm), + closeWhenConfirm: false, onConfirm: () => logOut(), })); }, |