Fix vite build release version
Also, make sure "export" strings are not removed (rename to "room_export") and import quotes in the QuoteView correctly.
This commit is contained in:
parent
4c364f93e6
commit
ec992bb14d
34 changed files with 621 additions and 284 deletions
|
|
@ -383,7 +383,7 @@ import MessageOperationsBottomSheet from "./MessageOperationsBottomSheet";
|
|||
import StickerPickerBottomSheet from "./StickerPickerBottomSheet";
|
||||
import UserProfileDialog from "./UserProfileDialog.vue"
|
||||
import BottomSheet from "./BottomSheet.vue";
|
||||
import ImageResize from "image-resize";
|
||||
import imageResize from "image-resize";
|
||||
import CreatePollDialog from "./CreatePollDialog.vue";
|
||||
import chatMixin, { ROOM_READ_MARKER_EVENT_PLACEHOLDER } from "./chatMixin";
|
||||
import sendAttachmentsMixin from "./sendAttachmentsMixin";
|
||||
|
|
@ -394,8 +394,7 @@ import roomMembersMixin from "./roomMembersMixin";
|
|||
import PurgeRoomDialog from "../components/PurgeRoomDialog";
|
||||
import MessageErrorHandler from "./MessageErrorHandler";
|
||||
import MessageOperationsChannel from './messages/channel/MessageOperationsChannel.vue';
|
||||
import sizeOf from "image-size";
|
||||
import dataUriToBuffer from "data-uri-to-buffer";
|
||||
import { imageSize } from "image-size";
|
||||
import prettyBytes from "pretty-bytes";
|
||||
import RoomExport from "./RoomExport.vue";
|
||||
import { VEmojiPicker } from 'v-emoji-picker';
|
||||
|
|
@ -1470,8 +1469,9 @@ export default {
|
|||
fileObj.actualSize = file.size;
|
||||
fileObj.actualFile = file
|
||||
try {
|
||||
fileObj.dimensions = sizeOf(dataUriToBuffer(evt.target.result));
|
||||
|
||||
const buffer = Uint8Array.from(window.atob(evt.target.result.replace(/^data[^,]+,/,'')), v => v.charCodeAt(0));
|
||||
fileObj.dimensions = imageSize(buffer);
|
||||
|
||||
// Need to resize?
|
||||
const w = fileObj.dimensions.width;
|
||||
const h = fileObj.dimensions.height;
|
||||
|
|
@ -1479,14 +1479,12 @@ export default {
|
|||
var aspect = w / h;
|
||||
var newWidth = parseInt((w > h ? 640 : 640 * aspect).toFixed());
|
||||
var newHeight = parseInt((w > h ? 640 / aspect : 640).toFixed());
|
||||
var imageResize = new ImageResize({
|
||||
imageResize(evt.target.result, {
|
||||
format: "png",
|
||||
width: newWidth,
|
||||
height: newHeight,
|
||||
outputType: "blob",
|
||||
});
|
||||
imageResize
|
||||
.play(evt.target.result)
|
||||
})
|
||||
.then((img) => {
|
||||
Vue.set(
|
||||
fileObj,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue