2019-04-30 05:15:41 +02:00
|
|
|
<template>
|
2019-05-02 10:55:59 +02:00
|
|
|
<x-container @remove="() => $emit('remove')" :draggable="true">
|
2020-01-29 20:37:25 +01:00
|
|
|
<template #header><fa :icon="faPaperPlane"/> {{ $t('_pages.blocks.post') }}</template>
|
2019-04-30 05:15:41 +02:00
|
|
|
|
2020-04-19 02:05:20 +02:00
|
|
|
<section style="padding: 16px;">
|
2020-01-29 20:37:25 +01:00
|
|
|
<mk-textarea v-model="value.text">{{ $t('_pages.blocks._post.text') }}</mk-textarea>
|
2020-04-19 02:05:20 +02:00
|
|
|
<mk-switch v-model="value.attachCanvasImage"><span>{{ $t('_pages.blocks._post.attachCanvasImage') }}</span></mk-switch>
|
|
|
|
<mk-input v-if="value.attachCanvasImage" v-model="value.canvasId"><span>{{ $t('_pages.blocks._post.canvasId') }}</span></mk-input>
|
2019-04-30 05:15:41 +02:00
|
|
|
</section>
|
|
|
|
</x-container>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
import { faPaperPlane } from '@fortawesome/free-regular-svg-icons';
|
|
|
|
import XContainer from '../page-editor.container.vue';
|
2020-01-29 20:37:25 +01:00
|
|
|
import MkTextarea from '../../../components/ui/textarea.vue';
|
2020-04-19 02:05:20 +02:00
|
|
|
import MkInput from '../../../components/ui/input.vue';
|
|
|
|
import MkSwitch from '../../../components/ui/switch.vue';
|
2019-04-30 05:15:41 +02:00
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
components: {
|
2020-04-19 02:05:20 +02:00
|
|
|
XContainer, MkTextarea, MkInput, MkSwitch
|
2019-04-30 05:15:41 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
props: {
|
|
|
|
value: {
|
|
|
|
required: true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
faPaperPlane
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
created() {
|
|
|
|
if (this.value.text == null) Vue.set(this.value, 'text', '');
|
2020-04-19 02:05:20 +02:00
|
|
|
if (this.value.attachCanvasImage == null) Vue.set(this.value, 'attachCanvasImage', false);
|
|
|
|
if (this.value.canvasId == null) Vue.set(this.value, 'canvasId', '');
|
2019-04-30 05:15:41 +02:00
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|