2019-07-24 21:26:56 +02:00
|
|
|
const path = require('path')
|
2021-09-30 11:13:44 +02:00
|
|
|
const URL = require('url')
|
2019-12-04 00:50:15 +01:00
|
|
|
const crypto = require('crypto')
|
2021-09-30 11:13:44 +02:00
|
|
|
const { promisify } = require('util')
|
2020-07-07 21:58:52 +02:00
|
|
|
const sharp = require('sharp')
|
2021-09-30 11:13:44 +02:00
|
|
|
const config = require('../../config')
|
|
|
|
const generateKeyPair = promisify(crypto.generateKeyPair)
|
2021-03-05 14:17:10 +01:00
|
|
|
const log = require('../../log')
|
2022-02-07 12:28:38 +01:00
|
|
|
const escape = require('lodash/escape')
|
2022-12-23 01:08:14 +01:00
|
|
|
const DB = require('../models/models')
|
2021-09-30 11:13:44 +02:00
|
|
|
|
|
|
|
let defaultHostname
|
|
|
|
try {
|
|
|
|
defaultHostname = new URL.URL(config.baseurl).hostname
|
|
|
|
} catch (e) {}
|
|
|
|
|
2019-12-04 00:50:15 +01:00
|
|
|
const defaultSettings = {
|
2021-10-21 12:17:41 +02:00
|
|
|
title: config.title || 'Gancio',
|
|
|
|
description: config.description || 'A shared agenda for local communities',
|
2021-09-30 11:13:44 +02:00
|
|
|
baseurl: config.baseurl || '',
|
|
|
|
hostname: defaultHostname,
|
2019-12-04 00:50:15 +01:00
|
|
|
instance_timezone: 'Europe/Rome',
|
2020-02-20 18:37:10 +01:00
|
|
|
instance_locale: 'en',
|
2023-11-20 23:15:28 +01:00
|
|
|
instance_name: 'relay',
|
2019-12-04 00:50:15 +01:00
|
|
|
allow_registration: true,
|
|
|
|
allow_anon_event: true,
|
2022-12-05 23:03:10 +01:00
|
|
|
allow_multidate_event: true,
|
2019-12-04 00:50:15 +01:00
|
|
|
allow_recurrent_event: false,
|
2023-04-05 16:14:55 +02:00
|
|
|
allow_online_event: true,
|
2023-11-21 01:39:18 +01:00
|
|
|
allow_message_users: true,
|
2019-12-04 00:50:15 +01:00
|
|
|
recurrent_event_visible: false,
|
2022-12-23 01:08:14 +01:00
|
|
|
allow_geolocation: false,
|
2022-12-06 00:03:53 +01:00
|
|
|
geocoding_provider_type: 'Nominatim',
|
2022-12-06 00:20:42 +01:00
|
|
|
geocoding_provider: 'https://nominatim.openstreetmap.org/search',
|
2022-12-02 11:25:43 +01:00
|
|
|
geocoding_countrycodes: [],
|
|
|
|
tilelayer_provider: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
|
|
|
tilelayer_provider_attribution: "<a target=\"_blank\" href=\"http://osm.org/copyright\">OpenStreetMap</a> contributors",
|
2019-12-04 00:50:15 +01:00
|
|
|
enable_federation: true,
|
|
|
|
enable_resources: false,
|
2020-03-14 18:45:20 +01:00
|
|
|
hide_boosts: true,
|
2020-03-18 10:11:24 +01:00
|
|
|
enable_trusted_instances: true,
|
2020-08-05 17:08:01 +02:00
|
|
|
trusted_instances: [],
|
2021-10-21 16:18:41 +02:00
|
|
|
'theme.is_dark': true,
|
Squashed commit of the following:
commit f31e7ae2c1d47c1db747f00bc6bbeb1ba2ad2841
Author: joenepraat <joenepraat@posteo.org>
Date: Thu Mar 30 13:17:01 2023 +0000
Translated using Weblate (Dutch)
Currently translated at 94.5% (297 of 314 strings)
Translation: Gancio/Web
Translate-URL: https://hosted.weblate.org/projects/gancio/web/nl/
commit 96486b59458a53e192a205426ae2aa504c545d23
Author: lesion <lesion@autistici.org>
Date: Thu Mar 30 11:18:39 2023 +0200
minor
commit 9524fd52f318d7774ccabac1a3f2532e51c0d796
Author: lesion <lesion@autistici.org>
Date: Thu Mar 30 00:08:27 2023 +0200
update changelog, releasing v1.6.8
commit df4ec691288f3ecc0394f49f44e2778b05e2d5a3
Author: lesion <lesion@autistici.org>
Date: Wed Mar 29 12:41:52 2023 +0200
force vuetify to not use google fonts
commit e35595df82f7a76ba6957d853893e4703904a434
Author: lesion <lesion@autistici.org>
Date: Tue Mar 28 21:54:06 2023 +0200
layout
commit ee8a9843b304012d33d0dc4071df6733e7dc9dce
Author: lesion <lesion@autistici.org>
Date: Tue Mar 28 21:48:26 2023 +0200
minor
commit 2608761a447dd26a0784f2aa04f8f510285a4e65
Author: lesion <lesion@autistici.org>
Date: Tue Mar 28 19:04:49 2023 +0200
update deps
commit d7c8de7580295cda6807f4f828c58b532cc82f62
Author: lesion <lesion@autistici.org>
Date: Tue Mar 28 19:04:41 2023 +0200
minor
commit 6b55ba17089d036a9fb3fef2a40c04528fb27d53
Author: lesion <lesion@autistici.org>
Date: Tue Mar 28 19:04:16 2023 +0200
use new luxon in rss template, fixing locale and timezone #254
commit fc52107bd9b88bbba3f846e59b605b30d32d6457
Author: lesion <lesion@autistici.org>
Date: Tue Mar 28 19:02:08 2023 +0200
use luxon instead of dayjs server side too
commit f5604a03bc5bb879a40a3602cb2d2da476d70477
Author: lesion <lesion@autistici.org>
Date: Tue Mar 28 18:55:57 2023 +0200
unit test for recurrent events
commit 3e81d1dfb3c031b84b168a8b60a6b3117fef7081
Merge: f960400 e750fc8
Author: lesion <lesion@autistici.org>
Date: Tue Mar 28 18:51:34 2023 +0200
Merge remote-tracking branch 'weblate/master'
commit f96040008575f53e6a21fbecaf2049594898e625
Author: lesion <lesion@autistici.org>
Date: Mon Mar 27 17:19:27 2023 +0200
improve index/tag/place layout
commit 0682feaaf8f85beb006eedbd51e07c4cc0b467fe
Author: lesion <lesion@autistici.org>
Date: Mon Mar 27 17:18:57 2023 +0200
minor with theme admin colors
commit e750fc8e8132f13f56b51d6d57b5c6442fc2723a
Author: josé m <correoxm@disroot.org>
Date: Sun Mar 26 07:48:06 2023 +0000
Translated using Weblate (Galician)
Currently translated at 100.0% (314 of 314 strings)
Translation: Gancio/Web
Translate-URL: https://hosted.weblate.org/projects/gancio/web/gl/
commit 4c74fd322752f92f3d810773bf3778d684ee36e8
Author: gallegonovato <fran-carro@hotmail.es>
Date: Sat Mar 25 11:23:48 2023 +0000
Translated using Weblate (Spanish)
Currently translated at 100.0% (314 of 314 strings)
Translation: Gancio/Web
Translate-URL: https://hosted.weblate.org/projects/gancio/web/es/
commit 428a94290f49eefb8dede27e73ef1ed836c455cf
Author: joenepraat <joenepraat@posteo.org>
Date: Thu Mar 23 15:15:58 2023 +0000
Translated using Weblate (Dutch)
Currently translated at 95.5% (299 of 313 strings)
Translation: Gancio/Web
Translate-URL: https://hosted.weblate.org/projects/gancio/web/nl/
commit 373f78cd4e72b935f2b9b53755b2fea6f319dcc9
Author: joenepraat <joenepraat@posteo.org>
Date: Thu Mar 23 17:47:21 2023 +0000
Translated using Weblate (Dutch)
Currently translated at 7.6% (1 of 13 strings)
Translation: Gancio/Email
Translate-URL: https://hosted.weblate.org/projects/gancio/email/nl/
commit 2d11d88e8fd61b5732ed43c815d2c02d4471fbad
Merge: ea3066c e2fd5f8
Author: lesion <lesion@autistici.org>
Date: Sat Mar 25 09:34:44 2023 +0100
Merge remote-tracking branch 'weblate/master'
commit e2fd5f8b933bf5354da1b71d50236b55c7415a8b
Author: joenepraat <joenepraat@posteo.org>
Date: Thu Mar 23 15:15:58 2023 +0000
Translated using Weblate (Dutch)
Currently translated at 95.5% (299 of 313 strings)
Translation: Gancio/Web
Translate-URL: https://hosted.weblate.org/projects/gancio/web/nl/
commit 8280eb7c7a55335a596f75c196a5ccfb35ad5942
Author: joenepraat <joenepraat@posteo.org>
Date: Thu Mar 23 17:47:21 2023 +0000
Translated using Weblate (Dutch)
Currently translated at 7.6% (1 of 13 strings)
Translation: Gancio/Email
Translate-URL: https://hosted.weblate.org/projects/gancio/email/nl/
commit ea3066c34e97117a42cb4e7269af4ee8361bc01b
Author: lesion <lesion@autistici.org>
Date: Fri Mar 24 16:03:08 2023 +0100
people could choose custom colors
commit 8149ea23daa4aa04ef804c64cb5c82e21594bdcb
Author: lesion <lesion@autistici.org>
Date: Wed Mar 22 15:39:02 2023 +0100
moving vuetify configuration to "middleware"
commit 7e6130155a8732eb4cfbe1c7a61b9218b32fd9a9
Author: lesion <lesion@autistici.org>
Date: Fri Mar 10 21:58:02 2023 +0100
start with custom color
commit e2b07a06bdee2f2598cf8b23bddd5a6543a35f52
Author: lesion <lesion@autistici.org>
Date: Thu Mar 23 13:11:15 2023 +0100
release WPGancio 1.7
commit b91774ac39fd0f79aca792792fa4671a07e3bfd1
Author: lesion <lesion@autistici.org>
Date: Thu Mar 23 13:09:10 2023 +0100
fix tags merge in wp plugin and end_datetime
commit c8493d0810072314dce869f9c81b6cfba5d0921b
Author: lesion <lesion@autistici.org>
Date: Wed Mar 22 18:45:48 2023 +0100
use new $time plugin instead of filters, fix #252
commit 780938ef915d162608fb251a37d0bcc1400248a6
Author: lesion <lesion@autistici.org>
Date: Wed Mar 22 16:51:02 2023 +0100
v1.6.7
commit 442f88f3221e0d5856aeb3a096c781135e68ef56
Author: lesion <lesion@autistici.org>
Date: Wed Mar 22 16:49:37 2023 +0100
minor
commit 9f90df2bfc82c2a3a77b3ed64152205e9e1eb73c
Author: lesion <lesion@autistici.org>
Date: Wed Mar 22 16:24:08 2023 +0100
v.1.6.6
commit 71fdeb6ff8c4099d6a0def1bf31ccd542f76378e
Author: lesion <lesion@autistici.org>
Date: Wed Mar 22 16:17:02 2023 +0100
some old event was flagged has multidate but without an end_datetime?
fix #245
commit e6977368c53be5c167a560083d276ccbab6b9b55
Author: lesion <lesion@autistici.org>
Date: Wed Mar 22 13:41:50 2023 +0100
revert Intl, node is not ready, fix #250
commit eb2bf3216222b80edcfd8fb941b4dd2a4ea43d6e
Author: lesion <lesion@autistici.org>
Date: Tue Mar 21 16:47:47 2023 +0100
release v1.6.5
commit 0ebb46763002e57d0fd497c21c84c62631333831
Author: lesion <lesion@autistici.org>
Date: Tue Mar 21 01:15:35 2023 +0100
minor
commit 934466b2ecb83f5181bf4d5dde57eb995f7c7cb4
Author: lesion <lesion@autistici.org>
Date: Mon Mar 20 21:09:58 2023 +0100
add modules in package
commit ec62ad9ba8365668a4ffa3a801468f709a5e738b
Author: lesion <lesion@autistici.org>
Date: Mon Mar 20 21:09:43 2023 +0100
v-lazy in collection page too
commit d9f093fdbb2f90d0907d3edab3ad8fb969aef627
Author: lesion <lesion@autistici.org>
Date: Mon Mar 20 12:55:17 2023 +0100
releasing v1.6.5
commit 2ffd2aff82ecec259395a7f1b847bf4b186b9f7f
Author: lesion <lesion@autistici.org>
Date: Mon Mar 20 12:53:41 2023 +0100
enable task manager in dev mode
commit 02f138e0f2b1940abf982ab6187e68ef049b3f5d
Author: lesion <lesion@autistici.org>
Date: Mon Mar 20 12:40:39 2023 +0100
update CHANGELOG
commit b8e096ee399b43832bc7938cd46bd534f0affb1c
Author: lesion <lesion@autistici.org>
Date: Mon Mar 20 12:40:19 2023 +0100
minor with 2w recurrent event frequency
commit 8f221fb69cd4f7d1667e4435f6780a22a5903ae8
Author: lesion <lesion@autistici.org>
Date: Sun Mar 19 23:33:55 2023 +0100
minor
commit 079bcd4af2b01ceaeb1c643f5fde7024563c2337
Merge: 99d78e2 ae990fc
Author: lesion <lesion@autistici.org>
Date: Sun Mar 19 23:28:44 2023 +0100
Merge remote-tracking branch 'sedum/feat/ssr-proxy'
commit 99d78e2492411652284363b9bac50c1c920ee813
Author: lesion <lesion@autistici.org>
Date: Sun Mar 19 23:26:57 2023 +0100
Squashed commit of the following:
commit 5c0d380740c24e0467cef916fd0560cb26409f9f
Author: lesion <lesion@autistici.org>
Date: Sun Mar 19 23:22:25 2023 +0100
update yarn.lock
commit 909ee71ecb8f27e4fba72430aecc92bf527e6cd4
Author: lesion <lesion@autistici.org>
Date: Sun Mar 19 23:22:09 2023 +0100
Squashed commit of the following:
commit fc8a9f4506264c93d97bb746389a5d74ffb866ec
Author: lesion <lesion@autistici.org>
Date: Tue Mar 14 16:42:24 2023 +0100
address some issues with recurrent events, fix #247
commit f7357666ca79809fe36967dc95f1f19c223c7b0d
Author: lesion <lesion@autistici.org>
Date: Tue Mar 14 16:16:52 2023 +0100
fix event import from URL
commit e1bca6f46ad602085a99c8551607ac044f2c000c
Author: lesion <lesion@autistici.org>
Date: Tue Mar 14 16:15:42 2023 +0100
add Duch (nl) locale (thanks @jeoenepraat)
commit 5f8afdbc12474bd8833e7a248a273cd480e8e8d7
Merge: 57a052a 92ca5ab
Author: lesion <lesion@autistici.org>
Date: Tue Mar 14 11:39:50 2023 +0100
Merge remote-tracking branch 'weblate/master'
commit 57a052a7fa6b598a797de5a1cb66fd70408ea14b
Merge: 63d1d2e 55137d2
Author: lesion <lesion@autistici.org>
Date: Tue Mar 14 11:39:33 2023 +0100
Merge commit '55137d2ac23549e633f36ad10139fd4168c2645f'
commit 92ca5abf5e5d05f0cff5c610800eb0eb9017fe11
Author: joenepraat <joenepraat@posteo.org>
Date: Fri Mar 10 23:16:32 2023 +0000
Translated using Weblate (Dutch)
Currently translated at 68.3% (214 of 313 strings)
Translation: Gancio/Web
Translate-URL: https://hosted.weblate.org/projects/gancio/web/nl/
commit 63d1d2ee53615f8e72936b226d7b1ec75712f718
Author: lesion <lesion@autistici.org>
Date: Thu Mar 9 21:41:06 2023 +0100
minor
commit d2759a55a58ceb79f30e79c3f3a4efdbd6851ed2
Author: lesion <lesion@autistici.org>
Date: Thu Mar 9 21:38:39 2023 +0100
wrong user / admin merge dark theme settings - fix #244
commit b401d829dbb4733dd21a98e4fee7aec9ce21200f
Author: lesion <lesion@autistici.org>
Date: Thu Mar 9 21:24:45 2023 +0100
remove a small warning
commit ccffe5f7b0d117a84fbe23737d1bc844866de82c
Author: lesion <lesion@autistici.org>
Date: Fri Feb 24 11:40:36 2023 +0100
push tags on release
commit 55137d2ac23549e633f36ad10139fd4168c2645f
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu Feb 23 23:56:16 2023 +0000
Bump sequelize from 6.28.0 to 6.29.0
Bumps [sequelize](https://github.com/sequelize/sequelize) from 6.28.0 to 6.29.0.
- [Release notes](https://github.com/sequelize/sequelize/releases)
- [Commits](https://github.com/sequelize/sequelize/compare/v6.28.0...v6.29.0)
---
updated-dependencies:
- dependency-name: sequelize
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
commit b654f29d8bf0fb56e2ca3ed53448bd08a1028fc4
Author: lesion <lesion@autistici.org>
Date: Wed Feb 22 13:21:17 2023 +0100
update changelog
commit 0cd1ee9d891a5feb1384751149dd56f401f3a348
Author: lesion <lesion@autistici.org>
Date: Wed Feb 22 13:17:29 2023 +0100
increase rate limit max requests per minutes
commit b6dafc082e76276c924c349a60642e070b1eea4e
Author: lesion <lesion@autistici.org>
Date: Wed Feb 22 08:45:39 2023 +0100
minor
commit 0fa7769844f0feecaf9676ecebdcb20dc5754fd4
Author: lesion <lesion@autistici.org>
Date: Wed Feb 22 08:45:18 2023 +0100
location saving is not working when geocoding is disabled, fix #238
commit 07f9e2d9eeed7fe1855b49ea6c4b776afe10f15a
Author: lesion <lesion@autistici.org>
Date: Wed Feb 22 08:33:40 2023 +0100
really fix #232
commit bae930799e7c62e7841af8031d94bf9c6feb98c9
Author: lesion <lesion@autistici.org>
Date: Wed Feb 22 08:33:09 2023 +0100
downgrade mariadb (sequelize is not ready)
commit d733d7fef1c2ebffb4f6ae42461a9a874c5c5d7f
Author: lesion <lesion@autistici.org>
Date: Wed Feb 22 00:16:28 2023 +0100
aargh
commit 98b22aad70b9c077e0caabad08585b8ae7418b13
Author: lesion <lesion@autistici.org>
Date: Tue Feb 21 00:56:06 2023 +0100
minor
commit fc098b603de7245f16811e63d48ee323ecbb7e1a
Author: lesion <lesion@autistici.org>
Date: Tue Feb 21 00:55:44 2023 +0100
missing i18n in setup, fix #239
commit 3eaf72af197d909471e63071f0780ba64e259ffb
Merge: bba196b d6c6034
Author: lesion <lesion@autistici.org>
Date: Mon Feb 20 21:17:37 2023 +0100
Merge remote-tracking branch 'weblate/master'
commit bba196b0682def503cfb2dce01454aabc3868188
Author: lesion <lesion@autistici.org>
Date: Sat Feb 18 00:05:52 2023 +0100
update changelog, v1.6.3
commit bb9f7cca47625d92a63d5d6d81029afeb0c129e6
Author: lesion <lesion@autistici.org>
Date: Sat Feb 18 00:04:28 2023 +0100
minor
commit 80d2dbd06bb5948086acd3d848d291d5b5b7522a
Author: lesion <lesion@autistici.org>
Date: Fri Feb 17 23:40:28 2023 +0100
minor
commit d6c6034630b96f518e0040d86e0a4def74d1d813
Author: fadelkon <fadelkon@posteo.net>
Date: Thu Feb 16 22:09:23 2023 +0000
Translated using Weblate (Catalan)
Currently translated at 100.0% (313 of 313 strings)
Translation: Gancio/Web
Translate-URL: https://hosted.weblate.org/projects/gancio/web/ca/
commit d125cf1506e901a6a494a66961557d9181b8e320
Author: lesion <lesion@autistici.org>
Date: Fri Feb 17 21:56:31 2023 +0100
set a default user_locale path
commit 4367960a6218b7d59f881a6934a43e1d1840822b
Merge: c8cc5c6 87dd179
Author: lesion <lesion@autistici.org>
Date: Tue Feb 7 17:46:58 2023 +0100
Merge branch 'master' into gh
commit c8cc5c6c97d3a3fd9a03f04eca1f20880593a896
Merge: 88e0c90 550e221
Author: lesion <lesion@autistici.org>
Date: Mon Jan 9 17:15:21 2023 +0100
Merge branch 'master' into gh
commit 88e0c90a66f30b815b09f4c75819bfdbc994c30c
Merge: 421aa12 f212ac1
Author: lesion <lesion@autistici.org>
Date: Thu Dec 15 09:54:41 2022 +0100
Merge branch 'master' into gh
commit 421aa12781e25a6415985f986645fb2995d6e413
Merge: 5f6cc46 b3488e7
Author: lesion <lesion@autistici.org>
Date: Wed Sep 28 12:26:08 2022 +0200
Merge branch 'master' into gh
commit 5f6cc46cdcf7d857541cf6583698cce49366d10e
Merge: b66feb9 171d968
Author: lesion <lesion@autistici.org>
Date: Mon Aug 8 00:08:12 2022 +0200
Merge branch 'master' into gh
commit b66feb92e27be821df4ecd9b992e4e98168fdce8
Merge: 80c55d5 05d068f
Author: lesion <lesion@autistici.org>
Date: Tue Jun 21 23:48:40 2022 +0200
Merge branch 'master' into gh
commit 80c55d5601c40f32f59107cc2b374590ce18e3d7
Merge: 814090e a154fdf
Author: lesion <lesion@autistici.org>
Date: Mon Jun 6 17:27:00 2022 +0200
Merge branch 'master' into gh
commit 814090e9b671a1a8c39e111e7a5e27b8d142f937
Merge: 616c542 2e3aba9
Author: lesion <lesion@autistici.org>
Date: Mon Jun 6 17:19:31 2022 +0200
Merge branch 'master' into gh
commit 616c54229a59885dd071b095802ab270660a88de
Merge: e4cb22e 82dcaf9
Author: lesion <lesion@autistici.org>
Date: Mon Jun 6 16:57:05 2022 +0200
Merge branch 'master' into gh
commit e4cb22ee33e76c4aa9002a94b1dc9a38e9c558cf
Merge: 5dddfbd 8657937
Author: lesion <lesion@autistici.org>
Date: Fri Mar 11 23:41:22 2022 +0100
Merge branch 'master' into gh
commit 5dddfbd29e0ca00ed33663f18d80df5f1e96e194
Merge: 60e9d95 10c6b0d
Author: lesion <lesion@autistici.org>
Date: Fri Mar 11 23:22:12 2022 +0100
Merge branch 'master' into gh
commit 60e9d95ba83037822c00817a0c628fa8b5c025f6
Merge: 79445ca ad93f83
Author: lesion <lesion@autistici.org>
Date: Tue Dec 7 01:35:18 2021 +0100
Merge branch 'master' into gh
commit 79445ca8a70ffe9e426750d55ad4a0197b144730
Merge: 9472d8d cd313ef
Author: les <lesion@autistici.org>
Date: Thu Jun 24 21:52:25 2021 +0200
Merge branch 'master' into gh
commit 9472d8d919face015065209047247d08c18b4895
Merge: f960149 9e9643e
Author: les <lesion@autistici.org>
Date: Fri Mar 26 22:27:41 2021 +0100
Merge branch 'dev' into gh
commit f9601492dc37681b2e07399811d8a3a7d38ca3e6
Author: les <lesion@autistici.org>
Date: Fri Dec 6 11:30:41 2019 +0100
update dependencies
commit f8c7fa2b45b62cd0d339227b8a69e6d951661faf
Author: les <lesion@autistici.org>
Date: Fri Dec 6 11:41:13 2019 +0100
minor
commit 33ca266535c28da14c9de57eb4aa12ad2e527d36
Author: les <lesion@autistici.org>
Date: Fri Dec 6 11:38:15 2019 +0100
prepare gh as a mirror
commit 5c8875411631048210eb50030e83cb272a40d54a
Author: lesion <lesion@autistici.org>
Date: Sun Mar 19 23:18:40 2023 +0100
update deps
commit 7eac4fce324a6e75cdda296d672317cf2497c005
Author: lesion <lesion@autistici.org>
Date: Sun Mar 19 23:18:25 2023 +0100
refactoring event detail page
commit dc9ca88bc62708b869be3f3efe51d9155fe17830
Author: lesion <lesion@autistici.org>
Date: Sun Mar 19 23:17:35 2023 +0100
show hide boosts/bookmarks, fix #241
commit d4a25b1dd0b9404e0de7ca5cf546f0d29bc8943e
Author: lesion <lesion@autistici.org>
Date: Sun Mar 19 23:13:58 2023 +0100
minor with unixFormat
commit 239d6bcab19ef3cf53d1b2544a5c9a36ba8dd25b
Author: lesion <lesion@autistici.org>
Date: Sun Mar 19 23:12:25 2023 +0100
minor
commit b149f980db8245c12a6940997be6d5657bddf829
Author: lesion <lesion@autistici.org>
Date: Sun Mar 19 23:12:05 2023 +0100
minor
commit 6f2955c584ec9da2c10991fb09ab57735a31385d
Author: lesion <lesion@autistici.org>
Date: Sun Mar 19 23:11:49 2023 +0100
minor
commit dd586c38c9ef2f0b408ef90eb27dffe53355305a
Author: lesion <lesion@autistici.org>
Date: Sun Mar 19 23:11:31 2023 +0100
minor on style
commit 544823717b9801e63bef15394b25bfbcd842c10f
Author: lesion <lesion@autistici.org>
Date: Sun Mar 19 23:11:15 2023 +0100
fix multidate issue, go to event on save
commit 9ef0c75d03ee2d69f89034b28d6991f85ffefb06
Author: lesion <lesion@autistici.org>
Date: Sun Mar 19 23:09:47 2023 +0100
use v-lazy, improve search, full tag/place events
commit ac91072b79960815e0535e63ac45e0b5c6100764
Author: lesion <lesion@autistici.org>
Date: Sun Mar 19 22:47:51 2023 +0100
increase DDOS limiter to 250 req/min
commit d0ca92efb4afe48d2fd236083d9e290ab8d49704
Author: lesion <lesion@autistici.org>
Date: Sun Mar 19 22:47:14 2023 +0100
update changelog
commit 2d54f19225acc4118d60ef8c9d12f9495e6776ca
Author: lesion <lesion@autistici.org>
Date: Sun Mar 19 22:46:51 2023 +0100
use luxon instead of dayjs, new $time plugin
commit ae990fc3701db9b872725a561575c46fc9d7b425
Author: sedum <sedum@oziosi.org>
Date: Thu Mar 16 17:29:48 2023 +0100
add support for server side http proxy, close #240
commit fc8a9f4506264c93d97bb746389a5d74ffb866ec
Author: lesion <lesion@autistici.org>
Date: Tue Mar 14 16:42:24 2023 +0100
address some issues with recurrent events, fix #247
commit f7357666ca79809fe36967dc95f1f19c223c7b0d
Author: lesion <lesion@autistici.org>
Date: Tue Mar 14 16:16:52 2023 +0100
fix event import from URL
commit e1bca6f46ad602085a99c8551607ac044f2c000c
Author: lesion <lesion@autistici.org>
Date: Tue Mar 14 16:15:42 2023 +0100
add Duch (nl) locale (thanks @jeoenepraat)
commit 5f8afdbc12474bd8833e7a248a273cd480e8e8d7
Merge: 57a052a 92ca5ab
Author: lesion <lesion@autistici.org>
Date: Tue Mar 14 11:39:50 2023 +0100
Merge remote-tracking branch 'weblate/master'
commit 57a052a7fa6b598a797de5a1cb66fd70408ea14b
Merge: 63d1d2e 55137d2
Author: lesion <lesion@autistici.org>
Date: Tue Mar 14 11:39:33 2023 +0100
Merge commit '55137d2ac23549e633f36ad10139fd4168c2645f'
commit 92ca5abf5e5d05f0cff5c610800eb0eb9017fe11
Author: joenepraat <joenepraat@posteo.org>
Date: Fri Mar 10 23:16:32 2023 +0000
Translated using Weblate (Dutch)
Currently translated at 68.3% (214 of 313 strings)
Translation: Gancio/Web
Translate-URL: https://hosted.weblate.org/projects/gancio/web/nl/
commit 63d1d2ee53615f8e72936b226d7b1ec75712f718
Author: lesion <lesion@autistici.org>
Date: Thu Mar 9 21:41:06 2023 +0100
minor
commit d2759a55a58ceb79f30e79c3f3a4efdbd6851ed2
Author: lesion <lesion@autistici.org>
Date: Thu Mar 9 21:38:39 2023 +0100
wrong user / admin merge dark theme settings - fix #244
commit b401d829dbb4733dd21a98e4fee7aec9ce21200f
Author: lesion <lesion@autistici.org>
Date: Thu Mar 9 21:24:45 2023 +0100
remove a small warning
commit 55137d2ac23549e633f36ad10139fd4168c2645f
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu Feb 23 23:56:16 2023 +0000
Bump sequelize from 6.28.0 to 6.29.0
Bumps [sequelize](https://github.com/sequelize/sequelize) from 6.28.0 to 6.29.0.
- [Release notes](https://github.com/sequelize/sequelize/releases)
- [Commits](https://github.com/sequelize/sequelize/compare/v6.28.0...v6.29.0)
---
updated-dependencies:
- dependency-name: sequelize
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
commit 4367960a6218b7d59f881a6934a43e1d1840822b
Merge: c8cc5c6 87dd179
Author: lesion <lesion@autistici.org>
Date: Tue Feb 7 17:46:58 2023 +0100
Merge branch 'master' into gh
commit c8cc5c6c97d3a3fd9a03f04eca1f20880593a896
Merge: 88e0c90 550e221
Author: lesion <lesion@autistici.org>
Date: Mon Jan 9 17:15:21 2023 +0100
Merge branch 'master' into gh
commit 88e0c90a66f30b815b09f4c75819bfdbc994c30c
Merge: 421aa12 f212ac1
Author: lesion <lesion@autistici.org>
Date: Thu Dec 15 09:54:41 2022 +0100
Merge branch 'master' into gh
commit 421aa12781e25a6415985f986645fb2995d6e413
Merge: 5f6cc46 b3488e7
Author: lesion <lesion@autistici.org>
Date: Wed Sep 28 12:26:08 2022 +0200
Merge branch 'master' into gh
commit 5f6cc46cdcf7d857541cf6583698cce49366d10e
Merge: b66feb9 171d968
Author: lesion <lesion@autistici.org>
Date: Mon Aug 8 00:08:12 2022 +0200
Merge branch 'master' into gh
commit b66feb92e27be821df4ecd9b992e4e98168fdce8
Merge: 80c55d5 05d068f
Author: lesion <lesion@autistici.org>
Date: Tue Jun 21 23:48:40 2022 +0200
Merge branch 'master' into gh
commit 80c55d5601c40f32f59107cc2b374590ce18e3d7
Merge: 814090e a154fdf
Author: lesion <lesion@autistici.org>
Date: Mon Jun 6 17:27:00 2022 +0200
Merge branch 'master' into gh
commit 814090e9b671a1a8c39e111e7a5e27b8d142f937
Merge: 616c542 2e3aba9
Author: lesion <lesion@autistici.org>
Date: Mon Jun 6 17:19:31 2022 +0200
Merge branch 'master' into gh
commit 616c54229a59885dd071b095802ab270660a88de
Merge: e4cb22e 82dcaf9
Author: lesion <lesion@autistici.org>
Date: Mon Jun 6 16:57:05 2022 +0200
Merge branch 'master' into gh
commit e4cb22ee33e76c4aa9002a94b1dc9a38e9c558cf
Merge: 5dddfbd 8657937
Author: lesion <lesion@autistici.org>
Date: Fri Mar 11 23:41:22 2022 +0100
Merge branch 'master' into gh
commit 5dddfbd29e0ca00ed33663f18d80df5f1e96e194
Merge: 60e9d95 10c6b0d
Author: lesion <lesion@autistici.org>
Date: Fri Mar 11 23:22:12 2022 +0100
Merge branch 'master' into gh
commit 60e9d95ba83037822c00817a0c628fa8b5c025f6
Merge: 79445ca ad93f83
Author: lesion <lesion@autistici.org>
Date: Tue Dec 7 01:35:18 2021 +0100
Merge branch 'master' into gh
commit 79445ca8a70ffe9e426750d55ad4a0197b144730
Merge: 9472d8d cd313ef
Author: les <lesion@autistici.org>
Date: Thu Jun 24 21:52:25 2021 +0200
Merge branch 'master' into gh
commit 9472d8d919face015065209047247d08c18b4895
Merge: f960149 9e9643e
Author: les <lesion@autistici.org>
Date: Fri Mar 26 22:27:41 2021 +0100
Merge branch 'dev' into gh
commit f9601492dc37681b2e07399811d8a3a7d38ca3e6
Author: les <lesion@autistici.org>
Date: Fri Dec 6 11:30:41 2019 +0100
update dependencies
commit f8c7fa2b45b62cd0d339227b8a69e6d951661faf
Author: les <lesion@autistici.org>
Date: Fri Dec 6 11:41:13 2019 +0100
minor
commit 33ca266535c28da14c9de57eb4aa12ad2e527d36
Author: les <lesion@autistici.org>
Date: Fri Dec 6 11:38:15 2019 +0100
prepare gh as a mirror
2023-04-03 16:39:26 +02:00
|
|
|
dark_colors: { primary: '#FF6E40', error: '#FF5252', info: '#2196F3', success: '#4CAF50', warning: '#FB8C00' },
|
|
|
|
light_colors: { primary: '#FF4500', error: '#FF5252', info: '#2196F3', success: '#4CAF50', warning: '#FB8C00' },
|
2022-11-21 00:52:02 +01:00
|
|
|
trusted_instances_label: '',
|
2022-11-09 10:17:52 +01:00
|
|
|
hide_thumbs: false,
|
|
|
|
hide_calendar: false,
|
2020-08-05 17:08:01 +02:00
|
|
|
footerLinks: [
|
2022-11-25 09:47:46 +01:00
|
|
|
{ href: '/', label: 'common.home' },
|
|
|
|
{ href: '/about', label: 'common.about' }
|
2021-09-30 11:13:44 +02:00
|
|
|
],
|
2022-07-15 20:42:27 +02:00
|
|
|
plugins: [],
|
2021-10-18 15:46:38 +02:00
|
|
|
admin_email: config.admin_email || '',
|
2023-12-28 00:47:31 +01:00
|
|
|
smtp: config.smtp || {},
|
|
|
|
collection_in_home: null
|
2019-12-04 00:50:15 +01:00
|
|
|
}
|
|
|
|
|
2019-10-11 18:34:14 +02:00
|
|
|
/**
|
|
|
|
* Settings controller: store instance settings
|
|
|
|
*/
|
|
|
|
|
2019-04-03 00:25:12 +02:00
|
|
|
const settingsController = {
|
2019-06-25 01:05:38 +02:00
|
|
|
settings: { initialized: false },
|
2019-07-26 23:51:32 +02:00
|
|
|
user_locale: {},
|
2019-06-25 01:05:38 +02:00
|
|
|
secretSettings: {},
|
2019-06-06 23:54:32 +02:00
|
|
|
|
2019-12-04 00:50:15 +01:00
|
|
|
async load () {
|
2022-08-02 16:10:15 +02:00
|
|
|
if (config.status !== 'CONFIGURED') {
|
2021-09-27 10:42:17 +02:00
|
|
|
settingsController.settings = defaultSettings
|
|
|
|
return
|
|
|
|
}
|
2021-11-09 12:49:20 +01:00
|
|
|
if (settingsController.settings.initialized) return
|
|
|
|
settingsController.settings.initialized = true
|
|
|
|
// initialize instance settings from db
|
|
|
|
// note that this is done only once when the server starts
|
|
|
|
// and not for each request
|
2022-12-23 01:08:14 +01:00
|
|
|
const settings = await DB.Setting.findAll()
|
2021-11-09 12:49:20 +01:00
|
|
|
settingsController.settings = defaultSettings
|
|
|
|
settings.forEach(s => {
|
|
|
|
if (s.is_secret) {
|
|
|
|
settingsController.secretSettings[s.key] = s.value
|
|
|
|
} else {
|
|
|
|
settingsController.settings[s.key] = s.value
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
// add pub/priv instance key if needed
|
|
|
|
if (!settingsController.settings.publicKey) {
|
|
|
|
log.info('Instance priv/pub key not found, generating....')
|
|
|
|
const { publicKey, privateKey } = await generateKeyPair('rsa', {
|
|
|
|
modulusLength: 4096,
|
|
|
|
publicKeyEncoding: {
|
|
|
|
type: 'spki',
|
|
|
|
format: 'pem'
|
|
|
|
},
|
|
|
|
privateKeyEncoding: {
|
|
|
|
type: 'pkcs8',
|
|
|
|
format: 'pem'
|
2019-06-25 01:05:38 +02:00
|
|
|
}
|
|
|
|
})
|
2019-07-26 23:51:32 +02:00
|
|
|
|
2021-11-09 12:49:20 +01:00
|
|
|
await settingsController.set('publicKey', publicKey)
|
|
|
|
await settingsController.set('privateKey', privateKey, true)
|
|
|
|
}
|
2019-09-26 22:46:04 +02:00
|
|
|
|
2022-12-23 01:08:14 +01:00
|
|
|
const pluginController = require('./plugins')
|
2022-08-09 18:32:47 +02:00
|
|
|
pluginController._load()
|
2019-06-21 23:52:18 +02:00
|
|
|
},
|
|
|
|
|
2019-11-06 11:31:56 +01:00
|
|
|
async set (key, value, is_secret = false) {
|
2021-05-20 11:19:26 +02:00
|
|
|
log.info(`SET ${key} ${is_secret ? '*****' : value}`)
|
2019-06-21 23:52:18 +02:00
|
|
|
try {
|
2022-12-23 01:08:14 +01:00
|
|
|
const [setting, created] = await DB.Setting.findOrCreate({
|
2019-06-21 23:52:18 +02:00
|
|
|
where: { key },
|
|
|
|
defaults: { value, is_secret }
|
2019-04-03 00:25:12 +02:00
|
|
|
})
|
2020-07-06 00:52:32 +02:00
|
|
|
if (!created) { setting.update({ value, is_secret }) }
|
2019-11-06 11:31:56 +01:00
|
|
|
settingsController[is_secret ? 'secretSettings' : 'settings'][key] = value
|
2019-06-21 23:52:18 +02:00
|
|
|
return true
|
2019-11-06 11:31:56 +01:00
|
|
|
} catch (e) {
|
2021-07-08 20:41:56 +02:00
|
|
|
log.error('[SETTING SET]', e)
|
2019-06-21 23:52:18 +02:00
|
|
|
return false
|
|
|
|
}
|
2019-04-03 00:25:12 +02:00
|
|
|
},
|
|
|
|
|
2019-11-06 11:31:56 +01:00
|
|
|
async setRequest (req, res) {
|
2019-06-21 23:52:18 +02:00
|
|
|
const { key, value, is_secret } = req.body
|
|
|
|
const ret = await settingsController.set(key, value, is_secret)
|
2023-05-01 21:20:32 +02:00
|
|
|
|
|
|
|
// reload plugin when its settings change
|
|
|
|
if (key.startsWith('plugin_')) {
|
|
|
|
const pluginName = key.slice(7)
|
|
|
|
try {
|
|
|
|
const pluginController = require('./plugins')
|
|
|
|
pluginController.unloadPlugin(pluginName)
|
2023-12-31 14:18:03 +01:00
|
|
|
// Do not reload the plugin if the change in its settings was to disable it
|
2024-01-03 22:21:03 +01:00
|
|
|
if (value.enable) {
|
|
|
|
pluginController.loadPlugin(pluginName)
|
|
|
|
}
|
2023-05-01 21:20:32 +02:00
|
|
|
} catch (e) {
|
|
|
|
log.error(e)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-06 11:31:56 +01:00
|
|
|
if (ret) { res.sendStatus(200) } else { res.sendStatus(400) }
|
2019-06-21 23:52:18 +02:00
|
|
|
},
|
|
|
|
|
2021-10-18 15:46:38 +02:00
|
|
|
async testSMTP (req, res) {
|
|
|
|
const smtp = req.body
|
|
|
|
await settingsController.set('smtp', smtp.smtp)
|
|
|
|
const mail = require('../mail')
|
|
|
|
try {
|
2022-02-07 12:28:38 +01:00
|
|
|
await mail._send(settingsController.settings.admin_email, 'test')
|
|
|
|
|
2021-10-18 15:46:38 +02:00
|
|
|
return res.sendStatus(200)
|
|
|
|
} catch (e) {
|
|
|
|
console.error(e)
|
2022-02-07 12:28:38 +01:00
|
|
|
return res.status(400).send(escape(String(e)))
|
2021-10-18 15:46:38 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2022-07-18 10:05:59 +02:00
|
|
|
getSMTPSettings (_req, res) {
|
|
|
|
return res.json(settingsController['settings']['smtp'])
|
|
|
|
},
|
|
|
|
|
2022-07-29 11:30:15 +02:00
|
|
|
getAll (_req, res) {
|
|
|
|
return res.json(settingsController.settings)
|
|
|
|
},
|
|
|
|
|
2020-07-07 21:58:52 +02:00
|
|
|
setLogo (req, res) {
|
2020-02-01 22:39:31 +01:00
|
|
|
if (!req.file) {
|
2021-04-28 12:44:26 +02:00
|
|
|
settingsController.set('logo', false)
|
|
|
|
return res.status(200)
|
2020-02-01 22:39:31 +01:00
|
|
|
}
|
2020-07-05 23:53:37 +02:00
|
|
|
|
2020-07-28 12:24:39 +02:00
|
|
|
const uploadedPath = path.join(req.file.destination, req.file.filename)
|
|
|
|
const baseImgPath = path.resolve(config.upload_path, 'logo')
|
2020-07-07 21:58:52 +02:00
|
|
|
|
|
|
|
// convert and resize to png
|
2021-07-28 10:02:04 +02:00
|
|
|
return sharp(uploadedPath)
|
2020-07-07 21:58:52 +02:00
|
|
|
.resize(400)
|
|
|
|
.png({ quality: 90 })
|
2022-05-09 20:45:54 +02:00
|
|
|
.toFile(baseImgPath + '.png', (err) => {
|
2021-03-05 14:17:10 +01:00
|
|
|
if (err) {
|
2021-07-28 10:02:04 +02:00
|
|
|
log.error('[LOGO] ' + err)
|
2021-03-05 14:17:10 +01:00
|
|
|
}
|
2020-07-28 12:24:39 +02:00
|
|
|
settingsController.set('logo', baseImgPath)
|
2020-07-07 21:58:52 +02:00
|
|
|
res.sendStatus(200)
|
|
|
|
})
|
2022-10-28 12:01:59 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
setFallbackImage (req, res) {
|
|
|
|
if (!req.file) {
|
2022-11-09 10:17:52 +01:00
|
|
|
settingsController.set('fallback_image', false)
|
2022-10-28 12:01:59 +02:00
|
|
|
return res.status(200)
|
|
|
|
}
|
|
|
|
|
|
|
|
const uploadedPath = path.join(req.file.destination, req.file.filename)
|
|
|
|
const baseImgPath = path.resolve(config.upload_path, 'fallbackImage.png')
|
|
|
|
|
|
|
|
// convert and resize to png
|
|
|
|
return sharp(uploadedPath)
|
|
|
|
.resize(600)
|
|
|
|
.png({ quality: 99 })
|
|
|
|
.toFile(baseImgPath, (err) => {
|
|
|
|
if (err) {
|
|
|
|
log.error('[FALLBACK IMAGE] ' + err)
|
|
|
|
}
|
2022-11-09 10:17:52 +01:00
|
|
|
settingsController.set('fallback_image', baseImgPath)
|
|
|
|
res.sendStatus(200)
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
setHeaderImage (req, res) {
|
|
|
|
if (!req.file) {
|
|
|
|
settingsController.set('header_image', false)
|
|
|
|
return res.status(200)
|
|
|
|
}
|
|
|
|
|
|
|
|
const uploadedPath = path.join(req.file.destination, req.file.filename)
|
2022-12-13 16:01:11 +01:00
|
|
|
const baseImgPath = path.resolve(config.upload_path, 'headerImage.png')
|
2022-11-09 10:17:52 +01:00
|
|
|
|
|
|
|
// convert and resize to png
|
|
|
|
return sharp(uploadedPath)
|
|
|
|
.resize(600)
|
|
|
|
.png({ quality: 99 })
|
|
|
|
.toFile(baseImgPath, (err) => {
|
|
|
|
if (err) {
|
|
|
|
log.error('[HEADER IMAGE] ' + err)
|
|
|
|
}
|
|
|
|
settingsController.set('header_image', baseImgPath)
|
2022-10-28 12:01:59 +02:00
|
|
|
res.sendStatus(200)
|
|
|
|
})
|
2019-11-06 11:31:56 +01:00
|
|
|
}
|
2022-10-28 12:01:59 +02:00
|
|
|
|
2019-04-03 00:25:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = settingsController
|