mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-12-11 12:47:54 +08:00
fea5630ea4
Changed to be rendered server side along with page content. Changed deletion to fully delete comments from the database. Added 'local_id' to comments for referencing. Updated reply system to be non-nested (Incomplete) Made database comment format entity-agnostic to be more future proof. Updated designs of comment sections.
24 lines
671 B
JavaScript
24 lines
671 B
JavaScript
const Vue = require("vue");
|
|
|
|
function exists(id) {
|
|
return document.getElementById(id) !== null;
|
|
}
|
|
|
|
let vueMapping = {
|
|
'search-system': require('./search'),
|
|
'entity-dashboard': require('./entity-dashboard'),
|
|
'code-editor': require('./code-editor'),
|
|
'image-manager': require('./image-manager'),
|
|
'tag-manager': require('./tag-manager'),
|
|
'attachment-manager': require('./attachment-manager'),
|
|
};
|
|
|
|
window.vues = {};
|
|
|
|
let ids = Object.keys(vueMapping);
|
|
for (let i = 0, len = ids.length; i < len; i++) {
|
|
if (!exists(ids[i])) continue;
|
|
let config = vueMapping[ids[i]];
|
|
config.el = '#' + ids[i];
|
|
window.vues[ids[i]] = new Vue(config);
|
|
} |