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",
|
"sqlite3": "^4.0.8",
|
||||||
"v-calendar": "^1.0.0-beta.14",
|
"v-calendar": "^1.0.0-beta.14",
|
||||||
"vue-awesome": "^3.5.3",
|
"vue-awesome": "^3.5.3",
|
||||||
|
"vue-clipboard2": "^0.3.0",
|
||||||
"yargs": "^13.2.4"
|
"yargs": "^13.2.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
el-card
|
el-card
|
||||||
nuxt-link.float-right(to='/')
|
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')}}
|
h5 {{edit?$t('common.edit_event'):$t('common.add_event')}}
|
||||||
el-form
|
el-form(v-loading='loading')
|
||||||
no-ssr
|
no-ssr
|
||||||
el-tabs.mb-2(v-model='activeTab')
|
el-tabs.mb-2(v-model='activeTab')
|
||||||
|
|
||||||
|
@ -122,6 +123,7 @@ export default {
|
||||||
date: null,
|
date: null,
|
||||||
time: { start: '20:00', end: null },
|
time: { start: '20:00', end: null },
|
||||||
edit: false,
|
edit: false,
|
||||||
|
loading: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
name: 'newEvent',
|
name: 'newEvent',
|
||||||
|
@ -269,6 +271,7 @@ export default {
|
||||||
this.event.image = file
|
this.event.image = file
|
||||||
},
|
},
|
||||||
async done () {
|
async done () {
|
||||||
|
this.loading = true
|
||||||
let start_datetime, end_datetime
|
let start_datetime, end_datetime
|
||||||
const [ start_hour, start_minute ] = this.time.start.split(':')
|
const [ start_hour, start_minute ] = this.time.start.split(':')
|
||||||
if (!this.time.end) {
|
if (!this.time.end) {
|
||||||
|
@ -309,8 +312,11 @@ export default {
|
||||||
}
|
}
|
||||||
this.updateMeta()
|
this.updateMeta()
|
||||||
this.$router.replace('/')
|
this.$router.replace('/')
|
||||||
|
this.loading = false
|
||||||
Message({ type: 'success', showClose: true, message: this.$auth.loggedIn ? this.$t('event.added') : this.$t('event.added_anon')})
|
Message({ type: 'success', showClose: true, message: this.$auth.loggedIn ? this.$t('event.added') : this.$t('event.added_anon')})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
this.loading = false
|
||||||
|
Message({ type: 'danger', showClose: true, message: e })
|
||||||
console.error(e)
|
console.error(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
el-card#eventDetail
|
el-card#eventDetail
|
||||||
//- close button
|
//- close button
|
||||||
nuxt-link.float-right(to='/')
|
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')
|
div(v-if='!event')
|
||||||
h5 {{$t('event.not_found')}}
|
h5 {{$t('event.not_found')}}
|
||||||
|
|
|
@ -2,15 +2,11 @@
|
||||||
el-card
|
el-card
|
||||||
|
|
||||||
nuxt-link.float-right(to='/')
|
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')}}
|
h5 {{$t('common.export')}}
|
||||||
|
|
||||||
p {{$t('export.intro')}}
|
p {{$t('export.intro')}}
|
||||||
Search
|
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-tabs.mt-2(v-model='type')
|
||||||
|
|
||||||
//- el-tab-pane.pt-1(label='email' name='email')
|
//- el-tab-pane.pt-1(label='email' name='email')
|
||||||
|
@ -25,12 +21,14 @@
|
||||||
el-tab-pane.pt-1(label='feed rss' name='feed')
|
el-tab-pane.pt-1(label='feed rss' name='feed')
|
||||||
span(v-html='$t(`export.feed_description`)')
|
span(v-html='$t(`export.feed_description`)')
|
||||||
el-input(v-model='link')
|
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')
|
el-tab-pane.pt-1(label='ics/ical' name='ics')
|
||||||
p(v-html='$t(`export.ical_description`)')
|
p(v-html='$t(`export.ical_description`)')
|
||||||
el-input(v-model='link')
|
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')
|
el-tab-pane.pt-1(label='list' name='list')
|
||||||
p(v-html='$t(`export.list_description`)')
|
p(v-html='$t(`export.list_description`)')
|
||||||
|
@ -44,7 +42,7 @@
|
||||||
:events='filteredEvents'
|
:events='filteredEvents'
|
||||||
)
|
)
|
||||||
el-input.mb-1(type='textarea' v-model='listScript' readonly )
|
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')
|
//- el-tab-pane.pt-1(label='calendar' name='calendar')
|
||||||
|
@ -106,7 +104,7 @@ export default {
|
||||||
params.push(`tags=${this.filters.tags}`)
|
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 () {
|
link () {
|
||||||
const tags = this.filters.tags.join(',')
|
const tags = this.filters.tags.join(',')
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template lang='pug'>
|
<template lang='pug'>
|
||||||
el-card
|
el-card
|
||||||
nuxt-link.float-right(to='/')
|
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')}}
|
h5 {{$t('common.login')}}
|
||||||
el-form(v-loading='loading')
|
el-form(v-loading='loading')
|
||||||
p(v-html="$t('login.description')")
|
p(v-html="$t('login.description')")
|
||||||
|
|
|
@ -28,6 +28,9 @@ import 'vue-awesome/icons/times'
|
||||||
|
|
||||||
import Icon from 'vue-awesome/components/Icon'
|
import Icon from 'vue-awesome/components/Icon'
|
||||||
|
|
||||||
|
import VueClipboard from 'vue-clipboard2'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
Vue.component('v-icon', Icon)
|
Vue.component('v-icon', Icon)
|
||||||
|
Vue.use(VueClipboard)
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,13 +9,13 @@ rss(version='2.0')
|
||||||
lastBuildDate= new Date(posts[0].publishedAt).toUTCString()
|
lastBuildDate= new Date(posts[0].publishedAt).toUTCString()
|
||||||
each event in events
|
each event in events
|
||||||
item
|
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}
|
link #{config.baseurl}/event/#{event.id}
|
||||||
description
|
description
|
||||||
| <![CDATA[
|
| <![CDATA[
|
||||||
| <h4>#{event.title}</h4>
|
| <h4>#{event.title}</h4>
|
||||||
| <strong>#{event.place.name} - #{event.place.address}</strong>
|
| <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}"/>
|
| <img src="#{config.apiurl}/media/#{event.image_path}"/>
|
||||||
| <pre>!{event.description}</pre>
|
| <pre>!{event.description}</pre>
|
||||||
| ]]>
|
| ]]>
|
||||||
|
|
Loading…
Reference in a new issue