unlisted boards, and dont show them on homepage

merge-requests/208/head
fatchan 5 years ago
parent fb5796175a
commit 2786704849
  1. 4
      db/boards.js
  2. 1
      models/forms/changeboardsettings.js
  3. 4
      views/pages/manage.pug

@ -109,7 +109,9 @@ module.exports = {
},
frontPageSortLimit: () => {
return db.find({}).sort({
return db.find({
'settings.unlisted': false
}).sort({
'ips': -1,
'pph': -1,
'sequence_value': -1,

@ -40,6 +40,7 @@ module.exports = async (req, res, next) => {
moderators,
'name': req.body.name && req.body.name.trim().length > 0 ? req.body.name : oldSettings.name,
'description': req.body.description && req.body.description.trim().length > 0 ? req.body.description : oldSettings.description,
'unlisted': req.body.unlisted ? true : false,
'locked': req.body.locked ? true : false,
'early404': req.body.early404 ? true : false,
'ids': req.body.ids ? true : false,

@ -132,6 +132,10 @@ block content
.label Board Locked
label.postform-style.ph-5
input(type='checkbox', name='locked', value='true' checked=board.settings.locked)
section.row
.label Unlisted
label.postform-style.ph-5
input(type='checkbox', name='unlisted', value='true' checked=board.settings.unlisted)
section.row
.label Theme
select(name='theme')

Loading…
Cancel
Save