Merge branch 'master' of framagit.org:/les/gancio into feat/whereinputadvanced_rebased_merge
This commit is contained in:
commit
3dc975465f
12 changed files with 537 additions and 473 deletions
16
CHANGELOG
16
CHANGELOG
|
@ -1,5 +1,21 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
|
||||
### 1.6.3 - 17 feb '23
|
||||
- visitors could now choose to view images or not / dark theme or not
|
||||
- i18n refactoring, locale loaders, custom strings, fix #231
|
||||
- introduce a new instance api limiter
|
||||
- hide search filters when none is allowed
|
||||
- add instance timezone and AP actor to nodeinfo
|
||||
- event api path is now /api/event/detail/
|
||||
- fix tag in rss export
|
||||
- fix fbclid param removal in url sanitizer
|
||||
- fix ics validation
|
||||
- rows now breaks correctly in description, fix #237
|
||||
- do not use hash as tags separator, fix #210
|
||||
- do not use end time when not used, fix #233
|
||||
- use timezone on selection, fix #232
|
||||
- fix ics link
|
||||
|
||||
### 1.6.2 - 12 jan '23
|
||||
- add swipe gesture to move to next/prev event
|
||||
- fix refresh collections, fix #219
|
||||
|
|
|
@ -7,6 +7,21 @@ nav_order: 10
|
|||
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
### 1.6.3 - 17 feb '23
|
||||
- visitors could now choose to view images or not / dark theme or not
|
||||
- i18n refactoring, locale loaders, custom strings, fix #231
|
||||
- introduce a new instance api limiter
|
||||
- hide search filters when none is allowed
|
||||
- add instance timezone and AP actor to nodeinfo
|
||||
- event api path is now /api/event/detail/
|
||||
- fix tag in rss export
|
||||
- fix fbclid param removal in url sanitizer
|
||||
- fix ics validation
|
||||
- rows now breaks correctly in description, fix #237
|
||||
- do not use hash as tags separator, fix #210
|
||||
- do not use end time when not used, fix #233
|
||||
- use timezone on selection, fix #232
|
||||
- fix ics link
|
||||
|
||||
### 1.6.2 - 12 jan '23
|
||||
- add swipe gesture to move to next/prev event
|
||||
|
|
|
@ -10,9 +10,11 @@ permalink: /
|
|||
|
||||
A shared agenda for local communities.
|
||||
{: .fs-6 }
|
||||
Last release **[1.6.3 - 17 Feb 2023](/changelog#163---17-feb-23)**
|
||||
|
||||
[Install]({% link install/install.md %}){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 } [Demo](https://demo.gancio.org){: .btn .btn-green .fs-5 .mb-4 .mb-md-0 }
|
||||
[Source](https://framagit.org/les/gancio){: .btn .fs-5 }
|
||||
[Install]({% link install/install.md %}){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 }
|
||||
[Demo](https://demo.gancio.org){: .btn .btn-green .fs-5 .mb-4 .mb-md-0 .mr-2 }
|
||||
[Source](https://framagit.org/les/gancio){: .btn .mb-4 .mb-md-0 .fs-5 }
|
||||
|
||||
|
||||
## Some relevant key features:
|
||||
|
|
|
@ -15,7 +15,7 @@ nav_order: 7
|
|||
- [balotta.org](https://balotta.org) (Bologna, Italy)
|
||||
- [gancio.daghe.xyz](https://gancio.daghe.xyz/) (Trento, Italy)
|
||||
- [bcn.convoca.la](https://bcn.convoca.la/) (Barcelona)
|
||||
- [mad.convoca.la](https://bcn.convoca.la/) (Madrid)
|
||||
- [mad.convoca.la](https://mad.convoca.la/) (Madrid)
|
||||
- [bonn.jetzt](https://bonn.jetzt/) (Digital-Events aus Bonn, Rhein-Sieg und der Region)
|
||||
- [quest.livellosegreto.it](https://quest.livellosegreto.it/)
|
||||
- [ezkerraldea.euskaragendak.eus](https://ezkerraldea.euskaragendak.eus/)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "gancio",
|
||||
"version": "1.6.2",
|
||||
"version": "1.6.3",
|
||||
"description": "A shared agenda for local communities",
|
||||
"author": "lesion",
|
||||
"scripts": {
|
||||
|
@ -61,14 +61,14 @@
|
|||
"linkify-html": "^4.0.2",
|
||||
"linkifyjs": "4.1.0",
|
||||
"lodash": "^4.17.21",
|
||||
"mariadb": "^3.0.1",
|
||||
"mariadb": "^3.1.0",
|
||||
"memory-cache": "^0.2.0",
|
||||
"microformat-node": "^2.0.1",
|
||||
"minify-css-string": "^1.0.0",
|
||||
"mkdirp": "^2.1.3",
|
||||
"multer": "^1.4.5-lts.1",
|
||||
"mysql2": "^2.3.3",
|
||||
"nuxt-edge": "2.16.1-27928821.5455c4a",
|
||||
"nuxt-edge": "2.17.0-27941778.c493723",
|
||||
"oauth2orize": "^1.11.1",
|
||||
"passport": "^0.6.0",
|
||||
"passport-anonymous": "^1.0.1",
|
||||
|
@ -91,7 +91,7 @@
|
|||
"vuetify": "2.6.14",
|
||||
"winston": "^3.8.2",
|
||||
"winston-daily-rotate-file": "^4.7.1",
|
||||
"yargs": "^17.5.0"
|
||||
"yargs": "^17.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nuxtjs/vuetify": "^1.12.3",
|
||||
|
|
|
@ -128,8 +128,8 @@ export default {
|
|||
data.event.place.latitude = event.place.latitude || ''
|
||||
data.event.place.longitude = event.place.longitude || ''
|
||||
data.event.locations = event.locations || []
|
||||
const from = dayjs.unix(event.start_datetime)
|
||||
const due = event.end_datetime && dayjs.unix(event.end_datetime)
|
||||
const from = dayjs.unix(event.start_datetime).tz()
|
||||
const due = event.end_datetime && dayjs.unix(event.end_datetime).tz()
|
||||
data.date = {
|
||||
recurrent: event.recurrent,
|
||||
from: from.toDate(),
|
||||
|
@ -253,12 +253,12 @@ export default {
|
|||
formData.append('description', this.event.description)
|
||||
formData.append('multidate', !!this.date.multidate)
|
||||
let [hour, minute] = this.date.fromHour.split(':')
|
||||
formData.append('start_datetime', dayjs(this.date.from).hour(Number(hour)).minute(Number(minute)).second(0).unix())
|
||||
formData.append('start_datetime', dayjs(this.date.from).hour(Number(hour)).minute(Number(minute)).second(0).tz().unix())
|
||||
if (this.date.dueHour) {
|
||||
[hour, minute] = this.date.dueHour.split(':')
|
||||
formData.append('end_datetime', dayjs(this.date.due).hour(Number(hour)).minute(Number(minute)).second(0).unix())
|
||||
formData.append('end_datetime', dayjs(this.date.due).hour(Number(hour)).minute(Number(minute)).second(0).tz().unix())
|
||||
} else if (!!this.date.multidate) {
|
||||
formData.append('end_datetime', dayjs(this.date.due).hour(24).minute(0).second(0).unix())
|
||||
formData.append('end_datetime', dayjs(this.date.due).hour(24).minute(0).second(0).tz().unix())
|
||||
}
|
||||
|
||||
if (this.edit) {
|
||||
|
|
|
@ -133,7 +133,7 @@ module.exports = () => {
|
|||
* @param {image} [image] - Image
|
||||
*/
|
||||
|
||||
// allow anyone to add an event (anon event has to be confirmed, TODO: flood protection)
|
||||
// allow anyone to add an event (anon event has to be confirmed, flood protection)
|
||||
api.post('/event', eventController.isAnonEventAllowed, SPAMProtectionApiRateLimiter, upload.single('image'), eventController.add)
|
||||
|
||||
// api.get('/event/search', eventController.search)
|
||||
|
|
|
@ -6,8 +6,8 @@ const next = (req, res, next) => next()
|
|||
const instanceApiRateLimiter = {
|
||||
|
||||
DDOSProtectionApiRateLimiter: (process.env.NODE_ENV === 'test' ? next : rateLimit({
|
||||
windowMs: 60 * 1000, // 5 minutes
|
||||
max: 100, // Limit each IP to 100 requests per `window` (here, per 5 minutes)
|
||||
windowMs: 60 * 1000, // 1 minutes
|
||||
max: 100, // Limit each IP to 100 requests per `window`
|
||||
standardHeaders: true, // Return rate limit info in the `RateLimit-*` headers
|
||||
legacyHeaders: false, // Disable the `X-RateLimit-*` headers
|
||||
handler: (request, response, next, options) => {
|
||||
|
@ -15,10 +15,13 @@ const instanceApiRateLimiter = {
|
|||
return response.status(options.statusCode).send(options.message)
|
||||
}
|
||||
})),
|
||||
|
||||
|
||||
|
||||
/** This is a limiter used to avoid spam
|
||||
* (used during the registration, pass recovery, posting events) */
|
||||
SPAMProtectionApiRateLimiter: (process.env.NODE_ENV === 'test' ? next : rateLimit({
|
||||
windowMs: 5 * 60 * 1000, // 10 minutes
|
||||
max: 3, // Limit each IP to 3 requests per `window` (here, per 15 minutes)
|
||||
windowMs: 5 * 60 * 1000, // 5 minutes
|
||||
max: 3, // Limit each IP to 3 requests per `window` (here, per 5 minutes)
|
||||
standardHeaders: true, // Return rate limit info in the `RateLimit-*` headers
|
||||
legacyHeaders: false, // Disable the `X-RateLimit-*` headers
|
||||
handler: (request, response, next, options) => {
|
||||
|
|
|
@ -61,7 +61,7 @@ const mail = {
|
|||
...locals,
|
||||
locale,
|
||||
config: { title: settings.title, baseurl: settings.baseurl, description: settings.description, admin_email: settings.admin_email },
|
||||
datetime: datetime => moment.unix(datetime).locale(locale).format('ddd, D MMMM HH:mm')
|
||||
datetime: datetime => moment.unix(datetime).tz().locale(locale).format('ddd, D MMMM HH:mm')
|
||||
}
|
||||
}
|
||||
return email.send(msg)
|
||||
|
|
|
@ -13,6 +13,7 @@ let config = {
|
|||
log_level: 'debug',
|
||||
log_path: path.resolve(process.env.cwd || '', 'logs'),
|
||||
db: {},
|
||||
user_locale: path.resolve(process.env.cwd || '', 'user_locale'),
|
||||
upload_path: path.resolve(process.env.cwd || '', 'uploads'),
|
||||
write (config_path= process.env.config_path || './config.json') {
|
||||
delete config.status
|
||||
|
|
|
@ -12,7 +12,7 @@ rss(version='2.0' xmlns:atom="http://www.w3.org/2005/Atom")
|
|||
title [#{moment.unix(event.start_datetime).format("YY-MM-DD")}] #{event.title} @ #{event.place.name}
|
||||
link #{settings.baseurl}/event/#{event.slug || event.id}
|
||||
each tag in event.tags
|
||||
category #{tag}
|
||||
category #{tag.tag}
|
||||
description
|
||||
| <![CDATA[
|
||||
| <h4>#{event.title}</h4>
|
||||
|
|
Loading…
Reference in a new issue