From d6501b1a5b057618a5d228f70ab9ff44eae87526 Mon Sep 17 00:00:00 2001 From: lesion Date: Sat, 8 Jun 2019 13:18:47 +0200 Subject: [PATCH] . --- .gitignore | 2 +- README.md | 31 ++++++++++++++----- server/config.example.js => config.example.js | 5 ++- locales/email/en.json | 3 +- locales/email/es.json | 3 +- locales/email/it.json | 3 +- locales/email/zh.json | 3 +- locales/it.js | 9 ++++-- package.json | 4 ++- pages/event/_id.vue | 6 +--- pages/recover/_code.vue | 8 +++-- server/api/mail.js | 9 ++++-- server/api/models/user.js | 4 +-- server/emails/recover/html.pug | 2 +- server/emails/register/subject.pug | 2 +- server/emails/register/text.pug | 1 + .../migrations/20190605141112-create-user.js | 2 +- 17 files changed, 63 insertions(+), 34 deletions(-) rename server/config.example.js => config.example.js (89%) create mode 100644 server/emails/register/text.pug diff --git a/.gitignore b/.gitignore index 7b99f646..b9a6eb25 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ # Created by .ignore support plugin (hsz.mobi) ### Gancio production configuration -server/config.js +config.js ### Node template # Logs diff --git a/README.md b/README.md index 85d0598c..8c8b463f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/server/config.example.js b/config.example.js similarity index 89% rename from server/config.example.js rename to config.example.js index 733eedff..38ba8953 100644 --- a/server/config.example.js +++ b/config.example.js @@ -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 } diff --git a/locales/email/en.json b/locales/email/en.json index fced2be4..c22030f9 100644 --- a/locales/email/en.json +++ b/locales/email/en.json @@ -1,5 +1,6 @@ { "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 diff --git a/locales/email/es.json b/locales/email/es.json index fced2be4..c22030f9 100644 --- a/locales/email/es.json +++ b/locales/email/es.json @@ -1,5 +1,6 @@ { "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 diff --git a/locales/email/it.json b/locales/email/it.json index fced2be4..c22030f9 100644 --- a/locales/email/it.json +++ b/locales/email/it.json @@ -1,5 +1,6 @@ { "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 diff --git a/locales/email/zh.json b/locales/email/zh.json index fced2be4..c22030f9 100644 --- a/locales/email/zh.json +++ b/locales/email/zh.json @@ -1,5 +1,6 @@ { "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 diff --git a/locales/it.js b/locales/it.js index da1d9e08..b4b881e6 100644 --- a/locales/it.js +++ b/locales/it.js @@ -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: { diff --git a/package.json b/package.json index b0f3f008..42c985ff 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/pages/event/_id.vue b/pages/event/_id.vue index 5bba3acc..5e168453 100644 --- a/pages/event/_id.vue +++ b/pages/event/_id.vue @@ -1,9 +1,5 @@