break two - two

This commit is contained in:
ogerly 2019-09-30 11:38:29 +02:00
parent c69d263039
commit 63d5140420
2 changed files with 7 additions and 2 deletions

View File

@ -19,7 +19,7 @@ const template = `
</ds-text> </ds-text>
<input type="checkbox" v-model="currentUser.allowEmbedIframes" @click.prevent="check($event)"> <input type="checkbox" v-model="currentUser.allowEmbedIframes" @click.prevent="check($event)">
</ds-section> </ds-section>
<p v-if="!showEmbed" style="cursor: pointer" > <p v-if="!showEmbed || linkOnly" style="cursor: pointer" >
<img :src="embedImage" alt="dataEmbedUrl" @click.prevent="clickPreview" height="270" width="auto" /> <img :src="embedImage" alt="dataEmbedUrl" @click.prevent="clickPreview" height="270" width="auto" />
<div v-else v-html="embedHtml" /> <div v-else v-html="embedHtml" />
<p style="color:black"> <p style="color:black">
@ -91,6 +91,7 @@ export default class Embed extends Node {
embedData: {}, embedData: {},
showEmbed: true, showEmbed: true,
showOverlay: false, showOverlay: false,
linkOnly: false,
}), }),
async created() { async created() {
if (!this.options) return {} if (!this.options) return {}
@ -103,6 +104,11 @@ export default class Embed extends Node {
}), }),
embedHtml() { embedHtml() {
const { html = '' } = this.embedData const { html = '' } = this.embedData
if (html === '') {
this.linkOnly = true
} else {
this.linkOnly = false
}
return html return html
}, },
embedImage() { embedImage() {

View File

@ -153,4 +153,3 @@ export const checkSlugAvailableQuery = gql`
} }
} }
` `