1
0
forked from mirror/misskey

Split cropperjs to reduce bundle size

This commit is contained in:
syuilo 2019-02-18 19:26:53 +09:00
parent 882d829558
commit 69b74a46b9
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
2 changed files with 4 additions and 4 deletions

View File

@ -1,10 +1,10 @@
import { apiUrl, locale } from '../../config';
import CropWindow from '../views/components/crop-window.vue';
import ProgressDialog from '../views/components/progress-dialog.vue';
export default ($root: any) => {
const cropImage = file => new Promise((resolve, reject) => {
const cropImage = file => new Promise(async (resolve, reject) => {
const CropWindow = await import('../views/components/crop-window.vue').then(x => x.default);
const w = $root.new(CropWindow, {
image: file,
title: locale['desktop']['avatar-crop-title'],

View File

@ -1,10 +1,10 @@
import { apiUrl, locale } from '../../config';
import CropWindow from '../views/components/crop-window.vue';
import ProgressDialog from '../views/components/progress-dialog.vue';
export default ($root: any) => {
const cropImage = file => new Promise((resolve, reject) => {
const cropImage = file => new Promise(async (resolve, reject) => {
const CropWindow = await import('../views/components/crop-window.vue').then(x => x.default);
const w = $root.new(CropWindow, {
image: file,
title: locale['desktop']['banner-crop-title'],