Files
gancio/pages/event/embedEvent.vue
2020-07-31 01:04:46 +02:00

32 lines
920 B
Vue

<template lang='pug'>
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')
el-button(slot='append' v-clipboard:copy='code' v-clipboard:success='copyLink'
plain type="primary" icon='el-icon-document') {{$t("common.copy")}}
v-col.mt-2(:span='12' :xs='24' v-html='code')
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'EmbedEvent',
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
}
},
methods: {
copyLink () {
this.$root.$message({ message: this.$t('common.copied'), type: 'success' })
}
}
}
</script>