mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-25 03:17:38 -07:00
proxy cropper url (#4525)
This commit is contained in:
parent
bd1f2ba732
commit
134be39492
1 changed files with 9 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
|||
<template #header><fa icon="crop"/>{{ title }}</template>
|
||||
<div class="body">
|
||||
<vue-cropper ref="cropper"
|
||||
:src="image.url"
|
||||
:src="imageUrl"
|
||||
:view-mode="1"
|
||||
:aspect-ratio="aspectRatio"
|
||||
:container-style="{ width: '100%', 'max-height': '400px' }"
|
||||
|
@ -21,6 +21,7 @@
|
|||
import Vue from 'vue';
|
||||
import i18n from '../../../i18n';
|
||||
import VueCropper from 'vue-cropperjs';
|
||||
import * as url from '../../../../../prelude/url';
|
||||
|
||||
export default Vue.extend({
|
||||
i18n: i18n('desktop/views/components/crop-window.vue'),
|
||||
|
@ -41,6 +42,13 @@ export default Vue.extend({
|
|||
required: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
imageUrl() {
|
||||
return `/proxy/?${url.query({
|
||||
url: this.image.url
|
||||
})}`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
ok() {
|
||||
(this.$refs.cropper as any).getCroppedCanvas().toBlob(blob => {
|
||||
|
|
Loading…
Reference in a new issue