summaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js')
-rw-r--r--public/js/components/HelloWorld.vue21
-rw-r--r--public/js/cover.js9
-rw-r--r--public/js/index.js1
-rw-r--r--public/js/views/Cover.vue15
4 files changed, 46 insertions, 0 deletions
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 @@
+<template>
+ <h1>{{ message }}</h1>
+</template>
+
+<script>
+export default {
+ name: 'HelloWorld',
+
+ data() {
+ return {
+ message: 'Hello Vue'
+ }
+ }
+}
+</script>
+
+<style scoped>
+h1 {
+ color: blue;
+}
+</style>
diff --git a/public/js/cover.js b/public/js/cover.js
index 2f35bd28..b8886849 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;
@@ -27,6 +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: '<li class="col-xs-12 col-sm-6 col-md-6 col-lg-4">\
diff --git a/public/js/index.js b/public/js/index.js
index 56766657..8921eda3 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -28,6 +28,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;
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 @@
+<template>
+ <hello-world />
+</template>
+
+<script>
+import HelloWorld from '../components/HelloWorld';
+
+export default {
+ name: 'Cover',
+
+ components: {
+ HelloWorld
+ }
+}
+</script>