Merge branch 'master' of framagit.org:/les/gancio into feat/allowgeoloc

This commit is contained in:
sedum 2022-10-18 16:45:42 +02:00
commit dfd9a3d3b9
21 changed files with 920 additions and 933 deletions

View file

@ -1,5 +1,19 @@
All notable changes to this project will be documented in this file.
### 1.5.6 - 22 set '22
- update linkifyjs, sequelizem, nuxt deps
- improve homepage loading time
- restore removed icons
### 1.5.5 - 21 set '22
- fix #185 - wrong res.download api usage
- fix some dialog background on light theme
- update sequelize and remove live patch
- improve events filtering on selected day
- allow tags complete removals
- improve homepage performance
- docs: add scheme to nginx proxy configuration
### 1.5.4 - 6 set '22
- Update webcomponent deps
- Refactor datime display in webcomponent

View file

@ -1,13 +1,11 @@
import dayjs from 'dayjs'
export function attributesFromEvents(_events) {
// const colors = ['teal', 'green', 'yellow', 'teal', 'indigo', 'green', 'red', 'purple', 'pink', 'gray']
// merge events with same date
let attributes = []
const now = dayjs().unix()
for (let e of _events) {
const key = dayjs.unix(e.start_datetime).tz().format('YYYYMMDD')
const key = dayjs.unix(e.start_datetime).tz().format('MMDD') // Math.floor(e.start_datetime/(3600*24)) // dayjs.unix(e.start_datetime).tz().format('YYYYMMDD')
const c = (e.end_datetime || e.start_datetime) < now ? 'vc-past' : ''
if (e.multidate) {

View file

@ -9,7 +9,6 @@
@update:from-page='updatePage'
:locale='$i18n.locale'
:attributes='attributes'
:timezone='settings.instance_timezone'
transition='fade'
aria-label='Calendar'
is-expanded

View file

@ -16,52 +16,15 @@ v-card.h-event.event.d-flex(itemscope itemtype="https://schema.org/Event")
v-chip.ml-1.mt-1(v-for='tag in event.tags.slice(0, 6)' small :to='`/tag/${tag}`'
:key='tag' outlined color='primary') {{ tag }}
client-only
v-menu(offset-y eager)
template(v-slot:activator="{ on }")
v-btn.align-self-end(icon v-on='on' color='primary' title='more' aria-label='more')
v-icon(v-text='mdiDotsVertical')
v-list(dense)
v-list-item-group
v-list-item(@click='clipboard(`${settings.baseurl}/event/${event.slug || event.id}`)')
v-list-item-icon
v-icon(v-text='mdiContentCopy')
v-list-item-content
v-list-item-title {{ $t('common.copy_link') }}
v-list-item(:href='`/api/event/${event.slug || event.id}.ics`')
v-list-item-icon
v-icon(v-text='mdiCalendarExport')
v-list-item-content
v-list-item-title {{ $t('common.add_to_calendar') }}
v-list-item(v-if='is_mine' :to='`/add/${event.id}`')
v-list-item-icon
v-icon(v-text='mdiPencil')
v-list-item-content
v-list-item-title {{ $t('common.edit') }}
v-list-item(v-if='is_mine' @click='remove(false)')
v-list-item-icon
v-icon(color='error' v-text='mdiDeleteForever')
v-list-item-content
v-list-item-title {{ $t('common.remove') }}
template(#placeholder)
v-btn.align-self-end(icon color='primary' aria-label='more')
v-icon(v-text='mdiDotsVertical')
</template>
<script>
import { mapState } from 'vuex'
import clipboard from '../assets/clipboard'
import MyPicture from '~/components/MyPicture'
import {
mdiRepeat, mdiPencil, mdiDotsVertical, mdiContentCopy,
mdiCalendarExport, mdiDeleteForever, mdiCalendar, mdiMapMarker
} from '@mdi/js'
import { mdiRepeat, mdiCalendar, mdiMapMarker } from '@mdi/js'
export default {
data() {
return {
mdiRepeat, mdiPencil, mdiDotsVertical, mdiContentCopy, mdiCalendarExport,
mdiDeleteForever, mdiMapMarker, mdiCalendar
}
return { mdiRepeat, mdiMapMarker, mdiCalendar }
},
components: {
MyPicture
@ -70,27 +33,6 @@ export default {
event: { type: Object, default: () => ({}) },
lazy: Boolean
},
mixins: [clipboard],
computed: {
...mapState(['settings']),
is_mine() {
if (!this.$auth.user) {
return false
}
return (
this.event.userId === this.$auth.user.id || this.$auth.user.is_admin
)
}
},
methods: {
async remove() {
const ret = await this.$root.$confirm('event.remove_confirmation')
if (!ret) { return }
await this.$axios.delete(`/event/${this.event.id}`)
this.$emit('destroy', this.event.id)
this.$root.$message('admin.event_remove_ok')
}
}
computed: mapState(['settings'])
}
</script>

View file

@ -8,6 +8,20 @@ nav_order: 10
All notable changes to this project will be documented in this file.
### 1.5.6 - 22 set '22
- update linkifyjs, sequelizem, nuxt deps
- improve homepage loading time
- restore removed icons
### 1.5.5 - 21 set '22
- fix #185 - wrong res.download api usage
- fix some dialog background on light theme
- update sequelize and remove live patch
- improve events filtering on selected day
- allow tags complete removals
- improve homepage performance
- docs: add scheme to nginx proxy configuration
### 1.5.4 - 6 set '22
- Update webcomponent deps
- Refactor datime display in webcomponent

View file

@ -29,6 +29,8 @@ server {
location @proxy {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:13120;
}
}

View file

@ -19,8 +19,8 @@
"activate_user": "Bestätigt",
"password_updated": "Passwort geändert.",
"me": "Du",
"disable": "Deaktiviere",
"enable": "Aktiviere",
"disable": "Ausschalten",
"enable": "Einschalten",
"cancel": "Abbrechen",
"ok": "OK",
"new_user": "Neue nutzende Person",
@ -118,7 +118,7 @@
"new_collection": "Bubble anlegen",
"edit_collection": "Bubble bearbeiten",
"wrong_domain_warning": "Die \"baseurl\" die in config.json konfiguriert ist <b>({baseurl})</b> unterscheidet sich von derjenigen <b>({url})</b> die du besuchst",
"instance_place_help": "Diese Textzeile wird im Menü der anderen freundlichen Instanzen angezeigt",
"instance_place_help": "Diese Textzeile wird im Menü der anderen befreundeten Instanzen angezeigt",
"place_description": "Falls ein Ort falsch ist oder sich die Adresse ändert, kannst du ihn ändern.<br/>Bitte beachte, dass alle Veranstaltungen, die mit diesem Ort verbunden sind, die Adresse ändern (auch zurückliegende).",
"enable_admin_user_confirm": "Achte darauf, dass du der nutzenden Person {user} Admin-Rechte hinzufügst",
"trusted_instances_help": "Befreundete Instanzen werden in der Navigationsleiste oben auf der Seite angezeigt",
@ -148,7 +148,7 @@
"announcement_remove_ok": "Hinweis entfernt",
"instance_block_confirm": "Bestätige, dass du die Instanz {instance} blockieren möchtest?",
"favicon": "Logo",
"title_description": "Es wird im Seitentitel, in der Betreffzeile von E-Mails, beim Export von RSS-Feeds und ICS verwendet.",
"title_description": "Dieses wird im Seitentitel, in der Betreffzeile von E-Mails, beim Export von RSS-Feeds und ICS angezeigt.",
"description_description": "Erscheint in der Kopfzeile neben dem Titel",
"allow_recurrent_event": "Wiederkehrende Veranstaltungen erlauben",
"recurrent_event_visible": "Wiederkehrende Veranstaltungen sind standardmäßig sichtbar",
@ -156,7 +156,7 @@
"allow_anon_event": "Kann man auch anonyme Veranstaltungen (vorausgesetzt, diese werden genehmigt) eintragen?",
"allow_registration_description": "Möchtest du die Registrierung aktivieren?",
"federation": "Föderation / ActivityPub",
"enable_federation_help": "Es wird möglich sein, diese Instanz vom Fediverse aus zu verfolgen",
"enable_federation_help": "Bei Aktivierung kann diese Instanz vom Fediverse aus verfolgt werden",
"add_instance": "Instanz hinzufügen",
"block": "Sperre",
"show_resource": "Ressource anzeigen",
@ -278,7 +278,7 @@
"login": {
"ok": "Angemeldet",
"insert_email": "Gib deine E-Mail-Adresse ein",
"error": "Eine Anmeldung ist nicht möglich. Bitte überprüfe deine Informationen zur Anmeldung.",
"error": "Anmeldung nicht möglich. Bitte überprüfe deine Informationen zur Anmeldung.",
"forgot_password": "Passwort vergessen?",
"not_registered": "Nicht registriert?",
"check_email": "Überprüfe deinen E-Mail-Posteingang und Spam.",
@ -291,5 +291,5 @@
"copy_password_dialog": "Ja, du musst das Passwort kopieren!",
"start": "Start"
},
"about": "\n <p><a href='https://gancio.org'>Gancio</a> ist eine gemeinsamer Veranstaltungsalender für lokale und regionale Gemeinschaften.</p>\n "
"about": "\n <p><a href='https://gancio.org'>Gancio</a> ist ein gemeinsamer Veranstaltungsalender für lokale und regionale Gemeinschaften.</p>\n "
}

1
locales/email/fi.json Normal file
View file

@ -0,0 +1 @@
{}

1
locales/email/nl.json Normal file
View file

@ -0,0 +1 @@
{}

1
locales/fi.json Normal file
View file

@ -0,0 +1 @@
{}

View file

@ -1,6 +1,6 @@
{
"common": {
"add_event": "Nuovo evento",
"add_event": "Aggiungi evento",
"next": "Continua",
"export": "Esporta",
"send": "Invia",

View file

@ -133,7 +133,7 @@
"first_user": "Administrator opprettet",
"complete": "Registrering må bekreftes.",
"error": "Feil: ",
"description": "Sosiale bevegelser bør organisere og finansiere seg selv.<br/>\n<br/>Før du kan publisere, <strong>må kontoen godkjennes</strong>, ha i minnet <strong> at bak denne siden er det mennesker, så skriv to linjer om hvilke hendelser du ønsker å publisere."
"description": "Sosiale bevegelser bør organisere og finansiere seg selv.<br/>\n<br/>Før du kan publisere, <strong>må kontoen godkjennes</strong>, ha i minnet <strong> at bak denne siden er det mennesker</strong>, så skriv to linjer om hvilke hendelser du ønsker å publisere."
},
"recover": {
"not_valid_code": "Noe gikk galt."

1
locales/nl.json Normal file
View file

@ -0,0 +1 @@
{}

View file

@ -1,6 +1,6 @@
{
"name": "gancio",
"version": "1.5.4",
"version": "1.5.6",
"description": "A shared agenda for local communities",
"author": "lesion",
"scripts": {
@ -51,12 +51,12 @@
"http-signature": "^1.3.6",
"https-proxy-agent": "^5.0.1",
"ical.js": "^1.5.0",
"ics": "^2.37.0",
"ics": "^2.40.0",
"jsdom": "^20.0.0",
"jsonwebtoken": "^8.5.1",
"leaflet": "^1.8.0",
"linkify-html": "^3.0.4",
"linkifyjs": "3.0.5",
"linkify-html": "^4.0.0",
"linkifyjs": "4.0.0",
"lodash": "^4.17.21",
"mariadb": "^3.0.1",
"microformat-node": "^2.0.1",
@ -64,10 +64,10 @@
"mkdirp": "^1.0.4",
"multer": "^1.4.5-lts.1",
"mysql2": "^2.3.3",
"nuxt-edge": "2.16.0-27616340.013f051b",
"nuxt-edge": "2.16.0-27720022.54e852f",
"pg": "^8.8.0",
"sequelize": "^6.21.4",
"sequelize-slugify": "^1.6.1",
"sequelize": "^6.23.0",
"sequelize-slugify": "^1.6.2",
"sharp": "^0.27.2",
"sqlite3": "^5.0.11",
"tiptap": "^1.32.0",
@ -76,14 +76,14 @@
"v-calendar": "^2.4.1",
"vue-i18n": "^8.26.7",
"vue2-leaflet": "^2.7.1",
"vuetify": "2.6.9",
"winston": "^3.8.1",
"vuetify": "2.6.10",
"winston": "^3.8.2",
"winston-daily-rotate-file": "^4.7.1",
"yargs": "^17.5.0"
},
"devDependencies": {
"@nuxtjs/vuetify": "^1.12.3",
"jest": "^29.0.0",
"jest": "^29.0.3",
"prettier": "^2.7.1",
"pug": "^3.0.2",
"pug-plain-loader": "^1.1.0",

View file

@ -91,7 +91,7 @@ export default {
if (this.selectedDay) {
const min = dayjs.tz(this.selectedDay).startOf('day').unix()
const max = dayjs.tz(this.selectedDay).endOf('day').unix()
return this.events.filter(e => (e.start_datetime <= max && e.end_datetime >= min) && (this.show_recurrent || !e.parentId))
return this.events.filter(e => (e.start_datetime <= max && (e.end_datetime || e.start_datetime) >= min) && (this.show_recurrent || !e.parentId))
} else if (this.isCurrentMonth) {
return this.events.filter(e => ((e.end_datetime ? e.end_datetime > now : e.start_datetime + 2 * 60 * 60 > now) && (this.show_recurrent || !e.parentId)))
} else {

View file

@ -4,6 +4,6 @@ export default () => {
Vue.use(VCalendar, {
componentPrefix: 'vc',
// why is that ?!
firstDayOfWeek: 2
// firstDayOfWeek: 2
})
}

View file

@ -11,4 +11,5 @@ mv gancio-$RELEASE.tgz releases/latest.tgz
cp gancio-$RELEASE.tgz.sig releases/
mv gancio-$RELEASE.tgz.sig releases/latest.tgz.sig
yarn doc
rsync -a docs/_site/ gancio.org:/var/www/gancio/
rsync -a docs/_site/ --chown=www-data:www-data cisti.web:/var/www/gancio/
cd docs

View file

@ -574,8 +574,8 @@ const eventController = {
let tags = []
if (body.tags) {
tags = await tagController._findOrCreate(body.tags)
await event.setTags(tags)
}
await event.setTags(tags)
let newEvent = await Event.findByPk(event.id, { include: [Tag, Place] })
newEvent = newEvent.get()

View file

@ -1,9 +1,5 @@
const Sequelize = require('sequelize')
// this is an hack: https://github.com/sequelize/sequelize/pull/14800
const livePatchMariaDBDialect = require('sequelize/lib/dialects/mariadb/query')
livePatchMariaDBDialect.prototype.handleJsonSelectQuery = () => null
const Umzug = require('umzug')
const path = require('path')
const config = require('../../config')

View file

@ -91,8 +91,12 @@ module.exports = {
const router = express.Router()
// serve images/thumb
router.use('/media/', express.static(config.upload_path, { immutable: true, maxAge: '1y' }), (_req, res) => res.sendStatus(404))
router.use('/download/:filename', (req, res, next) => {
return res.download(req.params.filename, undefined, { root: config.upload_path }, err => res.status(404).send('Not found (but nice try 😊)'))
router.use('/download/:filename', (req, res) => {
return res.download(req.params.filename, undefined, { root: config.upload_path }, err => {
if (err) {
res.status(404).send('Not found (but nice try 😊)')
}
})
})
router.use('/noimg.svg', express.static('./static/noimg.svg'))

1667
yarn.lock

File diff suppressed because it is too large Load diff