Merge branch '211-android-pdf-downloaded-issue' into 'dev'
download pdf file fixes See merge request keanuapp/keanuapp-weblite!44
This commit is contained in:
commit
0c8f50b8f8
3 changed files with 11 additions and 7 deletions
|
|
@ -1526,10 +1526,14 @@ export default {
|
||||||
const link = document.createElement("a");
|
const link = document.createElement("a");
|
||||||
link.href = url;
|
link.href = url;
|
||||||
link.target = "_blank";
|
link.target = "_blank";
|
||||||
link.download =
|
link.download = event.getContent().body || this.$t("fallbacks.download_name");
|
||||||
event.getContent().body || this.$t("fallbacks.download_name");
|
document.body.appendChild(link);
|
||||||
link.click();
|
link.click();
|
||||||
URL.revokeObjectURL(url);
|
|
||||||
|
setTimeout(function(){
|
||||||
|
document.body.removeChild(link);
|
||||||
|
URL.revokeObjectURL(url);
|
||||||
|
}, 200)
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log("Failed to fetch attachment: ", err);
|
console.log("Failed to fetch attachment: ", err);
|
||||||
|
|
|
||||||
|
|
@ -11,14 +11,14 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="message">
|
<div class="message">
|
||||||
<span>{{ $t('file_prefix') }}</span>
|
<span>{{ $t('message.file_prefix') }}</span>
|
||||||
<span
|
<span
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
@click.stop="$emit('download')"
|
@click.stop="$emit('download')"
|
||||||
v-html="linkify($sanitize(messageText))"
|
v-html="linkify($sanitize(messageText))"
|
||||||
/>
|
/>
|
||||||
<span class="edit-marker" v-if="event.replacingEventId()"
|
<span class="edit-marker" v-if="event.replacingEventId()"
|
||||||
>{{ $t('edited') }}</span
|
>{{ $t('message.edited') }}</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -12,14 +12,14 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="message">
|
<div class="message">
|
||||||
<span>File: </span>
|
<span>{{ $t('message.file_prefix') }}</span>
|
||||||
<span
|
<span
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
@click.stop="$emit('download')"
|
@click.stop="$emit('download')"
|
||||||
v-html="linkify($sanitize(messageText))"
|
v-html="linkify($sanitize(messageText))"
|
||||||
/>
|
/>
|
||||||
<span class="edit-marker" v-if="event.replacingEventId()"
|
<span class="edit-marker" v-if="event.replacingEventId()"
|
||||||
>{{ $t('edited') }}</span
|
>{{ $t('message.edited') }}</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue