diff --git a/assets/style.less b/assets/style.less index 11785459..2cc3e325 100644 --- a/assets/style.less +++ b/assets/style.less @@ -1,3 +1,8 @@ html, body { scrollbar-width: thin; + scrollbar-color: orange; } + +li { + margin-left: 10px; +} \ No newline at end of file diff --git a/components/FollowMe.vue b/components/FollowMe.vue index 620eed66..a486eb2f 100644 --- a/components/FollowMe.vue +++ b/components/FollowMe.vue @@ -1,5 +1,5 @@ diff --git a/components/Search.vue b/components/Search.vue index 8e8c3798..0732c2b7 100644 --- a/components/Search.vue +++ b/components/Search.vue @@ -6,11 +6,6 @@ :label="$t('event.show_recurrent')" @change="v => $emit('showrecurrent', v)") - v-switch.mt-0( - v-if='pastFilter' inset color='primary' - :label="$t('event.show_past')" - @change="v => $emit('showpast', v)") - v-autocomplete.mt-0( :label='$t("common.search")' :items='keywords' @@ -36,7 +31,7 @@ diff --git a/docs/assets/css/style.css b/docs/assets/css/style.css index 895bcced..632592e0 100644 --- a/docs/assets/css/style.css +++ b/docs/assets/css/style.css @@ -1,4 +1,4 @@ -.navigation-list-item { +/* .navigation-list-item { font-size: 18px !important; padding: 4px; } @@ -10,3 +10,7 @@ html, body { .page-content h1:first-of-type { font-weight: 500; } + +li { + margin-left: 10px; +} */ \ No newline at end of file diff --git a/locales/it.json b/locales/it.json index ccde9915..4f864209 100644 --- a/locales/it.json +++ b/locales/it.json @@ -165,8 +165,8 @@ "user_create_ok": "Utente creato", "allow_registration_description": "Vuoi abilitare la registrazione?", "allow_anon_event": "Si possono inserire eventi anonimi (previa conferma)?", - "allow_recurrent_event": "Abilita eventi fissi", - "recurrent_event_visible": "Appuntamenti fissi visibili di default", + "allow_recurrent_event": "Abilita eventi ricorrenti", + "recurrent_event_visible": "Appuntamenti ricorrenti visibili di default", "federation": "Federazione / ActivityPub", "enable_federation": "Abilita la federazione", "enable_federation_help": "Sarà possibile seguire questa istanza dal fediverso", diff --git a/package.json b/package.json index bdfd5a4e..aafd1424 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "cors": "^2.8.5", "cross-env": "^7.0.2", "date-fns": "^2.16.1", - "dayjs": "^1.9.5", + "dayjs": "^1.9.6", "dompurify": "^2.2.2", "email-templates": "^7.1.2", "express": "^4.17.1", @@ -61,7 +61,7 @@ "multer": "^1.4.2", "nuxt": "^2.14.7", "nuxt-express-module": "^0.0.11", - "pg": "^8.4.2", + "pg": "^8.5.0", "sequelize": "^6.3.5", "sequelize-cli": "^6.2.0", "sharp": "^0.26.2", @@ -79,7 +79,7 @@ "@nuxtjs/eslint-config": "^4.0.0", "@nuxtjs/vuetify": "^1.11.2", "babel-eslint": "^10.1.0", - "eslint": "^7.12.1", + "eslint": "^7.13.0", "eslint-config-prettier": "^6.15.0", "eslint-config-standard": "^16.0.1", "eslint-loader": "^4.0.2", @@ -88,14 +88,14 @@ "eslint-plugin-nuxt": "^1.0.0", "eslint-plugin-prettier": "^3.1.4", "eslint-plugin-promise": ">=4.0.1", - "eslint-plugin-standard": "^4.0.2", + "eslint-plugin-standard": "^4.1.0", "eslint-plugin-vue": "^7.1.0", - "less-loader": "^7.0.2", + "less-loader": "^7.1.0", "nodemon": "^2.0.6", "prettier": "^2.1.2", "pug-plain-loader": "^1.0.0", "sass": "^1.29.0", - "sass-loader": "^10.0.5", + "sass-loader": "^10.1.0", "vue-cli-plugin-vuetify": "~2.0.7", "vuetify-loader": "^1.3.0", "webpack-cli": "^4.2.0" diff --git a/pages/event/_id.vue b/pages/event/_id.vue index 2ece5023..a3cc3227 100644 --- a/pages/event/_id.vue +++ b/pages/event/_id.vue @@ -144,6 +144,7 @@ const htmlToText = require('html-to-text') export default { name: 'Event', components: { EventAdmin, EmbedEvent, FollowMe }, + transition: null, async asyncData ({ $axios, params, error, store }) { try { const event = await $axios.$get(`/event/${params.id}`) diff --git a/pages/export.vue b/pages/export.vue index 3f673218..4e82bfe9 100644 --- a/pages/export.vue +++ b/pages/export.vue @@ -1,87 +1,109 @@ diff --git a/plugins/api.js b/plugins/api.js index 77e664a7..edd450e6 100644 --- a/plugins/api.js +++ b/plugins/api.js @@ -1,11 +1,10 @@ export default ({ $axios, store }, inject) => { - const api = { /** * Get events - * + * * filter: { * start_datetime: unix_timestamp (default now) * end_datetime: unix_timestamp @@ -13,16 +12,18 @@ export default ({ $axios, store }, inject) => { * places: [place_id], * limit: (default ∞) * } - * + * */ async getEvents (params) { try { - const events = await $axios.$get(`/events`, { params: { - start: params.start, - end: params.end, - places: params.places && params.places.join(','), - tags: params.tags && params.tags.join(',') - }} ) + const events = await $axios.$get('/events', { + params: { + start: params.start, + end: params.end, + places: params.places && params.places.join(','), + tags: params.tags && params.tags.join(',') + } + }) return events } catch (e) { console.error(e) @@ -31,4 +32,4 @@ export default ({ $axios, store }, inject) => { } } inject('api', api) -} \ No newline at end of file +} diff --git a/server/helpers.js b/server/helpers.js index 3aa5e0ae..f02278c2 100644 --- a/server/helpers.js +++ b/server/helpers.js @@ -1,6 +1,6 @@ const settingsController = require('./api/controller/settings') const acceptLanguage = require('accept-language') -const moment = require('moment-timezone') +const dayjs = require('dayjs') const config = require('config') const debug = require('debug')('helpers') const pkg = require('../package.json') @@ -66,8 +66,8 @@ module.exports = { acceptLanguage.languages(Object.keys(locales)) req.settings.locale = acceptLanguage.get(acceptedLanguages) req.settings.user_locale = settingsController.user_locale[req.settings.locale] - moment.locale(req.settings.locale) - moment.tz.setDefault(req.settings.instance_timezone) + dayjs.locale(req.settings.locale) + dayjs.tz.setDefault(req.settings.instance_timezone) next() }, diff --git a/store/index.js b/store/index.js index 7ee8c80a..23646ad9 100644 --- a/store/index.js +++ b/store/index.js @@ -72,21 +72,12 @@ export const actions = { const { tags, places } = await this.$axios.$get('/event/meta') commit('update', { tags, places }) }, - async addEvent ({ commit }, formData) { - await this.$axios.$post('/event', formData) - }, - async updateEvent ({ commit }, formData) { - await this.$axios.$put('/event', formData) - }, setFilters ({ commit }, filters) { commit('setFilters', filters) }, setAnnouncements ({ commit }, announcements) { commit('setAnnouncements', announcements) }, - delEvent ({ commit }, eventId) { - commit('delEvent', eventId) - }, async setSetting ({ commit }, setting) { await this.$axios.$post('/settings', setting) commit('setSetting', setting)