fix(client): open completionModal on shortcut (#42685)
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
36ad0dbcc5
commit
de2f4e2843
@ -311,7 +311,7 @@ const Editor = (props: PropTypes): JSX.Element => {
|
|||||||
/* eslint-disable no-bitwise */
|
/* eslint-disable no-bitwise */
|
||||||
keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.Enter],
|
keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.Enter],
|
||||||
// TODO: Discuss with Ahmad what should pop-up when a challenge is completed
|
// TODO: Discuss with Ahmad what should pop-up when a challenge is completed
|
||||||
run: () => props.executeChallenge()
|
run: () => props.executeChallenge(true)
|
||||||
});
|
});
|
||||||
editor.addAction({
|
editor.addAction({
|
||||||
id: 'leave-editor',
|
id: 'leave-editor',
|
||||||
|
@ -44,6 +44,9 @@ function ToolPanel({
|
|||||||
guideUrl,
|
guideUrl,
|
||||||
videoUrl
|
videoUrl
|
||||||
}) {
|
}) {
|
||||||
|
const handleRunTests = () => {
|
||||||
|
executeChallenge(true);
|
||||||
|
};
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
@ -52,7 +55,7 @@ function ToolPanel({
|
|||||||
isMobile ? 'tool-panel-group-mobile' : ''
|
isMobile ? 'tool-panel-group-mobile' : ''
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<Button block={true} bsStyle='primary' onClick={executeChallenge}>
|
<Button block={true} bsStyle='primary' onClick={handleRunTests}>
|
||||||
{isMobile ? t('buttons.run') : t('buttons.run-test')}
|
{isMobile ? t('buttons.run') : t('buttons.run-test')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
|
Reference in New Issue
Block a user