Commit d6501b1a authored by les's avatar les
Browse files

.

parent c408c446
# Created by .ignore support plugin (hsz.mobi)
### Gancio production configuration
server/config.js
config.js
### Node template
# Logs
......
......@@ -6,13 +6,32 @@
## Install
You will need `npm` or `yarn` installed in your system.
``` bash
# clone this repo
git clone https://git.lattuga.net/cisti/gancio.git
cd gancio
# install dependencies
$ yarn install
yarn install
# edit configuration
cp config.example.js config.js
# - migrate/create test sqlite db
yarn migrate:dev
# testing with sqlite db
yarn dev
# - migrate/create production db
yarn migrate
# build for production and launch server
$ yarn build
$ yarn start
yarn build
yarn start
```
......@@ -27,8 +46,4 @@ For detailed explanation on how things work, checkout [Nuxt.js docs](https://nux
``` bash
$ yarn dev
```
#### Add a new icon
plugin/vue-awesome.js
```
\ No newline at end of file
......@@ -51,9 +51,8 @@ const SHARED_CONF = {
locale: 'it',
title: 'GANCIO',
description: 'A calendar for radical communities',
baseurl: env === 'development' ? 'http://localhost:3000': 'https://gancio.example.com',
baseurl: '' || 'http://localhost:3000',
env
}
module.exports = { SHARED_CONF, SECRET_CONF }
\ No newline at end of file
module.exports = { SHARED_CONF, SECRET_CONF, ...SECRET_CONF.db }
{
"registration_email": "registration_email",
"recover_email": "recover_email",
"press here": "press here"
"press here": "press here",
"register.request": "register.request"
}
\ No newline at end of file
{
"registration_email": "registration_email",
"recover_email": "recover_email",
"press here": "press here"
"press here": "press here",
"register.request": "register.request"
}
\ No newline at end of file
{
"registration_email": "registration_email",
"recover_email": "recover_email",
"press here": "press here"
"press here": "press here",
"register.request": "register.request"
}
\ No newline at end of file
{
"registration_email": "registration_email",
"recover_email": "recover_email",
"press here": "press here"
"press here": "press here",
"register.request": "register.request"
}
\ No newline at end of file
......@@ -39,7 +39,9 @@ const it = {
related: 'Memoria storica',
add: 'Aggiungi',
logout_ok: 'Uscita correttamente',
copy: 'Copia'
copy: 'Copia',
recover_password: 'Recupera password',
new_password: 'Nuova password'
},
login: {
......@@ -77,7 +79,10 @@ const it = {
carne e sangue, scrivici quindi due righe per farci capire che eventi vorresti pubblicare.`,
error: 'Errore: ',
admin_complete: 'Sei il primo utente e quindi sei amministratore!',
complete: 'Confermeremo la registrazione quanto prima.'
complete: 'Confermeremo la registrazione quanto prima.',
request: 'Richiesta di registrazione',
registration_email: `Ciao,
ci è arrivata una richiesta di registrazione su gancio, la confermeremo quanto prima.`
},
event: {
......
......@@ -9,7 +9,9 @@
"start": "cross-env NODE_ENV=production node server/index.js",
"generate": "nuxt generate",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
"precommit": "npm run lint"
"precommit": "npm run lint",
"migrate:dev": "sequelize db:migrate",
"migrate": "NODE_ENV=production sequelize db:migrate"
},
"bin": {
"gancio": "server/index.js"
......
<template lang="pug">
el-card#eventDetail(
visible hide-header
no-header :show-close='false'
top='0vh !important'
:appendToBody='true')
el-card#eventDetail
//- close button
nuxt-link.float-right(to='/')
......
<template lang="pug">
el-dialog(visible)
template(slot='title')
h5 <img src='/favicon.ico'/> {{$t('common.recover_password')}}
el-card
nuxt-link.float-right(to='/')
el-button(circle icon='el-icon-close' type='danger' size='small' plain)
h5 <img src='/favicon.ico'/> {{$t('common.recover_password')}}
div(v-if='valid')
el-form
el-form-item {{$t('common.new_password')}}
......
......@@ -8,6 +8,7 @@ const mail = {
send(addresses, template, locals) {
const email = new Email({
views: { root: path.join(__dirname, '..', 'emails') },
htmlToText: false,
juice: true,
juiceResources: {
preserveImportant: true,
......@@ -25,7 +26,7 @@ const mail = {
},
transport: config.SECRET_CONF.smtp
})
return email.send({
const msg = {
template,
message: {
to: addresses,
......@@ -37,7 +38,11 @@ const mail = {
config: config.SHARED_CONF,
datetime: datetime => moment(datetime).format('ddd, D MMMM HH:mm')
}
})
}
return email.send(msg)
.catch(e => {
console.error(e)
})
}
}
......
......@@ -5,7 +5,7 @@ module.exports = (sequelize, DataTypes) => {
const user = sequelize.define('user', {
email: {
type: DataTypes.STRING,
unique: { msg: 'err.register_error' },
unique: true,
index: true,
allowNull: false
},
......@@ -16,7 +16,7 @@ module.exports = (sequelize, DataTypes) => {
is_active: DataTypes.BOOLEAN
}, {
defaultScope: {
exclude: ['password', 'recover_code']
attributes: { exclude: ['password', 'recover_code'] }
}
})
......
p= t('recover_email')
p= t('mail.recover')
<a href="#{config.baseurl}/recover/#{user.recover_code}">#{t('press here')}</a>
\ No newline at end of file
= `[Gancio] Richiesta registrazione`
| [Gancio] #{t('register.request')}
| dioicane ciao
\ No newline at end of file
......@@ -10,7 +10,7 @@ module.exports = {
},
email: {
type: Sequelize.STRING,
unique: { msg: 'err.register_error' },
unique: true,
index: true,
allowNull: false
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment