diff --git a/webmaker/package.json b/webmaker/package.json index e24e33d..3e5abea 100644 --- a/webmaker/package.json +++ b/webmaker/package.json @@ -27,7 +27,9 @@ "preact-render-spy": "^1.2.1" }, "dependencies": { + "@emmetio/codemirror-plugin": "^0.5.4", "codemirror": "^5.37.0", + "esprima": "^4.0.0", "firebase": "^5.0.4", "preact": "^8.2.6", "preact-compat": "^3.17.0", diff --git a/webmaker/src/components/AskToImportModal.jsx b/webmaker/src/components/AskToImportModal.jsx new file mode 100644 index 0000000..cc1b212 --- /dev/null +++ b/webmaker/src/components/AskToImportModal.jsx @@ -0,0 +1,39 @@ +import { h, Component } from 'preact'; +import Modal from './Modal'; + +export default class AskToImportModal extends Component { + render() { + return ( + +

Import your creations in your account

+ +
+

+ You have {this.props.oldSavedCreationsCount} creations + saved in your local machine. Do you want to import those creations + in your account so they are more secure and accessible anywhere? +

+

+ It's okay if you don't want to. You can simply logout and access + them anytime on this browser. +

+
+ + +
+
+
+ ); + } +} diff --git a/webmaker/src/components/ContentWrap.jsx b/webmaker/src/components/ContentWrap.jsx index 062b7b5..fb320c6 100644 --- a/webmaker/src/components/ContentWrap.jsx +++ b/webmaker/src/components/ContentWrap.jsx @@ -733,8 +733,8 @@ export default class ContentWrap extends Component { profile: 'xhtml', gutters: ['CodeMirror-linenumbers', 'CodeMirror-foldgutter'], noAutocomplete: true, - matchTags: { bothTags: true } - // emmet: true + matchTags: { bothTags: true }, + emmet: true }} onChange={this.onHtmlCodeChange.bind(this)} onCreation={el => (this.cm.html = el)} @@ -795,8 +795,8 @@ export default class ContentWrap extends Component { 'error-gutter', 'CodeMirror-linenumbers', 'CodeMirror-foldgutter' - ] - // emmet: true + ], + emmet: true }} onChange={this.onCssCodeChange.bind(this)} onCreation={el => (this.cm.css = el)} diff --git a/webmaker/src/components/Modal.jsx b/webmaker/src/components/Modal.jsx index 905867d..d3919cf 100644 --- a/webmaker/src/components/Modal.jsx +++ b/webmaker/src/components/Modal.jsx @@ -27,7 +27,7 @@ export default class Modal extends Component { return (