Temporarily removed cookie consent banner + maintenance
This commit is contained in:
parent
70551ed482
commit
0350659b6c
2228
package-lock.json
generated
2228
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
32
package.json
32
package.json
@ -30,42 +30,42 @@
|
||||
},
|
||||
"homepage": "https://icynet.eu",
|
||||
"dependencies": {
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.10.1",
|
||||
"@babel/register": "^7.10.1",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.10.4",
|
||||
"@babel/register": "^7.10.4",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"bluebird": "^3.7.2",
|
||||
"body-parser": "^1.19.0",
|
||||
"connect-redis": "^4.0.4",
|
||||
"connect-session-knex": "^1.6.0",
|
||||
"connect-session-knex": "^1.7.3",
|
||||
"email-templates": "^7.0.5",
|
||||
"express": "^4.17.1",
|
||||
"express-rate-limit": "^5.1.3",
|
||||
"express-session": "^1.17.1",
|
||||
"feed": "^4.2.0",
|
||||
"fs-extra": "^9.0.0",
|
||||
"feed": "^4.2.1",
|
||||
"fs-extra": "^9.0.1",
|
||||
"gm": "^1.23.1",
|
||||
"knex": "^0.21.1",
|
||||
"multiparty": "^4.2.1",
|
||||
"mysql": "^2.18.1",
|
||||
"nodemailer": "^6.4.8",
|
||||
"nodemailer": "^6.4.10",
|
||||
"notp": "^2.0.3",
|
||||
"oauth-libre": "^0.9.17",
|
||||
"objection": "^2.1.5",
|
||||
"objection": "^2.2.1",
|
||||
"redis": "^3.0.2",
|
||||
"serve-favicon": "^2.5.0",
|
||||
"stylus": "^0.54.7",
|
||||
"thirty-two": "^1.0.2",
|
||||
"toml": "^3.0.0",
|
||||
"uuid": "^8.1.0",
|
||||
"uuid": "^8.2.0",
|
||||
"vue": "^2.6.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.10.1",
|
||||
"@babel/preset-env": "^7.10.1",
|
||||
"@babel/core": "^7.10.4",
|
||||
"@babel/preset-env": "^7.10.4",
|
||||
"babel-loader": "^8.1.0",
|
||||
"bootstrap": "^4.5.0",
|
||||
"concurrently": "^5.2.0",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
"eslint-plugin-import": "^2.22.0",
|
||||
"jquery": "^3.5.1",
|
||||
"morgan": "^1.10.0",
|
||||
"mustache": "^4.0.1",
|
||||
@ -73,16 +73,16 @@
|
||||
"pug": "^3.0.0",
|
||||
"pug-plain-loader": "^1.0.0",
|
||||
"standard": "^14.3.4",
|
||||
"terser-webpack-plugin": "^3.0.2",
|
||||
"terser-webpack-plugin": "^3.0.6",
|
||||
"vue-clickaway": "^2.2.2",
|
||||
"vue-loader": "^15.9.2",
|
||||
"vue-loader": "^15.9.3",
|
||||
"vue-resource": "^1.5.1",
|
||||
"vue-router": "^3.3.1",
|
||||
"vue-router": "^3.3.4",
|
||||
"vue-template-compiler": "^2.6.11",
|
||||
"watch": "^1.0.2",
|
||||
"webpack": "^4.43.0",
|
||||
"webpack-cli": "^3.3.11",
|
||||
"webpack-merge": "^4.2.2"
|
||||
"webpack-cli": "^3.3.12",
|
||||
"webpack-merge": "^5.0.7"
|
||||
},
|
||||
"standard": {
|
||||
"env": {
|
||||
|
@ -5,12 +5,7 @@ import fs from 'fs-extra'
|
||||
|
||||
let lfs
|
||||
|
||||
function pz (z) {
|
||||
if (z < 10) {
|
||||
return '0' + z
|
||||
}
|
||||
return z
|
||||
}
|
||||
const pz = z => z < 10 ? '0' + z : z
|
||||
|
||||
// Time stamp constructor
|
||||
function dateFormat (date) {
|
||||
@ -72,20 +67,10 @@ async function initializeLogger () {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = function () {
|
||||
this.logProcess = (pid, msg) => {
|
||||
if (msg.indexOf('warn') === 0) {
|
||||
msg = msg.substring(5)
|
||||
console.warn('[%s] %s', pid, msg)
|
||||
} else if (msg.indexOf('error') === 0) {
|
||||
msg = msg.substring(6)
|
||||
console.error('[%s] %s', pid, msg)
|
||||
} else {
|
||||
console.log('[%s] %s', pid, msg)
|
||||
}
|
||||
module.exports = {
|
||||
initialize: function () {
|
||||
// Create log file write stream
|
||||
if (!config.logger || !config.logger.write) return
|
||||
initializeLogger().catch((e) => console.error(e))
|
||||
}
|
||||
|
||||
// Create log file write stream
|
||||
if (!config.logger || !config.logger.write) return
|
||||
initializeLogger().catch((e) => console.error(e))
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ async function uploadImage (identifier, fields, files) {
|
||||
// Get file info, generate a file name
|
||||
const fileHash = uuid()
|
||||
const contentType = file.headers['content-type']
|
||||
if (!contentType) return bailOut(file.path, 'Invalid of missing content-type header')
|
||||
if (!contentType) return bailOut(file.path, 'Invalid or missing content-type header')
|
||||
|
||||
file = file.path
|
||||
|
||||
|
@ -1,9 +1,5 @@
|
||||
import response from './response'
|
||||
|
||||
module.exports = function (fn, redir) {
|
||||
return function (req, res, next) {
|
||||
fn(req, res, next).catch(e => {
|
||||
return response.error(req, res, e, redir ? req.query.redirect_uri : null)
|
||||
})
|
||||
}
|
||||
}
|
||||
module.exports = (fn, redir) => (req, res, next) =>
|
||||
fn(req, res, next).catch(e =>
|
||||
response.error(req, res, e, redir ? req.query.redirect_uri : null))
|
||||
|
@ -6,7 +6,9 @@ import path from 'path'
|
||||
|
||||
const cpuCount = require('os').cpus().length
|
||||
const workers = []
|
||||
const logger = new Logger()
|
||||
|
||||
// Initialize the logger
|
||||
Logger.initialize()
|
||||
|
||||
const args = {
|
||||
dev: process.env.NODE_ENV !== 'production',
|
||||
@ -63,24 +65,17 @@ function watchFileTree () {
|
||||
function spawnWorker (oldWorker) {
|
||||
const w = cluster.fork()
|
||||
w.process.stdout.on('data', (data) => {
|
||||
console.log(w.process.pid, data.toString().trim())
|
||||
console.log('[%s]', w.process.pid, data.toString().trim())
|
||||
})
|
||||
|
||||
w.process.stderr.on('data', (data) => {
|
||||
console.log(w.process.pid, data.toString().trim())
|
||||
console.error('[%s]', w.process.pid, data.toString().trim())
|
||||
})
|
||||
args.verbose && console.log('Starting worker process %d...', w.process.pid)
|
||||
|
||||
w.on('message', (message) => {
|
||||
if (message === 'started') {
|
||||
workers.push(w)
|
||||
args.verbose && console.log('Started worker process', w.process.pid)
|
||||
if (oldWorker) {
|
||||
args.verbose && console.log('Stopping worker process', oldWorker.process.pid)
|
||||
oldWorker.send('stop')
|
||||
}
|
||||
} else {
|
||||
logger.logProcess(w.process.pid, message)
|
||||
}
|
||||
if (message !== 'started') return
|
||||
workers.push(w)
|
||||
if (oldWorker) oldWorker.send('stop')
|
||||
})
|
||||
|
||||
args.id = w.process.pid
|
||||
@ -106,9 +101,7 @@ cluster.on('exit', (worker, code, signal) => {
|
||||
if (index !== -1) workers.splice(index, 1)
|
||||
if (code === 0) return
|
||||
|
||||
setTimeout(() => {
|
||||
spawnWorker()
|
||||
}, 10 * 1000)
|
||||
setTimeout(spawnWorker, 10 * 1000)
|
||||
})
|
||||
|
||||
initialize()
|
||||
|
@ -1,35 +1,13 @@
|
||||
'use strict'
|
||||
|
||||
const path = require('path')
|
||||
const util = require('util')
|
||||
|
||||
require('@babel/register')({
|
||||
plugins: ['@babel/plugin-transform-modules-commonjs']
|
||||
})
|
||||
|
||||
process.once('message', (args) => {
|
||||
if (args.dev) {
|
||||
process.env.NODE_ENV = 'development'
|
||||
} else {
|
||||
process.env.NODE_ENV = 'production'
|
||||
}
|
||||
|
||||
console.log = function () {
|
||||
process.send(util.format.apply(this, arguments))
|
||||
}
|
||||
|
||||
console.debug = function () {
|
||||
if (!args.dev) return
|
||||
process.send('[DEBUG] ' + util.format.apply(this, arguments))
|
||||
}
|
||||
|
||||
console.warn = function () {
|
||||
process.send('warn ' + util.format.apply(this, arguments))
|
||||
}
|
||||
|
||||
console.error = function () {
|
||||
process.send('error ' + util.format.apply(this, arguments))
|
||||
}
|
||||
process.env.NODE_ENV = args.dev ? 'development' : 'production'
|
||||
|
||||
try {
|
||||
require(path.join(__dirname, 'server'))(args)
|
||||
@ -39,14 +17,11 @@ process.once('message', (args) => {
|
||||
}
|
||||
|
||||
process.on('message', (message) => {
|
||||
if (message === 'stop') {
|
||||
console.log('Recieved stop signal')
|
||||
const knex = require(path.join(__dirname, '../scripts/load-database')).knex
|
||||
if (message !== 'stop') return
|
||||
console.log('Recieved stop signal')
|
||||
const knex = require(path.join(__dirname, '../scripts/load-database')).knex
|
||||
|
||||
knex.destroy(() => {
|
||||
process.exit(0)
|
||||
})
|
||||
}
|
||||
knex.destroy(() => process.exit(0))
|
||||
})
|
||||
|
||||
process.send('started')
|
||||
|
@ -20,8 +20,8 @@ html
|
||||
block navigation
|
||||
nav.navbar.navbar-expand-lg.navbar-light.bg-light.sticky-top
|
||||
a.navbar-brand(href="/")
|
||||
img(src="/static/image/icynet-icon.svg" width="30" heigth="30")
|
||||
|Administration
|
||||
img(src="/static/image/icynet-icon.png" width="30" heigth="30")
|
||||
| Administration
|
||||
|
||||
button.navbar-toggler(type="button" data-toggle="collapse" data-target="#navCollapse" aria-controls="navCollapse" aria-expanded="false" aria-label="Toggle navigation")
|
||||
span.navbar-toggler-icon
|
||||
|
@ -31,31 +31,14 @@ html
|
||||
link(rel="stylesheet", type="text/css", href="/style/main.css")
|
||||
link(rel="stylesheet", type="text/css", href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css")
|
||||
script(src="/script/main.js")
|
||||
block cookieconsent
|
||||
link(rel="stylesheet", type="text/css", href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.4/cookieconsent.min.css")
|
||||
script(src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.4/cookieconsent.min.js")
|
||||
script(type="text/javascript").
|
||||
window.addEventListener('load', function () {
|
||||
window.cookieconsent.initialise({
|
||||
container: document.body,
|
||||
palette:{
|
||||
popup: {background: "#00dbf7"},
|
||||
button: {background: "#0074d0"},
|
||||
},
|
||||
revokable: false,
|
||||
law: {
|
||||
regionalLaw: false,
|
||||
},
|
||||
location: true,
|
||||
});
|
||||
});
|
||||
|
||||
title
|
||||
block title
|
||||
body
|
||||
noscript
|
||||
h2 This site requires JavaScript to work properly! Some features may be limited or missing entirely.
|
||||
p Please consider enabling JavaScript for the full experience. We respect your browser's privacy settings.
|
||||
p This site is entirely free and open source:
|
||||
a(href="https://gitlab.icynet.eu/IcyNetwork/IcyNet.eu" target="_blank") Browse the repository
|
||||
if matomo
|
||||
img.d-inline-block.align-top(src="#{matomo.track_url}piwik.php?idsite=1&rec=1" style="border:0;" alt="")
|
||||
|
||||
@ -63,7 +46,7 @@ html
|
||||
nav.navbar.navbar-expand-lg.navbar-light.bg-light.sticky-top
|
||||
a.navbar-brand(href="/")
|
||||
img(src="/static/image/icynet-icon.png" width="30" heigth="30")
|
||||
|Icy Network
|
||||
| Icy Network
|
||||
|
||||
button.navbar-toggler(type="button" data-toggle="collapse" data-target="#navCollapse" aria-controls="navCollapse" aria-expanded="false" aria-label="Toggle navigation")
|
||||
span.navbar-toggler-icon
|
||||
|
@ -5,8 +5,8 @@ block title
|
||||
block body
|
||||
.container.mb-4.mt-4.pt-4
|
||||
.row
|
||||
.col
|
||||
.col-6
|
||||
.col.d-none.d-sm-block
|
||||
.col-sm-auto
|
||||
h1.mt-1.mb-5.text-center Log in to Icy Network
|
||||
if message.text
|
||||
if message.error
|
||||
@ -35,4 +35,4 @@ block body
|
||||
if !registrations
|
||||
.alert.alert-warning These links can only be used to log in to existing accounts.
|
||||
include ../includes/external.pug
|
||||
.col
|
||||
.col.d-none.d-sm-block
|
||||
|
@ -1,4 +1,4 @@
|
||||
const merge = require('webpack-merge')
|
||||
const { merge } = require('webpack-merge')
|
||||
const common = require('./webpack.common.js')
|
||||
|
||||
module.exports = merge(common, {
|
||||
|
@ -1,5 +1,5 @@
|
||||
const webpack = require('webpack')
|
||||
const merge = require('webpack-merge')
|
||||
const { merge } = require('webpack-merge')
|
||||
const common = require('./webpack.common.js')
|
||||
const TerserPlugin = require('terser-webpack-plugin')
|
||||
|
||||
|
Reference in New Issue
Block a user