diff --git a/client/app.js b/client/app.js index aaf2494f..a1a48a0e 100644 --- a/client/app.js +++ b/client/app.js @@ -78,6 +78,7 @@ Vue.component('admin', () => import(/* webpackChunkName: "admin" */ './component Vue.component('editor', () => import(/* webpackChunkName: "editor" */ './components/editor.vue')) Vue.component('login', () => import(/* webpackMode: "eager" */ './components/login.vue')) Vue.component('nav-header', () => import(/* webpackMode: "eager" */ './components/nav-header.vue')) +Vue.component('profile', () => import(/* webpackChunkName: "profile" */ './components/profile.vue')) Vue.component('setup', () => import(/* webpackChunkName: "setup" */ './components/setup.vue')) let bootstrap = () => { diff --git a/client/components/editor.vue b/client/components/editor.vue index 21a0b91c..02c8d600 100644 --- a/client/components/editor.vue +++ b/client/components/editor.vue @@ -14,7 +14,7 @@ v-dialog(v-model='dialogProgress', persistent, max-width='350') v-card(color='blue darken-3', dark) v-card-text.text-xs-center.py-4 - v-progress-circular(indeterminate, color='white', width='1') + v-progress-circular(indeterminate, color='white', :width='1') .subheading Processing .caption.blue--text.text--lighten-3 Please wait... diff --git a/client/components/nav-header.vue b/client/components/nav-header.vue index b1d20923..e84fbf12 100644 --- a/client/components/nav-header.vue +++ b/client/components/nav-header.vue @@ -3,7 +3,7 @@ v-menu(open-on-hover, offset-y, bottom, left, nudge-top='-18', min-width='250') v-toolbar-side-icon(slot='activator') v-icon view_module - v-list(dense) + v-list(dense).py-0 v-list-tile(avatar, href='/') v-list-tile-avatar: v-icon(color='blue') home v-list-tile-content Home diff --git a/client/components/profile.vue b/client/components/profile.vue new file mode 100644 index 00000000..9e3ae15c --- /dev/null +++ b/client/components/profile.vue @@ -0,0 +1,88 @@ + + + + + diff --git a/client/components/profile/comments.vue b/client/components/profile/comments.vue new file mode 100644 index 00000000..1d5bbfbf --- /dev/null +++ b/client/components/profile/comments.vue @@ -0,0 +1,20 @@ + + + + + diff --git a/client/components/profile/pages.vue b/client/components/profile/pages.vue new file mode 100644 index 00000000..07a331e3 --- /dev/null +++ b/client/components/profile/pages.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/client/components/profile/preferences.vue b/client/components/profile/preferences.vue new file mode 100644 index 00000000..c20ce0f1 --- /dev/null +++ b/client/components/profile/preferences.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/client/components/profile/profile.vue b/client/components/profile/profile.vue new file mode 100644 index 00000000..83b252c6 --- /dev/null +++ b/client/components/profile/profile.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/server/controllers/common.js b/server/controllers/common.js index 5c5df71c..c941cd9b 100644 --- a/server/controllers/common.js +++ b/server/controllers/common.js @@ -15,6 +15,13 @@ router.get(['/a', '/a/*'], (req, res, next) => { res.render('main/admin') }) +/** + * Profile + */ +router.get(['/p', '/p/*'], (req, res, next) => { + res.render('main/profile') +}) + /** * View document */ diff --git a/server/db/migrations/2.0.0.js b/server/db/migrations/2.0.0.js index e111d07d..0b41b384 100644 --- a/server/db/migrations/2.0.0.js +++ b/server/db/migrations/2.0.0.js @@ -99,14 +99,14 @@ exports.up = knex => { // PAGE TAGS --------------------------- .createTable('pageTags', table => { table.increments('id').primary() - table.integer('pageId').unsigned().references('id').inTable('pages') - table.integer('tagId').unsigned().references('id').inTable('tags') + table.integer('pageId').unsigned().references('id').inTable('pages').onDelete('CASCADE') + table.integer('tagId').unsigned().references('id').inTable('tags').onDelete('CASCADE') }) // USER GROUPS ------------------------- .createTable('userGroups', table => { table.increments('id').primary() - table.integer('userId').unsigned().references('id').inTable('users') - table.integer('groupId').unsigned().references('id').inTable('groups') + table.integer('userId').unsigned().references('id').inTable('users').onDelete('CASCADE') + table.integer('groupId').unsigned().references('id').inTable('groups').onDelete('CASCADE') }) // ===================================== // REFERENCES diff --git a/server/views/main/profile.pug b/server/views/main/profile.pug new file mode 100644 index 00000000..bf276652 --- /dev/null +++ b/server/views/main/profile.pug @@ -0,0 +1,6 @@ +extends ../master.pug + +block body + body + #app + profile