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 (
+
+ 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.
+ Import your creations in your account
+
+
diff --git a/webmaker/src/components/UserCodeMirror.jsx b/webmaker/src/components/UserCodeMirror.jsx
index 8574428..885ccd2 100644
--- a/webmaker/src/components/UserCodeMirror.jsx
+++ b/webmaker/src/components/UserCodeMirror.jsx
@@ -31,6 +31,10 @@ import 'codemirror/mode/htmlmixed/htmlmixed.js';
import 'codemirror/keymap/sublime.js';
import 'codemirror/keymap/vim.js';
+import emmet from '@emmetio/codemirror-plugin';
+
+emmet(CodeMirror);
+
export default class UserCodeMirror extends Component {
componentDidMount() {
this.initEditor();
diff --git a/webmaker/src/components/app.jsx b/webmaker/src/components/app.jsx
index aef0160..1b41f47 100644
--- a/webmaker/src/components/app.jsx
+++ b/webmaker/src/components/app.jsx
@@ -32,6 +32,7 @@ import { auth } from '../auth';
import SupportDeveloperModal from './SupportDeveloperModal';
import KeyboardShortcutsModal from './KeyboardShortcutsModal';
import { takeScreenshot } from '../takeScreenshot';
+import AskToImportModal from './AskToImportModal';
if (module.hot) {
require('preact/debug');
@@ -107,7 +108,7 @@ export default class App extends Component {
return;
}
this.oldSavedItems = items;
- // window.oldSavedCreationsCountEl.textContent = items.length;
+ this.oldSavedCreationsCount = items.length;
this.setState({
isAskToImportModalOpen: true
});
@@ -967,6 +968,7 @@ export default class App extends Component {