diff --git a/src/App.js b/src/App.js index 0cd4c19..8203c21 100644 --- a/src/App.js +++ b/src/App.js @@ -81,6 +81,13 @@ class App extends React.Component { }); this.openCanvas(); } + recents[keys[i]].delete = () => { + let rArray = localStorage.getItem('recentDocs'); + rArray = rArray ? JSON.parse(rArray) : {} + delete rArray[keys[i]]; + localStorage.setItem('recentDocs', JSON.stringify(rArray)); + this.setState({ recentDocs: rArray }); + } } return recents; } diff --git a/src/intro/CreateNew.js b/src/intro/CreateNew.js index 53a5e75..a9fa6b7 100644 --- a/src/intro/CreateNew.js +++ b/src/intro/CreateNew.js @@ -114,23 +114,27 @@ class CreateNew extends React.Component {

Premises

- - + + + + {premises.map((formula,i) => this.getFormulaCell(formula, i))} + + - - {premises.map((formula,i) => this.getFormulaCell(formula, i))} - - - + +
- Formula +
+ Formula + TeX notationEG notation +
this.setState({ premises: premises.concat(['']) }) }> + Add New Premise TeX notationEG notation -
this.setState({ premises: premises.concat(['']) }) }> - Add New Premise - -
+

Conclusion

- {this.getFormulaCell(conclusion)} + + {this.getFormulaCell(conclusion)} +
); diff --git a/src/intro/IntroWindow.js b/src/intro/IntroWindow.js index 5b11066..ab6a416 100644 --- a/src/intro/IntroWindow.js +++ b/src/intro/IntroWindow.js @@ -15,8 +15,14 @@ const IntroContent = ({ recentDocs }) => (

Recent Proofs

{Object.keys(recentDocs).map(name => ( -
recentDocs[name].open()}> - {name} +
+ recentDocs[name].open()}> + {name} + + recentDocs[name].delete()} + >Delete
))}