diff --git a/.vscode/vscode-kanban.json b/.vscode/vscode-kanban.json
index 9d48a542..9e4d1a8f 100644
--- a/.vscode/vscode-kanban.json
+++ b/.vscode/vscode-kanban.json
@@ -32,6 +32,17 @@
"prio": 0,
"references": [],
"title": "export lista"
+ },
+ {
+ "assignedTo": {
+ "name": "lesion"
+ },
+ "category": "feature",
+ "creation_time": "2019-04-23T19:56:46.263Z",
+ "id": "11",
+ "prio": 1,
+ "references": [],
+ "title": "get comments / media from mastodon"
}
],
"testing": [
@@ -72,17 +83,6 @@
"title": "rivedere ux / messaggi utente",
"type": "bug"
},
- {
- "assignedTo": {
- "name": "lesion"
- },
- "category": "feature",
- "creation_time": "2019-04-23T19:56:46.263Z",
- "id": "11",
- "prio": 1,
- "references": [],
- "title": "get comments / media from mastodon"
- },
{
"assignedTo": {
"name": "lesion"
@@ -115,6 +115,15 @@
"title": "risolvere le modali quando il js e' disabilitato",
"type": "bug"
},
+ {
+ "assignedTo": {
+ "name": "lesion"
+ },
+ "creation_time": "2019-04-29T10:01:01.632Z",
+ "id": "14",
+ "references": [],
+ "title": "gestione errori quando non c'e' un evento"
+ },
{
"assignedTo": {
"name": "lesion"
@@ -134,6 +143,15 @@
"references": [],
"title": "rifare il calendario o solo il popup"
},
+ {
+ "assignedTo": {
+ "name": "lesion"
+ },
+ "creation_time": "2019-04-28T09:25:50.701Z",
+ "id": "13",
+ "references": [],
+ "title": "test altra visualizzazione"
+ },
{
"assignedTo": {
"name": "lesion"
@@ -156,15 +174,6 @@
"references": [],
"title": "documentare sorgenti",
"type": "bug"
- },
- {
- "assignedTo": {
- "name": "lesion"
- },
- "creation_time": "2019-04-28T09:25:50.701Z",
- "id": "13",
- "references": [],
- "title": "test altra visualizzazione"
}
]
}
\ No newline at end of file
diff --git a/components/Nav.vue b/components/Nav.vue
index d10cf8c7..67f0f3f7 100644
--- a/components/Nav.vue
+++ b/components/Nav.vue
@@ -10,7 +10,7 @@
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.is_admin' to='/admin' v-b-tooltip :title='$t("common.admin")')
+ 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')}}
diff --git a/locales/it.json b/locales/it.json
index 6f37cec2..00c1e34a 100644
--- a/locales/it.json
+++ b/locales/it.json
@@ -35,7 +35,9 @@
"hide": "Nascondi",
"remove": "Elimina",
"edit": "Modifica",
- "actions": "Azioni"
+ "actions": "Azioni",
+ "resources": "Risorse",
+ "add": "Aggiungi"
},
"login": {
@@ -58,7 +60,8 @@
"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)"
+ "tag_description": "Puoi inserire un tag (es. concerto, corteo)",
+ "added": "Avento aggiunto"
},
"admin": {
@@ -69,4 +72,3 @@
"mastodon_instance": "Istanza mastodon"
}
}
-
diff --git a/pages/event/_id.vue b/pages/event/_id.vue
index 935612cf..7fd32d5f 100644
--- a/pages/event/_id.vue
+++ b/pages/event/_id.vue
@@ -14,7 +14,6 @@
br
b-card-body(v-if='event.description || event.tags')
pre(v-html='event.description')
- br
el-tag.mr-1(:color='tag.color' v-for='tag in event.tags'
size='mini' :key='tag.tag') {{tag.tag}}
div(v-if='mine')
@@ -24,27 +23,17 @@
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')}}
- //- COMMENTS ...
- //- b-navbar(type="dark" variant="dark" toggleable='lg')
- //- template(slot='footer')
- //- b-navbar-nav
- //- b-button(variant='success') {{$t('Share')}}
- //- b-nav-item( {{$t('')}})
- //- b-card-footer.text-right
- //- span.mr-3 {{event.comments.length}}
- //- a(href='#', @click='remove')
- v-icon(color='orange' name='times')
- //- el-footer(v-for='comment in event.comments')
- strong {{comment.author}}
- div(v-html='comment.text')
-
- //- el-timeline
- //- el-timeline-item(v-for='comment in event.comments')
- //- p(v-html='comment.text')
- //- a.el-timeline-item__timestamp(href='') {{comment.createdAt}}
- strong {{$t('common.comments')}}
- div.text.item(v-for='comment in event.comments')
- span(v-html='comment.text')
+ b-card-body(v-if='event.activitypub_id')
+ strong {{$t('common.resources')}} -
+ 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')
+ 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}}