mirror of https://github.com/Requarks/wiki.git
9 changed files with 122 additions and 126 deletions
Split View
Diff Options
-
28.vscode/launch.json
-
32client/js/pages/all.js
-
12controllers/pages.js
-
13controllers/ws.js
-
9fuse.js
-
7libs/entries.js
-
15models/entry.js
-
89views/pages/all.pug
-
43wiki.js
@ -0,0 +1,28 @@ |
|||
{ |
|||
// Use IntelliSense to learn about possible Node.js debug attributes. |
|||
// Hover to view descriptions of existing attributes. |
|||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 |
|||
"version": "0.2.0", |
|||
"configurations": [ |
|||
{ |
|||
"type": "node", |
|||
"request": "attach", |
|||
"name": "Attach (Inspector Protocol)", |
|||
"port": 9229, |
|||
"protocol": "inspector" |
|||
}, |
|||
{ |
|||
"type": "node", |
|||
"request": "launch", |
|||
"name": "Launch Program", |
|||
"program": "${workspaceRoot}\\server.js" |
|||
}, |
|||
{ |
|||
"type": "node", |
|||
"request": "attach", |
|||
"name": "Attach to Port", |
|||
"address": "localhost", |
|||
"port": 9222 |
|||
} |
|||
] |
|||
} |
@ -1,9 +1,39 @@ |
|||
'use strict' |
|||
|
|||
import $ from 'jquery' |
|||
import Vue from 'vue' |
|||
import _ from 'lodash' |
|||
|
|||
module.exports = (alerts, socket) => { |
|||
if ($('#page-type-all').length) { |
|||
|
|||
let vueAllPages = new Vue({ // eslint-disable-line no-unused-vars
|
|||
el: '#page-type-all', |
|||
data: { |
|||
tree: [] |
|||
}, |
|||
methods: { |
|||
fetch: function (basePath) { |
|||
let self = this |
|||
$('#notifload').addClass('active') |
|||
Vue.nextTick(() => { |
|||
socket.emit('treeFetch', { basePath }, (data) => { |
|||
if (self.tree.length > 0) { |
|||
let curTree = _.last(self.tree) |
|||
curTree.hasChildren = true |
|||
_.find(curTree.pages, { _id: basePath }).isActive = true |
|||
} |
|||
self.tree.push({ |
|||
hasChildren: false, |
|||
pages: data |
|||
}) |
|||
$('#notifload').removeClass('active') |
|||
}) |
|||
}) |
|||
} |
|||
}, |
|||
mounted: function () { |
|||
this.fetch('') |
|||
} |
|||
}) |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save