license import { Button , Classes , Dialog , Intent } from "@blueprintjs/core" ; import React from "react" ; interface Props { resolveGitHub ( ) : void ; resolveLocalStorage ( ) : void ; } /**
 * This is shown when you load a song that was loaded dirty and has been edited elsewhere.
 */ export default class ModalConflict extends React . PureComponent < Props > { render ( ) { return ( < Dialog isOpen = { true } title = "Keep unsaved changes?" icon = "git-merge" > < div className = { Classes . DIALOG_BODY } > < p style = { { marginTop : 0 } } > < strong > This song was edited outside of this browser . < /strong> You can either keep the unsaved version from this browser , or revert to the saved version . < /p> < p > < strong > Tip : < /strong> Next time, save songs before closing Hacklily . < /p> < /div> < div className = { Classes . DIALOG_FOOTER } > < div className = { Classes . DIALOG_FOOTER_ACTIONS } > < Button onClick = { this . props . resolveLocalStorage } intent = { Intent . WARNING } > Keep unsaved version < /Button> < Button onClick = { this . props . resolveGitHub } intent = { Intent . DANGER } > Revert to saved version < /Button> < /div> < /div> < /Dialog>); } }