gancio-upstream/pages/event/embedEvent.vue

36 lines
981 B
Vue
Raw Normal View History

2019-10-30 15:01:34 +01:00
<template lang='pug'>
v-card
v-card-title(v-text="$t('common.embed_title')")
v-card-text
v-row(:gutter='10')
v-col(:span='12' :xs='24')
v-alert.mb-1.mt-1(type='info' show-icon) {{$t('common.embed_help')}}
v-text-field(v-model='code')
v-col.mt-2(:span='12' :xs='24' v-html='code')
v-card-actions
v-spacer
v-btn(slot='append' v-clipboard:copy='code' v-clipboard:success='copyLink' color="primary") {{$t("common.copy")}}
2019-10-30 15:01:34 +01:00
</template>
<script>
import { mapState } from 'vuex'
export default {
2020-07-31 01:03:19 +02:00
name: 'EmbedEvent',
2019-10-30 15:01:34 +01:00
props: ['event'],
computed: {
...mapState(['settings']),
code () {
const style = "style='border: 0; width: 100%; height: 215px;'"
const src = `${this.settings.baseurl}/embed/${this.event.id}`
const code = `<iframe ${style} src="${src}"></iframe>`
return code
}
2019-11-03 00:56:26 +01:00
},
methods: {
copyLink () {
2020-10-07 11:12:13 +02:00
this.$root.$message('common.copied', { color: 'success' })
2019-11-03 00:56:26 +01:00
}
2019-10-30 15:01:34 +01:00
}
}
</script>