Stopped root page from exporting as html and fix URL for icon
This commit is contained in:
parent
3f9730955a
commit
c780aa5fba
@ -61,7 +61,7 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-3 navsec">
|
||||
<nav class="navbar navbar-dark bg-dark flex-column">
|
||||
<a class="navbar-brand" href="#"><img src="/logo/Asset+1.svg" width="30" height="30" class="d-inline-block align-top" alt="">Noded</a>
|
||||
<a class="navbar-brand" href="#"><img src="https://hack20.glmdev.tech/assets/logo/3x/logo3x.png" width="30" height="30" class="d-inline-block align-top" alt="">Noded</a>
|
||||
<div class="nav nav-pills flex-column">
|
||||
%%SIDEBAR%%
|
||||
</div>
|
||||
|
@ -23,7 +23,7 @@ class Export extends Controller {
|
||||
const pages = await Page.find({ OrgUserId: user._id })
|
||||
|
||||
const ExportData = {}
|
||||
for (const page of pages) {
|
||||
for (const page of pages) { //for all pages of the user, generate a copy of the data
|
||||
const nodes = await Node.find({ PageId: page.UUID })
|
||||
|
||||
const PageData = { ...page }
|
||||
@ -84,7 +84,7 @@ class Export extends Controller {
|
||||
const Page = this.models.get('api:Page')
|
||||
const Node = this.models.get('api:Node')
|
||||
const user = req.user
|
||||
const pages = await Page.find({ OrgUserId: user._id })
|
||||
const pages = await Page.find({ OrgUserId: user._id, ParentId: { $ne: '0' } })
|
||||
const mapping = {} //keeps track of html file UUID and file name
|
||||
const page0 = await user.get_root_page() //topmost page
|
||||
|
||||
@ -126,7 +126,7 @@ class Export extends Controller {
|
||||
async _sidebar_recurse(mapping, parent) {
|
||||
const Page = this.models.get('api:Page')
|
||||
const Node = this.models.get('api:Node')
|
||||
const children = await Page.find({ ParentId : parent.UUID})
|
||||
const children = await Page.find({ ParentId: parent.UUID })
|
||||
let base = ''
|
||||
for (const child of children) {
|
||||
if (child.ChildPageIds.length === 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user