nur namen vom file anzeigen
This commit is contained in:
parent
c436f694e6
commit
329c068d80
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="document-block">
|
||||
<document-icon class="document-block__icon"></document-icon>
|
||||
<a :href="value.url" class="document-block__link" target="_blank">{{value.url}}</a>
|
||||
<a :href="value.url" class="document-block__link" target="_blank">{{urlName}}</a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -13,6 +13,16 @@
|
|||
|
||||
components: {
|
||||
DocumentIcon
|
||||
},
|
||||
|
||||
computed: {
|
||||
urlName: function() {
|
||||
if (this.value && this.value.url) {
|
||||
const parts = this.value.url.split('/');
|
||||
return parts[parts.length - 1]
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -21,13 +21,16 @@
|
|||
// HACK to change the text of the Uploadcare dynamically we need to change the text here directly
|
||||
setTimeout(() => {
|
||||
const formElem = this.$refs['documentform'];
|
||||
formElem.getElementsByClassName('uploadcare--text_size_extra-large')[1].innerText = 'Ziehen Sie ein Dokument hier hinein';
|
||||
formElem.getElementsByClassName('uploadcare--tab__action-button')[0].innerText = 'Wählen Sie ein lokales Dokument';
|
||||
if (formElem.getElementsByClassName('uploadcare--text_size_extra-large').length > 1) {
|
||||
formElem.getElementsByClassName('uploadcare--text_size_extra-large')[1].innerText = 'Ziehen Sie ein Dokument hier hinein';
|
||||
formElem.getElementsByClassName('uploadcare--tab__action-button')[0].innerText = 'Wählen Sie ein lokales Dokument';
|
||||
}
|
||||
}, 0);
|
||||
|
||||
uploadcarePanel.done(panelResult => {
|
||||
panelResult.done(fileInfo => {
|
||||
this.$emit('link-change-url', fileInfo.cdnUrl, this.index)
|
||||
let urlWithFilename = fileInfo.cdnUrl + fileInfo.name;
|
||||
this.$emit('link-change-url', urlWithFilename, this.index)
|
||||
});
|
||||
|
||||
panelResult.progress(p => {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
uploadcarePanel.done(panelResult => {
|
||||
panelResult.done(fileInfo => {
|
||||
console.log(fileInfo);
|
||||
this.$emit('link-change-url', fileInfo.cdnUrl, this.index)
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue