diff --git a/.vscode/vscode-kanban.json b/.vscode/vscode-kanban.json
index c40aba7d..cfcc8869 100644
--- a/.vscode/vscode-kanban.json
+++ b/.vscode/vscode-kanban.json
@@ -52,6 +52,24 @@
"prio": 0,
"references": [],
"title": "export lista"
+ },
+ {
+ "assignedTo": {
+ "name": "lesion"
+ },
+ "creation_time": "2019-04-30T12:46:42.208Z",
+ "id": "16",
+ "references": [],
+ "title": "riesco a rimuovere bootstrap-vue e usare solo element ?"
+ },
+ {
+ "assignedTo": {
+ "name": "lesion"
+ },
+ "creation_time": "2019-04-28T09:25:50.701Z",
+ "id": "13",
+ "references": [],
+ "title": "test altra visualizzazione"
}
],
"in-progress": [
@@ -123,6 +141,42 @@
"title": "risolvere le modali quando il js e' disabilitato",
"type": "bug"
},
+ {
+ "assignedTo": {
+ "name": "lesion"
+ },
+ "creation_time": "2019-05-27T15:42:35.467Z",
+ "id": "21",
+ "references": [],
+ "title": "all'admin deve mostrare un badge se ci sono pending operation"
+ },
+ {
+ "assignedTo": {
+ "name": "lesion"
+ },
+ "creation_time": "2019-05-27T15:16:22.839Z",
+ "id": "20",
+ "references": [],
+ "title": "check password reset"
+ },
+ {
+ "assignedTo": {
+ "name": "lesion"
+ },
+ "creation_time": "2019-05-27T15:45:39.093Z",
+ "id": "23",
+ "references": [],
+ "title": "colori te prego!"
+ },
+ {
+ "assignedTo": {
+ "name": "lesion"
+ },
+ "creation_time": "2019-05-27T15:45:18.012Z",
+ "id": "22",
+ "references": [],
+ "title": "filtri per luogo!"
+ },
{
"assignedTo": {
"name": "lesion"
@@ -132,6 +186,24 @@
"references": [],
"title": "gestione errori quando non c'e' un evento"
},
+ {
+ "assignedTo": {
+ "name": "lesion"
+ },
+ "creation_time": "2019-05-02T16:15:07.106Z",
+ "id": "19",
+ "references": [],
+ "title": "modifica eventi multigiorno"
+ },
+ {
+ "assignedTo": {
+ "name": "lesion"
+ },
+ "creation_time": "2019-05-02T11:50:28.476Z",
+ "id": "18",
+ "references": [],
+ "title": "notifiche email / iscrizione / evento da confermare"
+ },
{
"assignedTo": {
"name": "lesion"
@@ -146,19 +218,19 @@
"assignedTo": {
"name": "lesion"
},
- "creation_time": "2019-04-27T19:44:33.769Z",
- "id": "12",
+ "creation_time": "2019-04-30T22:00:29.237Z",
+ "id": "17",
"references": [],
- "title": "rifare il calendario o solo il popup"
+ "title": "porcoddio la config arriva anche al client ovviamente, devo separare!"
},
{
"assignedTo": {
"name": "lesion"
},
- "creation_time": "2019-04-28T09:25:50.701Z",
- "id": "13",
+ "creation_time": "2019-04-27T19:44:33.769Z",
+ "id": "12",
"references": [],
- "title": "test altra visualizzazione"
+ "title": "rifare il calendario o solo il popup"
},
{
"assignedTo": {
@@ -187,10 +259,10 @@
"assignedTo": {
"name": "lesion"
},
- "creation_time": "2019-04-30T12:46:42.208Z",
- "id": "16",
+ "creation_time": "2019-05-27T20:42:22.581Z",
+ "id": "24",
"references": [],
- "title": "riesco a rimuovere bootstrap-vue e usare solo element ?"
+ "title": "copy to clipboard"
}
]
}
\ No newline at end of file
diff --git a/README.md b/README.md
index 0ffa0472..85d0598c 100644
--- a/README.md
+++ b/README.md
@@ -1,22 +1,34 @@
-# gancio
+## gancio
+### event manager for radical communities
-> My well-made Nuxt.js project
+> :warning: Gancio is under heavy development,
+> if something is not working as expected, it's expected :D
-## Build Setup
+## Install
``` bash
# install dependencies
$ yarn install
-# serve with hot reload at localhost:3000
-$ yarn run dev
-
# build for production and launch server
-$ yarn run build
+$ yarn build
$ yarn start
-# generate static project
-$ yarn run generate
```
+##### nginx setup
+https://nuxtjs.org/faq/nginx-proxy
+
For detailed explanation on how things work, checkout [Nuxt.js docs](https://nuxtjs.org).
+
+
+## Hacking
+
+``` bash
+$ yarn dev
+
+```
+
+#### Add a new icon
+
+plugin/vue-awesome.js
diff --git a/assets/style.less b/assets/style.less
new file mode 100644
index 00000000..f185afee
--- /dev/null
+++ b/assets/style.less
@@ -0,0 +1,55 @@
+html, body {
+ margin: 0px;
+ background-color: #222C32 !important;
+ width: 100%;
+ overflow-x: hidden;
+ box-sizing: border-box;
+ font-family: BlinkMacSystemFont,-apple-system,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif !important;
+}
+
+* {
+ box-sizing: border-box;
+}
+
+.el-dialog {
+ margin-top: 0px !important;
+ border-radius: 0px;
+ width: 100%;
+
+ .el-dialog__body {
+ word-break: break-word;
+ }
+}
+
+.el-select-dropdown {
+ max-width: 100%;
+ left: 0px;
+}
+
+.page-enter-active, .page-leave-active {
+ transition: opacity .2s, transform .3s;
+}
+.page-enter, .page-leave-active {
+ transition: opacity .3s, transform .2s;
+ opacity: 0;
+ // transform: translateY(30px);
+}
+
+pre {
+ font-family: BlinkMacSystemFont,-apple-system,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif !important;
+ margin-bottom: 0px;
+ white-space: pre-line;
+ font-family: unset;
+}
+
+.el-popover {
+ word-break: normal;
+}
+
+@media only screen and (min-width: 768px) {
+ .el-dialog {
+ margin-top: 10vh !important;
+ width: 700px;
+ border-radius: 3px;
+ }
+}
diff --git a/components/Calendar.vue b/components/Calendar.vue
index d3c06ff1..fb0b8a92 100644
--- a/components/Calendar.vue
+++ b/components/Calendar.vue
@@ -1,37 +1,29 @@
- v-calendar#calendar.card(
+ #calendar
+ v-calendar(
title-position='left'
locale='it'
is-dark
- show-caps
:attributes='attributes'
:from-page.sync='page'
- is-expanded is-inline)
- div(slot='popover', slot-scope='{ customData, attributes }')
- p {{attributes}}
- //- router-link(:to="`/event/${customData.id}`") {{customData.start_datetime|hour}} - {{customData.title}}
- //- div(v-if='customData.days && customData.days[selectedEvent]')
- p {{customData.days[customData.selectedEvent].title}}
- p {{customData.days[customData.selectedEvent].tags}}
- el-button(@click='customData.selectedEvent=customData.selectedEvent+1') {{customData.selectedEvent}}/{{customData.days.length}}
- v-icon(name='clock' @click='customData.selectedEvent=customData.selectedEvent+1')
- //- @{{customData.place.name}}
+ is-expanded
+ show-clear-margin
+ is-inline
+ @dayclick='click')
+
-
diff --git a/components/Home.vue b/components/Home.vue
index edac84d1..db75cbab 100644
--- a/components/Home.vue
+++ b/components/Home.vue
@@ -1,108 +1,40 @@
- div(v-loading='loading')
- magic-grid(:animate="true" useMin :gap=5 :maxCols=4
- :maxColWidth='400' ref='magicgrid')
- div.mt-1.item
- //- Search#search
- no-ssr
- Calendar
- Event.item.mt-1(v-for='event in events'
- :key='event.id'
- :event='event')
+ section
+
+ .row.m-0
+ no-ssr
+ Calendar.col-sm-12.col-lg-8.col-xl-6
+ .p-0.col-sm-6.col-lg-4.col-xl-3(v-for='event in filteredEvents')
+ a(:id='event.newDay' v-if='event.newDay')
+ .d-block.d-sm-none
+ el-divider {{event.start_datetime|day}}
+ Event(
+ :id='event.start_datetime'
+ :key='event.id'
+ :event='event'
+ )
+
-
diff --git a/components/List.vue b/components/List.vue
index a9dea5fc..f412e963 100644
--- a/components/List.vue
+++ b/components/List.vue
@@ -1,34 +1,83 @@
- div#gancio-widget
- //- el-card.mb-1(no-body header='Eventi')
- //- b-list-group#list(flush)
- p minimal {{minimal}}
- ul
- li.flex-column.align-items-start(v-for="event in events" :key='event.id'
- :to='`/event/${event.id}`' target='_parent')
- img(v-if='event.image_path' slot="aside" :src="`http://localhost:3000/media/${event.image_path}`" alt="Meia Aside" style='max-height: 60px')
- strong.mb-1 {{event.title}}
- br
- small.float-right {{event.place.name}}
- //- el-tag.mr-1(v-if='showtags' :color='tag.color || "rgba(64,158,255,.1)"' size='mini' v-for='tag in event.tags' :key='tag.tag') {{tag.tag}}
+div#list
+ el-divider {{title}}
+ el-timeline
+ el-timeline-item(
+ v-for='event in events'
+ :key='event.id'
+ :timestamp='event|event_when'
+ placement='top' icon='el-icon-arrow-down' size='large'
+ )
+
+ div.float-right
+ small @{{event.place.name}}
+
+ a(:href='"/event/" + event.id' target='_blank') {{event.title}}
+ hr
\ No newline at end of file
+
+
diff --git a/components/Nav.vue b/components/Nav.vue
index 67f0f3f7..013fdb2f 100644
--- a/components/Nav.vue
+++ b/components/Nav.vue
@@ -1,51 +1,59 @@
- b-navbar(type="dark" variant="dark" toggleable='md')
- b-navbar-toggle(target='nav_collapse')
- b-navbar-brand(to='/')
- b-collapse#nav_collapse(is-nav)
- b-navbar-nav
- b-nav-item(v-if='!$auth.loggedIn' to='/login' v-b-tooltip :title='$t("common.login")')
- span.d-md-none {{$t('common.login')}}
- b-nav-item(to='/add' v-b-tooltip :title='$t("common.add_event")' )
- span.d-md-none {{$t('common.add_event')}}
- b-nav-item(v-if='$auth.loggedIn' to='/settings' v-b-tooltip :title='$t("common.settings")')
- span.d-md-none {{$t('common.settings')}}
- b-nav-item(v-if='$auth.user && $auth.user.is_admin' to='/admin' v-b-tooltip :title='$t("common.admin")')
- span.d-md-none {{$t('common.admin')}}
- b-nav-item(to='/export' v-b-tooltip :title='$t("common.export")')
- span.d-md-none {{$t('common.export')}}
- b-nav-item(v-if='$auth.loggedIn' @click='logout' v-b-tooltip :title='$t("common.logout")')
- span.d-md-none {{$t('common.logout')}}
- b-nav-item
- b-navbar-nav.ml-auto
- b-nav-item(to='/about')
- span {{$t('common.info')}}
+ el-menu.d-grid.nav(mode='horizontal' router background-color="#222C32")
+
+ el-menu-item(v-if='!$auth.loggedIn' index='/login' :title="$t('common.login')")
+ v-icon(color='lightgreen' name='user')
+
+ el-menu-item(index='/add' :title="$t('common.add_event')")
+ v-icon(color='lightgreen' name='plus')
+
+ el-menu-item(v-if='$auth.loggedIn' index='/settings' :title="$t('common.settings')")
+ v-icon(color='orange' name='cog')
+
+ el-menu-item(v-if='$auth.user && $auth.user.is_admin' index='/admin' :title="$t('common.admin')")
+ v-icon(color='lightblue' name='tools')
+
+ el-menu-item(index='/export' :title="$t('common.share')")
+ v-icon(name='share' color='yellow')
+
+ el-menu-item(v-if='$auth.loggedIn' @click='logout' :title="$t('common.logout')")
+ v-icon(color='red' name='sign-out-alt')
+
+ el-popover(
+ placement="bottom"
+ trigger="click")
+ Search
+ el-menu-item(slot='reference')
+ v-icon(color='lightblue' name='search')
+
+ el-menu-item.float-right(index='/about' :title="$t('common.info')")
+ img#logo(src='/favicon.ico')
+
+
diff --git a/components/Search.vue b/components/Search.vue
index fbc3ed2d..16280382 100644
--- a/components/Search.vue
+++ b/components/Search.vue
@@ -1,23 +1,64 @@
- div
- el-select.mr-1(v-model='filters_places' multiple filterable collapse-tags
- default-first-option :placeholder='$t("Where")')
- el-option(v-for='place in places' :value='place.name'
- :label='place.name' :key='place.id')
- el-select(v-model='filters_tags' multiple filterable collapse-tags
- default-first-option :placeholder='$t("Tags")')
- el-option(v-for='tag in tags' :key='tag.tag'
- :label='tag.tag' :value='tag.tag')
+ div.ml-2.mt-1
+ el-switch.mb-1(v-if='$auth.loggedIn'
+ active-text='solo miei'
+ inactive-text='tutti'
+ inactive-color='lightgreen'
+ v-model='onlyMine'
+ )
+ el-switch.mt-1.mb-1.ml-2.d-block(
+ inactive-text='futuri'
+ active-text='anche passati'
+ inactive-color='lightgreen'
+ v-model='showPast'
+ )
+
+ el-select.search(v-model='filter' multiple
+ filterable collapse-tags default-first-option
+ :placeholder='$t("common.search")')
+ el-option(v-for='(keyword, id) in keywords' :key='keyword.value'
+ :label='keyword.label' :value='keyword.value')
+
+
diff --git a/layouts/default.vue b/layouts/default.vue
index fe2d459b..1a2ea589 100644
--- a/layouts/default.vue
+++ b/layouts/default.vue
@@ -1,71 +1,6 @@
-
- #app
- Nav
- Home
- transition(name="fade" mode="out-in")
- nuxt
+
+
-
-
-
-
diff --git a/locales/email/en.json b/locales/email/en.json
new file mode 100644
index 00000000..fced2be4
--- /dev/null
+++ b/locales/email/en.json
@@ -0,0 +1,5 @@
+{
+ "registration_email": "registration_email",
+ "recover_email": "recover_email",
+ "press here": "press here"
+}
\ No newline at end of file
diff --git a/locales/email/es.json b/locales/email/es.json
new file mode 100644
index 00000000..fced2be4
--- /dev/null
+++ b/locales/email/es.json
@@ -0,0 +1,5 @@
+{
+ "registration_email": "registration_email",
+ "recover_email": "recover_email",
+ "press here": "press here"
+}
\ No newline at end of file
diff --git a/locales/email/it.json b/locales/email/it.json
new file mode 100644
index 00000000..fced2be4
--- /dev/null
+++ b/locales/email/it.json
@@ -0,0 +1,5 @@
+{
+ "registration_email": "registration_email",
+ "recover_email": "recover_email",
+ "press here": "press here"
+}
\ No newline at end of file
diff --git a/locales/email/zh.json b/locales/email/zh.json
new file mode 100644
index 00000000..fced2be4
--- /dev/null
+++ b/locales/email/zh.json
@@ -0,0 +1,5 @@
+{
+ "registration_email": "registration_email",
+ "recover_email": "recover_email",
+ "press here": "press here"
+}
\ No newline at end of file
diff --git a/locales/it.json b/locales/it.json
deleted file mode 100644
index 00c1e34a..00000000
--- a/locales/it.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "common": {
- "login": "Entra",
- "email": "Email",
- "password": "Password",
- "register": "Registrati",
- "send": "Invia",
- "description": "Descrizione",
- "info": "Info",
- "add_event": "Aggiungi evento",
- "export": "Esporta",
- "settings": "Impostazioni",
- "admin": "Amministra",
- "logout": "Esci",
- "where": "Dove",
- "when": "Quando",
- "next": "Avanti",
- "what": "Cosa",
- "address": "Indirizzo",
- "media": "Media",
- "today": "Oggi",
- "users": "Utenti",
- "places": "Posti",
- "events": "Eventi",
- "tags": "Etichette",
- "deactivate": "Disattiva",
- "activate": "Attiva",
- "remove_admin": "Rimuovi Admin",
- "name": "Nome",
- "save": "Salva",
- "confirm": "Conferma",
- "tag": "Etichetta",
- "color": "Colore",
- "associate": "Associa",
- "hide": "Nascondi",
- "remove": "Elimina",
- "edit": "Modifica",
- "actions": "Azioni",
- "resources": "Risorse",
- "add": "Aggiungi"
- },
-
- "login": {
- "description": "Entrando puoi pubblicare nuovi eventi.",
- "not_registered": "Non sei registrata?",
- "forgot_password": "Ho dimenticato la password",
- "insert_email": "Inserisci la mail",
- "check_email": "Controlla la tua casella di posta (anche la cartella spam)",
- "error": "Errore nel login"
- },
-
- "register": {
- "description": "I movimenti hanno bisogno di organizzarsi e autofinanziarsi.
Questo è un dono per voi, usatelo solo per eventi non commerciali e ovviamente antifascisti, antisessisti, antirazzisti.
Prima di poter pubblicare dobbiamo approvare l'account, considera che dietro questo sito ci sono delle persone di carne e sangue, scrivici quindi due righe per farci capire che eventi vorresti pubblicare.",
- "complete": "",
- "admin_complete": ""
- },
-
- "event": {
- "anon": "",
- "anon_description": "",
- "where_description" : "Dov'è il gancio? Se è un luogo fisico, scrivi il suo nome del per esteso (tipo 'Mezcal Squat'), se è una Piazza/Via metti quella (tipo 'Piazza Castello, Torino'). Se trovi già il luogo dell'evento premilo e l'indirizzo verrà autocompletato.",
- "address_description": "",
- "tag_description": "Puoi inserire un tag (es. concerto, corteo)",
- "added": "Avento aggiunto"
- },
-
- "admin": {
- "event_confirm_description": "Qui puoi confermare gli eventi inseriti da utenti non iscritti",
- "tag_description": "Cambia il colore delle etichette",
- "place_description": "Modifica l'indirizzo di un posto",
- "mastodon_description": "Puoi associare un account mastodon a questa istanza di gancio. Tutti gli eventi verranno pubblicati li'",
- "mastodon_instance": "Istanza mastodon"
- }
-}
diff --git a/nuxt.config.js b/nuxt.config.js
index 0dbc9c6e..36a30f9f 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -1,4 +1,4 @@
-const pkg = require('./package')
+const { SHARED_CONF } = require('./config')
module.exports = {
mode: 'universal',
@@ -7,11 +7,11 @@ module.exports = {
** Headers of the page
*/
head: {
- title: pkg.name,
+ title: SHARED_CONF.title,
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
- { hid: 'description', name: 'description', content: pkg.description }
+ { hid: 'description', name: 'description', content: SHARED_CONF.description }
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
},
@@ -23,27 +23,26 @@ module.exports = {
/*
** Customize the progress-bar color
*/
- loading: { color: '#fff' },
+ // loading: { color: '#fff' },
/*
** Global CSS
*/
css: [
- 'element-ui/lib/theme-chalk/index.css',
'bootstrap/dist/css/bootstrap.css',
- 'bootstrap-vue/dist/bootstrap-vue.css',
- 'v-calendar/lib/v-calendar.min.css'
+ 'element-ui/lib/theme-chalk/index.css',
],
-
/*
** Plugins to load before mounting the App
*/
- plugins: ['@/plugins/element-ui', '@/plugins/filters',
- '@/plugins/i18n', '@/plugins/bootstrap-vue',
- '@/plugins/vue-awesome',
- { src: '@/plugins/v-calendar', ssr: false },
- { src: '@/plugins/vuex-persist.js', ssr: false },
- '@/plugins/magic-grid'],
+ plugins: [
+ '@/plugins/element-ui', // UI library -> https://element.eleme.io/#/en-US/
+ '@/plugins/filters', // text filters, datetime, etc.
+ '@/plugins/i18n', // localization plugin
+ '@/plugins/vue-awesome', // icon
+ { src: '@/plugins/v-calendar', ssr: false }, // calendar, TO-REDO
+ '@/plugins/initialize'
+ ],
/*
** Nuxt.js modules
@@ -57,18 +56,18 @@ module.exports = {
** Axios module configuration
*/
axios: {
- baseURL: '',
+ baseURL: SHARED_CONF.baseurl + '/api',
+ browserBaseURL: SHARED_CONF.baseurl + '/api',
prefix: '/api',
- credentials: true
+ // credentials: true
// See https://github.com/nuxt-community/axios-module#options
},
-
auth: {
strategies: {
local: {
endpoints: {
login: { url: '/auth/login', method: 'post', propertyName: 'token' },
- logout: { url: '/auth/logout', method: 'post' },
+ logout: false,
user: { url: '/auth/user', method: 'get', propertyName: false }
},
}
@@ -80,12 +79,14 @@ module.exports = {
** Build configuration
*/
build: {
- transpile: [/^element-ui/, /^vue-awesome/, /^vue-magic-grid/, /^vuex-persist/],
-
+ transpile: [/^element-ui/, /^vue-awesome/],
+ splitChunks: {
+ layouts: true
+ }
/*
** You can extend webpack config here
*/
- extend(config, ctx) {
+ // extend(config, ctx) {
// Run ESLint on save
// if (ctx.isDev && ctx.isClient) {
// config.module.rules.push({
@@ -95,6 +96,6 @@ module.exports = {
// exclude: /(node_modules)/
// })
// }
- }
+ // }
}
}
diff --git a/package.json b/package.json
index 73aa6086..417becf3 100644
--- a/package.json
+++ b/package.json
@@ -18,31 +18,33 @@
"axios": "^0.18.0",
"bcrypt": "^3.0.5",
"body-parser": "^1.18.3",
- "bootstrap-vue": "^2.0.0-rc.16",
+ "bootstrap": "4.3.1",
"cookie-parser": "^1.4.4",
"cors": "^2.8.5",
"cross-env": "^5.2.0",
"dayjs": "^1.8.11",
- "element-ui": "^2.4.11",
+ "element-ui": "^2.8.2",
"email-templates": "^5.0.4",
"express": "^4.16.4",
"express-jwt": "^5.3.1",
"ics": "^2.13.2",
"js-cookie": "^2.2.0",
"jsonwebtoken": "^8.5.1",
+ "less": "^3.9.0",
+ "less-loader": "^5.0.0",
"mastodon-api": "^1.3.0",
"morgan": "^1.9.1",
"multer": "^1.4.1",
"nuxt": "^2.4.0",
"pg": "^7.10.0",
"sequelize": "^5.2.1",
+ "sequelize-cli": "^5.4.0",
"sharp": "^0.22.0",
"sqlite3": "^4.0.6",
- "v-calendar": "^0.9.7",
+ "v-calendar": "^1.0.0-beta.10",
"vue-awesome": "^3.5.1",
"vue-custom-element": "^3.2.6",
"vue-i18n": "^8.10.0",
- "vue-magic-grid": "^0.0.4",
"vuex-persist": "^2.0.0"
},
"devDependencies": {
diff --git a/pages/about.vue b/pages/about.vue
index 81805c9e..43c5aab2 100644
--- a/pages/about.vue
+++ b/pages/about.vue
@@ -1,6 +1,6 @@
- b-modal(hide-footer @hidden='$router.replace("/")' :title='$t("About")'
- :visible='true' size='lg')
+ el-dialog(:title='$t("common.info")' visible
+ :before-close='close')
h5 Chi siamo
p.
Gancio e' un progetto dell'underscore hacklab e uno dei
@@ -18,11 +18,9 @@
blockquote.
Se vieni a Torino e dici: "ehi, ci diamo un gancio alle 8?" nessuno si presenterà con i guantoni per fare a mazzate.
Darsi un gancio vuol dire beccarsi alle ore X in un posto Y
- p
- small A: a che ora è il gancio in radio per andare al presidio?
- p
- small B: non so ma domani non posso venire, ho gia' un gancio per caricare il bar.
-
+ li A: a che ora è il gancio in radio per andare al presidio?
+ li B: non so ma domani non posso venire, ho gia' un gancio per caricare il bar.
+ br
h5 Contatti
p.
@@ -31,4 +29,19 @@
qui. Aiuti e suggerimenti sono sempre benvenuti, puoi scriverci
su underscore chicciola autistici.org
-
\ No newline at end of file
+
+
diff --git a/pages/add/_edit.vue b/pages/add/_edit.vue
index f9a8ae44..37047935 100644
--- a/pages/add/_edit.vue
+++ b/pages/add/_edit.vue
@@ -1,8 +1,7 @@
- b-modal(ref='modal' @hidden='$router.replace("/")' size='lg' :visible='true'
- :title="edit?$t('common.edit_event'):$t('common.add_event')" hide-footer)
- el-form
- el-tabs.mb-2(v-model='activeTab' v-loading='sending')
+ el-dialog(:before-close='close' :visible='open' :title="edit?$t('common.edit_event'):$t('common.add_event')")
+ el-form(v-loading='loading')
+ el-tabs.mb-2(v-model='activeTab')
//- NOT LOGGED EVENT
el-tab-pane(v-if='!$auth.loggedIn')
@@ -12,19 +11,28 @@
//- WHERE
el-tab-pane
- span(slot='label') {{$t('common.where')}}
- div {{$t('common.where')}}
+ span(slot='label') {{$t('common.where')}}
+ div {{$t('common.where')}}
el-popover(
placement="top-start"
width="400"
- trigger="hover")
+ trigger="click")
v-icon(slot='reference' color='#ff9fc4' name='question-circle')
slot
- p {{$t('event.where_description')}}
- el-select.mb-3(v-model='event.place.name' @change='placeChoosed' filterable allow-create default-first-option)
+ p(v-html="$t('event.where_description')")
+
+ el-select.mb-3(v-model='event.place.name'
+ @change='placeChoosed'
+ filterable allow-create
+ default-first-option
+ )
el-option(v-for='place in places_name' :label='place' :value='place' :key='place.id')
- div {{$t("common.address")}}
- el-input.mb-3(ref='address' v-model='event.place.address' :disabled='places_name.indexOf(event.place.name)>-1' @keydown.native.enter='next')
+ br
+ br
+ div {{$t("common.address")}} {{event.place.name}}
+ el-input.mb-3(ref='address' v-model='event.place.address'
+ :disabled='places_name.indexOf(event.place.name)>-1'
+ @keydown.native.enter='next')
el-button.float-right(@click='next' :disabled='!couldProceed') {{$t('common.next')}}
//- WHEN
@@ -32,15 +40,27 @@
span(slot='label') {{$t('common.when')}}
span {{event.multidate ? $t('event.dates_description') : $t('event.date_description')}}
el-switch.float-right(v-model='event.multidate' :active-text="$t('event.multidate_description')")
- v-date-picker.mb-3(:mode='event.multidate ? "range" : "single"' v-model='date' is-inline
- is-expanded :min-date='new Date()' @input='date ? $refs.time_start.focus() : false')
- div {{$t('event.time_start_description')}}
- el-time-select.mb-3(ref='time_start'
- v-model="time.start"
- :picker-options="{ start: '00:00', step: '00:30', end: '24:00'}")
- div {{$t('event.time_end_description')}}
- el-time-select(v-model='time.end'
- :picker-options="{start: '00:00', step: '00:30', end: '24:00'}")
+
+ v-date-picker.mb-3(
+ :mode='event.multidate ? "range" : "single"'
+ :attributes='attributes'
+ v-model='date'
+ is-inline
+ is-expanded
+ :min-date='new Date()'
+ )
+
+ el-row
+ el-col(:span='12')
+ div {{$t('event.time_start_description')}}
+ el-time-select.mb-3(ref='time_start'
+ v-model="time.start"
+ :picker-options="{ start: '00:00', step: '00:30', end: '24:00'}")
+ div {{$t('event.time_end_description')}}
+ el-time-select(v-model='time.end'
+ :picker-options="{start: '00:00', step: '00:30', end: '24:00'}")
+ el-col(:span='12')
+ List(:events='todayEvents' :title='$t("event.same_day")')
el-button.float-right(@click='next' :disabled='!couldProceed') {{$t('common.next')}}
//- WHAT
@@ -61,35 +81,45 @@
el-tab-pane
span(slot='label') {{$t('common.media')}}
- span {{$t('event.media_description')}}
- b-form-file.mb-2(v-model='event.image', :placeholder='$t("common.poster")' accept='image/*')
- el-button.float-right(@click='done') {{edit?$t('common.edit'):$t('common.send')}}
-
-
+ el-upload.text-center(
+ action=''
+ :limit="1"
+ :auto-upload='false'
+ drag
+ :on-change='uploadedFile'
+ :multiple='false'
+ :file-list="fileList"
+ )
+ i.el-icon-upload
+ div.el-upload__text {{$t('event.media_description')}}
+ el-button.float-right(@click='done' :disabled='!couldProceed') {{edit?$t('common.edit'):$t('common.send')}}
\ No newline at end of file
diff --git a/pages/embed/list.vue b/pages/embed/list.vue
index 8816a8e1..7ca16b0c 100644
--- a/pages/embed/list.vue
+++ b/pages/embed/list.vue
@@ -1,22 +1,26 @@
- div
- p porcodio
+ List(:events="events" :title='title')
diff --git a/pages/event/_id.vue b/pages/event/_id.vue
index 7fd32d5f..34483559 100644
--- a/pages/event/_id.vue
+++ b/pages/event/_id.vue
@@ -1,54 +1,81 @@
- b-modal#eventDetail(ref='eventDetail' hide-body hide-header hide-footer @hidden='$router.replace("/")' size='lg' :visible='true')
- b-card(no-body, :img-src='imgPath' v-loading='loading')
- nuxt-link(to='/')
- el-button.close_button(circle icon='el-icon-close' type='success'
- @click.prevent='$refs.eventDetail.hide()')
- b-card-header
- h3 {{event.title}}
- v-icon(name='clock')
- span {{event.start_datetime|datetime}}
- br
- v-icon(name='map-marker-alt')
- span {{event.place.name}} - {{event.place.address}}
- br
- b-card-body(v-if='event.description || event.tags')
- pre(v-html='event.description')
- el-tag.mr-1(:color='tag.color' v-for='tag in event.tags'
- size='mini' :key='tag.tag') {{tag.tag}}
- div(v-if='mine')
- hr
- el-button(v-if='event.is_visible' plain type='warning' @click.prevents='toggle' icon='el-icon-view') {{$t('common.hide')}}
- el-button(v-else plain type='success' @click.prevents='toggle' icon='el-icon-view') {{$t('common.confirm')}}
- el-button(plain type='danger' @click.prevent='remove' icon='el-icon-remove') {{$t('common.remove')}}
- el-button(plain type='primary' @click='$router.replace("/edit/"+event.id)') {{$t('common.edit')}}
+ el-card#eventDetail(
+ visible hide-header
+ no-header :show-close='false'
+ top='0vh !important'
+ :appendToBody='true')
- b-card-body(v-if='event.activitypub_id')
- strong {{$t('common.resources')}} -
+ //- close button
+ nuxt-link.float-right(to='/')
+ el-button(circle icon='el-icon-close' type='danger' size='small' plain)
+
+ //- title, where, when
+ h5.text-center {{event.title}}
+ div.nextprev
+ nuxt-link(v-if='prev' :to='`/event/${prev.id}`')
+ el-button(icon='el-icon-arrow-left' round size='small' type='success' plain)
+ nuxt-link.float-right(v-if='next' :to='`/event/${next.id}`')
+ el-button(icon='el-icon-arrow-right' round size='small' plain type='success')
+
+ //- image
+ img(:src='imgPath' v-if='event.image_path')
+
+ .info
+ div {{event|event_when}}
+ div {{event.place.name}} - {{event.place.address}}
+
+ //- description and tags
+ div(v-if='event.description || event.tags')
+ pre(v-html='event.description')
+ el-tag.mr-1(v-for='tag in event.tags'
+ size='mini' :key='tag.tag') {{tag.tag}}
+
+ //- show hide, confirm, delete, edit buttons when allowed
+ div(v-if='mine')
+ hr
+ el-button(v-if='event.is_visible' size='mini' plain type='warning' @click.prevents='toggle' icon='el-icon-view') {{$t('common.hide')}}
+ el-button(v-else plain type='success' size='mini' @click.prevents='toggle' icon='el-icon-view') {{$t('common.confirm')}}
+ el-button(plain type='danger' size='mini' @click.prevent='remove' icon='el-icon-remove') {{$t('common.remove')}}
+ el-button(plain type='primary' size='mini' @click='$router.replace(`/add/${event.id}`)' icon='el-icon-edit') {{$t('common.edit')}}
+
+ //- comments
+ .card-body(v-if='event.activitypub_id')
+ strong {{$t('common.related')}} -
a(:href='`https://mastodon.cisti.org/web/statuses/${event.activitypub_id}`') {{$t('common.add')}}
- b-card-header(v-for='comment in event.comments' :key='comment.id')
+ .card-header(v-for='comment in event.comments' :key='comment.id')
img.avatar(:src='comment.data.last_status.account.avatar')
strong {{comment.author}}
a.float-right(:href='comment.data.last_status.url')
small {{comment.data.last_status.created_at|datetime}}
div.mt-1(v-html='comment_filter(comment.text)')
img(v-for='img in comment.data.last_status.media_attachments' :src='img.preview_url')
- //- span {{comment}}
+
-
diff --git a/pages/export.vue b/pages/export.vue
index f722e2de..76c1907c 100644
--- a/pages/export.vue
+++ b/pages/export.vue
@@ -1,13 +1,12 @@
- b-modal(ref='modal' @hidden='$router.replace("/")'
- :title='$t("common.export")' :visible='true' size='lg' hide-footer)
+ el-dialog(:title='$t("common.export")' visible :before-close='close')
p {{$t('export.intro')}}
li(v-if='filters.tags.length') {{$t('common.tags')}}:
- el-tag.ml-1(color='#409EFF' size='mini' v-for='tag in filters.tags' :key='tag.tag') {{tag}}
+ el-tag.ml-1(size='mini' v-for='tag in filters.tags' :key='tag.tag') {{tag}}
li(v-if='filters.places.length') {{$t('common.places')}}:
- el-tag.ml-1(color='#409EFF' size='mini' v-for='place in filters.places' :key='place.id') {{place}}
- el-tabs.mt-2(tabPosition='left' v-model='type')
+ el-tag.ml-1(size='mini' v-for='place in filters.places' :key='place.id') {{place}}
+ el-tabs.mt-2(v-model='type')
el-tab-pane.pt-1(label='email' name='email')
p(v-html='$t(`export.email_description`)')
@@ -15,57 +14,50 @@
//- el-switch(v-model='notification.notify_on_add' :active-text="$t('notify_on_insert')")
//- br
//- el-switch.mt-2(v-model='notification.send_notification' :active-text="$t('send_notification')")
- el-input.mt-2(v-model='notification.email' :placeholder="$t('common.insert_your_address')" ref='email')
- el-button.mt-2.float-right(native-type= 'submit' type='success' @click='add_notification') {{$t('Send')}}
+ el-input.mt-2(v-model='notification.email' :placeholder="$t('export.insert_your_address')" ref='email')
+ el-button.mt-2.float-right(native-type= 'submit' type='success' @click='add_notification') {{$t('common.send')}}
el-tab-pane.pt-1(label='feed rss' name='feed')
span(v-html='$t(`export.feed_description`)')
el-input(v-model='link')
- el-button(slot='append' plain type="primary" icon='el-icon-document' v-clipboard:copy="link") {{$t("common.copy")}}
+ el-button(slot='append' plain type="primary" icon='el-icon-document' ) {{$t("common.copy")}}
el-tab-pane.pt-1(label='ics/ical' name='ics')
p(v-html='$t(`export.ical_description`)')
el-input(v-model='link')
- el-button(slot='append' plain type="primary" icon='el-icon-document' v-clipboard:copy="link") {{$t("common.opy")}}
+ el-button(slot='append' plain type="primary" icon='el-icon-document') {{$t("common.copy")}}
el-tab-pane.pt-1(label='list' name='list')
p(v-html='$t(`export.list_description`)')
- //- el-form-item(:label="$t('export.show_tags')")
- el-switch(v-model='list.show_tags')
-
- iframe(:src='`http://localhost:3000/embed/list?tags=cia&showtags=${list.show_tags?"true":""}`' height='300')
- //- el-card.mb-1(no-body header='Eventi')
- //- b-list-group#list(flush)
- //- b-list-group-item.flex-column.align-items-start(v-for="event in filteredEvents" :key='event.id'
- //- :to='`/event/${event.id}`')
- //- //- b-media
- //- img(v-if='event.image_path' slot="aside" :src="imgPath(event)" alt="Meia Aside" style='max-height: 60px')
- //- small.float-right {{event.start_datetime|datetime}}
- //- strong.mb-1 {{event.title}}
- //- br
- //- small.float-right {{event.place.name}}
- //- el-tag.mr-1(:color='tag.color || "grey"' size='mini' v-for='tag in event.tags' :key='tag.tag') {{tag.tag}}
- el-input.mb-1(type='textarea' v-model='script')
- el-button.float-right(plain type="primary" icon='el-icon-document' v-clipboard:copy="script") Copy
+
+ el-row
+ el-col.mr-2(:span='11')
+ el-input(v-model='list.title') Title
+ el-col.float-right(:span='12')
+ List(
+ :title='list.title'
+ :events='filteredEvents'
+ )
+ el-input.mb-1(type='textarea' v-model='listScript' readonly )
+ el-button.float-right(plain type="primary" icon='el-icon-document') {{$t('common.copy')}}
- el-tab-pane.pt-1(label='calendar' name='calendar')
- p(v-html='$t(`export.calendar_description`)')
- //- no-ssr
- Calendar.mb-1
- el-input.mb-1(type='textarea' v-model='script')
- el-button.float-right(plain type="primary" icon='el-icon-document' v-clipboard:copy="script") Copy
+ //- el-tab-pane.pt-1(label='calendar' name='calendar')
+ //- p(v-html='$t(`export.calendar_description`)')
+ //- //- no-ssr
+ //- Calendar.mb-1
+ //- el-input.mb-1(type='textarea' v-model='script')
+ //- el-button.float-right(plain type="primary" icon='el-icon-document') Copy
+
diff --git a/pages/login.vue b/pages/login.vue
index eac775f2..518a4982 100644
--- a/pages/login.vue
+++ b/pages/login.vue
@@ -1,15 +1,21 @@
- b-modal(@shown="$refs.email.focus()" :title='$t("common.login")' hide-footer
- @hidden='$router.replace("/")' :visible='true' ref='modal')
+
+ el-dialog(:title='$t("common.login")' :before-close='close' visible)
+
el-form(v-loading='loading')
p(v-html="$t('login.description')")
+
el-input.mb-2(v-model='email' type='email' :placeholder='$t("common.email")' autocomplete='email' ref='email')
- v-icon(name='user' slot='prepend')
+ i.el-icon-user(slot='prepend')
+
el-input.mb-1(v-model='password' @keyup.enter.native="submit" type='password' :placeholder='$t("common.password")')
- v-icon(name="lock" slot='prepend')
- el-button.mr-1(plain type="success" @click='submit') {{$t('common.login')}}
- router-link(to='/register')
+ i.el-icon-lock(slot='prepend')
+
+ el-button.mr-1(plain type="success" :disabled='!email || !password' @click='submit') {{$t('common.login')}}
+
+ nuxt-link(to='/register')
el-button.mt-1(plain type="primary") {{$t('login.not_registered')}}
+
a.float-right(href='#' @click='forgot') {{$t('login.forgot_password')}}
@@ -17,18 +23,22 @@
const Cookie = process.client ? require('js-cookie') : undefined
import { mapActions } from 'vuex'
import { Message } from 'element-ui'
-// import api from '@/plugins/api'
+import get from 'lodash/get'
export default {
name: 'Login',
data () {
return {
+ open: true,
password: '',
email: '',
loading: false
}
},
methods: {
+ close () {
+ this.$router.replace('/')
+ },
...mapActions(['login']),
async forgot () {
if (!this.email) {
@@ -37,7 +47,7 @@ export default {
return
}
this.loading = true
- // await api.forgotPassword(this.email)
+ await this.$axios.$post('/user/recover', { email: this.email })
this.loading = false
Message({ message: this.$t('login.check_email'), type: 'success' })
},
@@ -49,12 +59,12 @@ export default {
this.loading = false
Message({ message: this.$t('login.ok'), type: 'success' })
} catch (e) {
- Message({ message: this.$t('login.error') + e, type: 'error' })
+ e = get(e, 'response.data.message', e)
+ Message({ message: this.$t('login.error') + this.$t(e), type: 'error' })
this.loading = false
return
}
this.email = this.password = ''
- this.$refs.modal.hide()
}
}
}
diff --git a/pages/register.vue b/pages/register.vue
index c3b28087..b37d2917 100644
--- a/pages/register.vue
+++ b/pages/register.vue
@@ -1,9 +1,8 @@
- b-modal(hide-footer @hidden='$router.replace("/")' ref='modal'
- :title="$t('common.register')" :visible='true' @shown='$refs.email.focus()')
+ el-dialog(:title="$t('common.register')" visible :before-close='() => $router.replace("/")' @open='$refs.email.focus()')
el-form
p(v-html="$t('register.description')")
- el-input.mb-2(ref='email' v-model='user.email' type='email'
+ el-input.mb-2(ref='email' v-model='user.email' type='email' required
:placeholder='$t("common.email")' autocomplete='email')
span(slot='prepend') @
@@ -13,11 +12,10 @@
el-input.mb-2(v-model='user.description' type="textarea" rows='3' :placeholder="$t('common.description')")
v-icon(name='envelope-open-text')
- el-button.float-right(plain type="success" icon='el-icon-arrow-right' @click='register') {{$t('common.send')}}
+ el-button(plain type="success" icon='el-icon-arrow-right' :disabled='!user.password || !user.email || !user.description' @click='register') {{$t('common.send')}}