Merge branch 'master' into better-modals

merge-requests/208/head
fatchan 5 years ago
commit 40d5604df5
  1. 3
      configs/main.js.example
  2. 6
      controllers/forms.js
  3. 8
      package-lock.json
  4. 7
      views/pages/home.pug
  5. 3
      worker.js

@ -138,6 +138,9 @@ module.exports = {
true=allow only A-Za-z0-9_-
regex=custom regex of what to replace e.g. /[^\w\s-]+/g */
filterFileNames: false,
/* replace spaces and multiple spaces with some character default _ for better filenames
(spaces dont belong in filenames) */
spaceFileNameReplacement: '_',
//options for code block highlighting in posts
highlightOptions: {

@ -3,7 +3,7 @@
const express = require('express')
, router = express.Router()
, Boards = require(__dirname+'/../db/boards.js')
, { globalLimits, debugLogs, filterFileNames } = require(__dirname+'/../configs/main.js')
, { globalLimits, debugLogs, filterFileNames, spaceFileNameReplacement } = require(__dirname+'/../configs/main.js')
//middlewares
, calcPerms = require(__dirname+'/../helpers/checks/calcpermsmiddleware.js')
, hasPerms = require(__dirname+'/../helpers/checks/haspermsmiddleware.js')
@ -29,6 +29,7 @@ const express = require('express')
debug: debugLogs,
createParentPath: true,
safeFileNames: filterFileNames,
spaceFileNameReplacement,
preserveExtension: 4,
limits: {
totalSize: globalLimits.postFilesSize.max,
@ -43,7 +44,8 @@ const express = require('express')
debug: debugLogs,
createParentPath: true,
safeFileNames: filterFileNames,
preserveExtension: 3,
spaceFileNameReplacement,
preserveExtension: 4,
limits: {
totalSize: globalLimits.bannerFilesSize.max,
fileSize: globalLimits.bannerFilesSize.max,

8
package-lock.json generated

@ -226,7 +226,7 @@
}
},
"@tohru/gm": {
"version": "github:fatchan/gm#c2ffb2ce0db3f64fbf4082462601429985b6dca6",
"version": "github:fatchan/gm#07df8fbf131b6b18c32fa010a84e67964e132955",
"from": "github:fatchan/gm",
"requires": {
"array-parallel": "^0.1.3",
@ -2401,8 +2401,8 @@
}
},
"express-fileupload": {
"version": "github:fatchan/express-fileupload#fd713ae7a3c7f381638d6479faa142d366304329",
"from": "github:fatchan/express-fileupload#fd713ae7a3c7f381638d6479faa142d366304329",
"version": "github:fatchan/express-fileupload#9aada2ecdef8a6617ccf82746e5faa2aece77239",
"from": "github:fatchan/express-fileupload",
"requires": {
"busboy": "^0.3.1"
}
@ -3604,7 +3604,7 @@
}
},
"gm": {
"version": "github:fatchan/gm#c2ffb2ce0db3f64fbf4082462601429985b6dca6",
"version": "github:fatchan/gm#07df8fbf131b6b18c32fa010a84e67964e132955",
"from": "github:fatchan/gm",
"requires": {
"array-parallel": "^0.1.3",

@ -20,8 +20,7 @@ block content
.table-container.flex-center.mv-5
table.newstable
tr
th(colspan=3)
a(href='/news.html') Latest News
th(colspan=3) Latest News
each post in recentNews
tr
td
@ -46,6 +45,10 @@ block content
td #{board.pph}
td #{board.ips}
td #{board.sequence_value-1}
if totalStats.total-totalStats.unlisted > boards.length
tr
td(colspan=5)
a.bold(href='/boards.html') More Boards
.table-container.flex-center.mv-10.text-center
table(style='max-width:450px')
tr

@ -21,7 +21,8 @@ const Queue = require('bull')
.on('failed', console.warn);
taskQueue.process(async job => {
return tasks[job.data.task](job.data.options);
await tasks[job.data.task](job.data.options);
return null;
});
})();

Loading…
Cancel
Save