-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Extracted dialogs from CorrectionView
- Loading branch information
1 parent
1ba95d1
commit d6d8150
Showing
4 changed files
with
46 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const OpenExportModalDialog = (onExport) => { | ||
return { | ||
title: 'Export Corrections?', | ||
text: `Seems like you are finished with the correction. Would you like to export the corrections?`, | ||
onConfirm: () => { | ||
onExport(); | ||
}, | ||
}; | ||
}; | ||
|
||
export default OpenExportModalDialog; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const SkipUnreadFilesDialog = (onNext) => { | ||
return { | ||
title: 'Skip unread files?', | ||
text: `There are still unread files for this submission. Are you sure you want to go to the next submission?`, | ||
onConfirm: () => { | ||
onNext(true); | ||
}, | ||
}; | ||
}; | ||
|
||
export default SkipUnreadFilesDialog; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { saveCorrectionToWorkspace } from '../utils/FileAccess'; | ||
|
||
const AutosaveCorrectionEffect = (autosave, corr, workspace) => { | ||
return () => { | ||
return () => { | ||
if (corr && autosave) { | ||
saveCorrectionToWorkspace(corr, workspace); | ||
} | ||
}; | ||
}; | ||
}; | ||
|
||
export default AutosaveCorrectionEffect; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters