diff --git a/config.example.js b/config.example.js index b5af33fb..3aff4ebe 100644 --- a/config.example.js +++ b/config.example.js @@ -1,14 +1,15 @@ -const path = require('path') - /** * -[ GANCIO CONFIGURATION ]- * + * search and replace 'CHANGE ME' + * * -[ Database configuration ]- * `development` configuration is enabled running `yarn dev` * while `production` with `yarn start` * ref: http://docs.sequelizejs.com/class/lib/sequelize.js~Sequelize.html#instance-constructor-constructor * */ +const path = require('path') const DB_CONF = { development: { @@ -16,8 +17,8 @@ const DB_CONF = { dialect: 'sqlite' }, production: { - username: '', - password: '', + username: 'CHANGE ME', + password: 'CHANGE ME', database: 'gancio', host: 'localhost', dialect: 'postgres', @@ -26,7 +27,7 @@ const DB_CONF = { } const env = process.env.NODE_ENV || 'development' - +const isDev = env === 'development' /** * -[ Main configuration ]- * @@ -34,30 +35,34 @@ const env = process.env.NODE_ENV || 'development' const config = { server: { port: '3000', - host: '0', + host: 'localhost', // use 0.0.0.0 to bind to all interface + // uncomment to use unix socket to serve gancio // path: '/tmp/gancio_socket', }, + locale: 'it', - title: 'GANCIO', - description: 'A shared agenda for radical communities', - baseurl: '' || 'http://localhost:3000', + title: isDev ? 'GANCIO' : 'CHANGE ME', + description: isDev ? 'A shared agenda for radical communities' : 'CHANGE ME', + baseurl: isDev ? 'http://localhost:3000' : 'https://CHANGE_ME', + + upload_path: isDev ? '/tmp/gancio_upload' : '/var/gancio/upload/', // where events/users confirmation email are sent - admin: '', + admin: 'CHANGE ME', // jwt salt secret, generate it randomly with // < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo; - secret: '', + secret: isDev ? 'notreallyrandom' : 'CHANGE ME', // smtp account to send email smtp: { - host: process.env.SMTP_HOST || 'mail.example.com', - secure: true, + host: 'CHANGE ME', // mail.example.com auth: { - user: process.env.SMTP_USER || 'gancio@example.com', - pass: process.env.SMTP_PASS || '' - } + user: 'CHANGE ME', + pass: 'CHANGE ME' + }, + secure: true }, db: DB_CONF[env] } diff --git a/locales/it.js b/locales/it.js index f9eba3f3..9263ea73 100644 --- a/locales/it.js +++ b/locales/it.js @@ -122,21 +122,21 @@ const it = { }, settings: { - change_password: 'Cambia password' + change_password: 'Cambia password', + password_updated: 'Password modificata' }, err: { register_error: 'Errore nella registrazione' } + + // firstrun: { // basic: `Inserisci titolo e descrizione della tua istanza di gancio.`, // database: `Gancio ha bisogno di un database postgresql!`, // smtp: `Inserisci un account SMTP relativo a questa istanza di gancio.` // }, - // email: { - // registration: `Abbiamo ricevuto la richiesta di registrazione. La confermeremo quanto prima.\n Ciao` - // } } export default it diff --git a/pages/add/_edit.vue b/pages/add/_edit.vue index 4ba18cc3..4e5b2bd0 100644 --- a/pages/add/_edit.vue +++ b/pages/add/_edit.vue @@ -223,6 +223,8 @@ export default { const place = this.places.find( p => p.name === this.event.place.name ) if (place && place.address) { this.event.place.address = place.address + } else { + this.event.place.address = '' } this.$refs.address.focus() }, diff --git a/pages/embed/list.vue b/pages/embed/list.vue index 1e711364..25dc2e57 100644 --- a/pages/embed/list.vue +++ b/pages/embed/list.vue @@ -5,13 +5,13 @@ import { mapState } from 'vuex' import List from '../../components/List' import moment from 'dayjs' +import get from 'lodash/get' export default { layout: 'iframe', components: { List }, - computed: mapState(['config']), async asyncData ({ $axios, req, res }) { - const title = req && req.query && req.query.title || this.config.title + const title = get(req, 'query.title') const tags = req && req.query && req.query.tags const places = req && req.query && req.query.places const now = new Date() diff --git a/pages/event/_id.vue b/pages/event/_id.vue index 49f7bcc6..8844a635 100644 --- a/pages/event/_id.vue +++ b/pages/event/_id.vue @@ -1,6 +1,5 @@