From d6ae7a36aeef3b5c261bb521f5e3f48898b65ede Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sat, 24 Dec 2016 11:09:07 +0800 Subject: Fix module variable require --- public/js/cover.js | 1 + public/js/index.js | 1 + 2 files changed, 2 insertions(+) (limited to 'public/js') diff --git a/public/js/cover.js b/public/js/cover.js index 2f35bd28..ee7d75e4 100644 --- a/public/js/cover.js +++ b/public/js/cover.js @@ -9,6 +9,7 @@ var urlpath = common.urlpath; var resetCheckAuth = common.resetCheckAuth; var getLoginState = common.getLoginState; var clearLoginState = common.clearLoginState; +var loginStateChangeEvent = common.loginStateChangeEvent; var historyModule = require('./history'); var parseStorageToHistory = historyModule.parseStorageToHistory; diff --git a/public/js/index.js b/public/js/index.js index 96580fe3..4a466245 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -29,6 +29,7 @@ var DROPBOX_APP_KEY = common.DROPBOX_APP_KEY; var noteurl = common.noteurl; var checkLoginStateChanged = common.checkLoginStateChanged; +var loginStateChangeEvent = common.loginStateChangeEvent; var extra = require('./extra'); var md = extra.md; -- cgit v1.2.3 From a06fad974e66c8c5854985fe12fbadbb43cc9c7e Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sat, 24 Dec 2016 11:10:18 +0800 Subject: Install vue and babel dependency --- public/js/cover.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'public/js') diff --git a/public/js/cover.js b/public/js/cover.js index ee7d75e4..4696203e 100644 --- a/public/js/cover.js +++ b/public/js/cover.js @@ -28,6 +28,8 @@ var saveAs = require('file-saver').saveAs; var List = require('list.js'); var S = require('string'); +import Vue from 'vue'; + var options = { valueNames: ['id', 'text', 'timestamp', 'fromNow', 'time', 'tags', 'pinned'], item: '
  • \ -- cgit v1.2.3 From 99dd10772422b66b7f98f1483b5fa3225e3e86e0 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sat, 24 Dec 2016 11:50:57 +0800 Subject: Basic setup for Vue app --- public/js/components/HelloWorld.vue | 21 +++++++++++++++++++++ public/js/cover.js | 6 ++++++ public/js/views/Cover.vue | 15 +++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 public/js/components/HelloWorld.vue create mode 100644 public/js/views/Cover.vue (limited to 'public/js') diff --git a/public/js/components/HelloWorld.vue b/public/js/components/HelloWorld.vue new file mode 100644 index 00000000..d8e3007f --- /dev/null +++ b/public/js/components/HelloWorld.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/public/js/cover.js b/public/js/cover.js index 4696203e..b8886849 100644 --- a/public/js/cover.js +++ b/public/js/cover.js @@ -28,8 +28,14 @@ var saveAs = require('file-saver').saveAs; var List = require('list.js'); var S = require('string'); +import Cover from './views/Cover'; import Vue from 'vue'; +new Vue({ + el: '#cover-app', + render: (h) => h(Cover) +}) + var options = { valueNames: ['id', 'text', 'timestamp', 'fromNow', 'time', 'tags', 'pinned'], item: '
  • \ diff --git a/public/js/views/Cover.vue b/public/js/views/Cover.vue new file mode 100644 index 00000000..767d087f --- /dev/null +++ b/public/js/views/Cover.vue @@ -0,0 +1,15 @@ + + + -- cgit v1.2.3