clipboard / add date to rss title
This commit is contained in:
parent
fa57a30b60
commit
c58294dcbf
7 changed files with 23 additions and 15 deletions
|
@ -66,6 +66,7 @@
|
|||
"sqlite3": "^4.0.8",
|
||||
"v-calendar": "^1.0.0-beta.14",
|
||||
"vue-awesome": "^3.5.3",
|
||||
"vue-clipboard2": "^0.3.0",
|
||||
"yargs": "^13.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<template lang="pug">
|
||||
el-card
|
||||
nuxt-link.float-right(to='/')
|
||||
v-icon(name='times' color='red')
|
||||
el-button(circle icon='el-icon-close' type='danger' size='small' plain)
|
||||
|
||||
h5 {{edit?$t('common.edit_event'):$t('common.add_event')}}
|
||||
el-form
|
||||
el-form(v-loading='loading')
|
||||
no-ssr
|
||||
el-tabs.mb-2(v-model='activeTab')
|
||||
|
||||
|
@ -122,6 +123,7 @@ export default {
|
|||
date: null,
|
||||
time: { start: '20:00', end: null },
|
||||
edit: false,
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
name: 'newEvent',
|
||||
|
@ -269,6 +271,7 @@ export default {
|
|||
this.event.image = file
|
||||
},
|
||||
async done () {
|
||||
this.loading = true
|
||||
let start_datetime, end_datetime
|
||||
const [ start_hour, start_minute ] = this.time.start.split(':')
|
||||
if (!this.time.end) {
|
||||
|
@ -309,8 +312,11 @@ export default {
|
|||
}
|
||||
this.updateMeta()
|
||||
this.$router.replace('/')
|
||||
this.loading = false
|
||||
Message({ type: 'success', showClose: true, message: this.$auth.loggedIn ? this.$t('event.added') : this.$t('event.added_anon')})
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
Message({ type: 'danger', showClose: true, message: e })
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
el-card#eventDetail
|
||||
//- close button
|
||||
nuxt-link.float-right(to='/')
|
||||
v-icon(name='times' color='red')
|
||||
el-button(circle icon='el-icon-close' type='danger' size='small' plain)
|
||||
|
||||
div(v-if='!event')
|
||||
h5 {{$t('event.not_found')}}
|
||||
|
|
|
@ -2,15 +2,11 @@
|
|||
el-card
|
||||
|
||||
nuxt-link.float-right(to='/')
|
||||
v-icon(name='times' color='red')
|
||||
el-button(circle icon='el-icon-close' type='danger' size='small' plain)
|
||||
h5 {{$t('common.export')}}
|
||||
|
||||
p {{$t('export.intro')}}
|
||||
Search
|
||||
//- li(v-if='filters.tags.length') {{$t('common.tags')}}:
|
||||
//- 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(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')
|
||||
|
@ -25,12 +21,14 @@
|
|||
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' ) {{$t("common.copy")}}
|
||||
el-button(slot='append' plain
|
||||
v-clipboard:copy='link'
|
||||
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') {{$t("common.copy")}}
|
||||
el-button(slot='append' v-clipboard:copy='link' 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`)')
|
||||
|
@ -44,7 +42,7 @@
|
|||
: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-button.float-right(plain v-clipboard:copy='listScript' type='primary' icon='el-icon-document') {{$t('common.copy')}}
|
||||
|
||||
|
||||
//- el-tab-pane.pt-1(label='calendar' name='calendar')
|
||||
|
@ -106,7 +104,7 @@ export default {
|
|||
params.push(`tags=${this.filters.tags}`)
|
||||
}
|
||||
|
||||
return `<iframe src="${this.settings.baseurl}/embed/list?${params.join('&')}"></iframe>`
|
||||
return `<iframe style='border: 0px; width: 100%;' src="${this.settings.baseurl}/embed/list?${params.join('&')}"></iframe>`
|
||||
},
|
||||
link () {
|
||||
const tags = this.filters.tags.join(',')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template lang='pug'>
|
||||
el-card
|
||||
nuxt-link.float-right(to='/')
|
||||
v-icon(name='times' color='red')
|
||||
el-button(circle icon='el-icon-close' type='danger' size='small' plain)
|
||||
h5 {{$t('common.login')}}
|
||||
el-form(v-loading='loading')
|
||||
p(v-html="$t('login.description')")
|
||||
|
|
|
@ -28,6 +28,9 @@ import 'vue-awesome/icons/times'
|
|||
|
||||
import Icon from 'vue-awesome/components/Icon'
|
||||
|
||||
import VueClipboard from 'vue-clipboard2'
|
||||
|
||||
export default () => {
|
||||
Vue.component('v-icon', Icon)
|
||||
Vue.use(VueClipboard)
|
||||
}
|
||||
|
|
|
@ -9,13 +9,13 @@ rss(version='2.0')
|
|||
lastBuildDate= new Date(posts[0].publishedAt).toUTCString()
|
||||
each event in events
|
||||
item
|
||||
title= event.title
|
||||
title [#{moment(event.start_datetime*1000).format("D-MM-YY")}] #{event.title} @#{event.place.name}
|
||||
link #{config.baseurl}/event/#{event.id}
|
||||
description
|
||||
| <![CDATA[
|
||||
| <h4>#{event.title}</h4>
|
||||
| <strong>#{event.place.name} - #{event.place.address}</strong>
|
||||
| #{moment(event.start_datetime).format("dddd, D MMMM HH:mm")}<br/>
|
||||
| #{moment(event.start_datetime*1000).format("dddd, D MMMM HH:mm")}<br/>
|
||||
| <img src="#{config.apiurl}/media/#{event.image_path}"/>
|
||||
| <pre>!{event.description}</pre>
|
||||
| ]]>
|
||||
|
|
Loading…
Reference in a new issue