Fix image resizing

This commit is contained in:
Natsumi
2024-11-20 13:30:35 +13:00
parent da3e318915
commit 299f2cce10
6 changed files with 40 additions and 22 deletions

View File

@@ -13651,6 +13651,7 @@ speechSynthesis.getVoices();
};
return this.call('file/image', {
uploadImage: true,
matchingDimensions: true,
postData: JSON.stringify(params),
imageData
}).then((json) => {
@@ -17334,6 +17335,7 @@ speechSynthesis.getVoices();
};
return this.call('file/image', {
uploadImage: true,
matchingDimensions: false,
postData: JSON.stringify(params),
imageData
}).then((json) => {
@@ -17445,6 +17447,7 @@ speechSynthesis.getVoices();
API.uploadSticker = function (imageData, params) {
return this.call('file/image', {
uploadImage: true,
matchingDimensions: true,
postData: JSON.stringify(params),
imageData
}).then((json) => {
@@ -17762,6 +17765,7 @@ speechSynthesis.getVoices();
API.uploadEmoji = function (imageData, params) {
return this.call('file/image', {
uploadImage: true,
matchingDimensions: true,
postData: JSON.stringify(params),
imageData
}).then((json) => {

View File

@@ -65,7 +65,7 @@ mixin currentUser()
el-tab-pane(v-if="galleryDialogVisible" v-loading="galleryDialogGalleryLoading")
span(slot="label") {{ $t('dialog.gallery_icons.gallery') }}
span(style="color:#909399;font-size:12px;margin-left:5px") {{ galleryTable.length }}/64
input(type="file" accept="image/png,image/jpg,image/jpeg,image/webp,image/bmp,image/gif" @change="onFileChangeGallery" id="GalleryUploadButton" style="display:none")
input(type="file" accept="image/*" @change="onFileChangeGallery" id="GalleryUploadButton" style="display:none")
span {{ $t('dialog.gallery_icons.recommended_image_size') }}: 1200x900px (4:3)
br
br
@@ -83,8 +83,8 @@ mixin currentUser()
el-tab-pane(v-if="galleryDialogVisible" v-loading="galleryDialogIconsLoading")
span(slot="label") {{ $t('dialog.gallery_icons.icons') }}
span(style="color:#909399;font-size:12px;margin-left:5px") {{ VRCPlusIconsTable.length }}/64
input(type="file" accept="image/png,image/jpg,image/jpeg,image/webp,image/bmp,image/gif" @change="onFileChangeVRCPlusIcon" id="VRCPlusIconUploadButton" style="display:none")
span {{ $t('dialog.gallery_icons.recommended_image_size') }}: 1200x900px (4:3)
input(type="file" accept="image/*" @change="onFileChangeVRCPlusIcon" id="VRCPlusIconUploadButton" style="display:none")
span {{ $t('dialog.gallery_icons.recommended_image_size') }}: 2000x2000px (1:1)
br
br
el-button-group
@@ -101,8 +101,8 @@ mixin currentUser()
el-tab-pane(v-if="galleryDialogVisible" v-loading="galleryDialogEmojisLoading")
span(slot="label") {{ $t('dialog.gallery_icons.emojis') }}
span(style="color:#909399;font-size:12px;margin-left:5px") {{ emojiTable.length }}/9
input(type="file" accept="image/png,image/jpg,image/jpeg,image/webp,image/bmp,image/gif" @change="onFileChangeEmoji" id="EmojiUploadButton" style="display:none")
span {{ $t('dialog.gallery_icons.recommended_image_size') }}: 1200x900px (4:3)
input(type="file" accept="image/*" @change="onFileChangeEmoji" id="EmojiUploadButton" style="display:none")
span {{ $t('dialog.gallery_icons.recommended_image_size') }}: 2000x2000px (1:1)
br
br
el-button-group(style="margin-right:10px")
@@ -145,8 +145,8 @@ mixin currentUser()
el-tab-pane(v-if="galleryDialogVisible" v-loading="galleryDialogStickersLoading")
span(slot="label") {{ $t('dialog.gallery_icons.stickers') }}
span(style="color:#909399;font-size:12px;margin-left:5px") {{ stickerTable.length }}/9
input(type="file" accept="image/png,image/jpg,image/jpeg,image/webp,image/bmp,image/gif" @change="onFileChangeSticker" id="StickerUploadButton" style="display:none")
span {{ $t('dialog.gallery_icons.recommended_image_size') }}: 1200x900px (4:3)
input(type="file" accept="image/*" @change="onFileChangeSticker" id="StickerUploadButton" style="display:none")
span {{ $t('dialog.gallery_icons.recommended_image_size') }}: 2000x2000px (1:1)
br
br
el-button-group
@@ -162,7 +162,7 @@ mixin currentUser()
el-tab-pane(v-if="galleryDialogVisible" v-loading="galleryDialogPrintsLoading")
span(slot="label") {{ $t('dialog.gallery_icons.prints') }}
span(style="color:#909399;font-size:12px;margin-left:5px") {{ printTable.length }}/64
input(type="file" accept="image/png,image/jpg,image/jpeg,image/webp,image/bmp,image/gif" @change="onFileChangePrint" id="PrintUploadButton" style="display:none")
input(type="file" accept="image/*" @change="onFileChangePrint" id="PrintUploadButton" style="display:none")
span {{ $t('dialog.gallery_icons.recommended_image_size') }}: 1920x1080px (16:9)
br
br

View File

@@ -2,7 +2,7 @@ mixin images()
//- dialog: Change avatar image
el-dialog.x-dialog(:before-close="beforeDialogClose" @mousedown.native="dialogMouseDown" @mouseup.native="dialogMouseUp" ref="changeAvatarImageDialog" :visible.sync="changeAvatarImageDialogVisible" :title="$t('dialog.change_content_image.avatar')" width="850px")
div(v-if="changeAvatarImageDialogVisible" v-loading="changeAvatarImageDialogLoading")
input(type="file" accept="image/png,image/jpg,image/jpeg,image/webp,image/bmp,image/gif" @change="onFileChangeAvatarImage" id="AvatarImageUploadButton" style="display:none")
input(type="file" accept="image/*" @change="onFileChangeAvatarImage" id="AvatarImageUploadButton" style="display:none")
span {{ $t('dialog.change_content_image.description') }}
br
el-button-group(style="padding-bottom:10px;padding-top:10px")
@@ -17,7 +17,7 @@ mixin images()
//- dialog: Change world image
el-dialog.x-dialog(:before-close="beforeDialogClose" @mousedown.native="dialogMouseDown" @mouseup.native="dialogMouseUp" ref="changeWorldImageDialog" :visible.sync="changeWorldImageDialogVisible" :title="$t('dialog.change_content_image.world')" width="850px")
div(v-if="changeWorldImageDialogVisible" v-loading="changeWorldImageDialogLoading")
input(type="file" accept="image/png,image/jpg,image/jpeg,image/webp,image/bmp,image/gif" @change="onFileChangeWorldImage" id="WorldImageUploadButton" style="display:none")
input(type="file" accept="image/*" @change="onFileChangeWorldImage" id="WorldImageUploadButton" style="display:none")
span {{ $t('dialog.change_content_image.description') }}
br
el-button-group(style="padding-bottom:10px;padding-top:10px")
@@ -43,7 +43,7 @@ mixin images()
span(slot="label") {{ $t('dialog.gallery_select.gallery') }}
span(style="color:#909399;font-size:12px;margin-left:5px") {{ galleryTable.length }}/64
br
input(type="file" accept="image/png,image/jpg,image/jpeg,image/webp,image/bmp,image/gif" @change="onFileChangeGallery" id="GalleryUploadButton" style="display:none")
input(type="file" accept="image/*" @change="onFileChangeGallery" id="GalleryUploadButton" style="display:none")
el-button-group
el-button(type="default" size="small" @click="selectImageGallerySelect('', '')" icon="el-icon-close") {{ $t('dialog.gallery_select.none') }}
el-button(type="default" size="small" @click="refreshGalleryTable" icon="el-icon-refresh") {{ $t('dialog.gallery_select.refresh') }}

View File

@@ -71,7 +71,7 @@ mixin invites()
//- dialog Table: Send Invite Response Message
el-dialog.x-dialog(:before-close="beforeDialogClose" @mousedown.native="dialogMouseDown" @mouseup.native="dialogMouseUp" ref="sendInviteResponseDialog" :visible.sync="sendInviteResponseDialogVisible" :title="$t('dialog.invite_response_message.header')" width="800px")
template(v-if="API.currentUser.$isVRCPlus")
input.inviteImageUploadButton(type="file" accept="image/png,image/jpg,image/jpeg,image/webp,image/bmp,image/gif" @change="inviteImageUpload")
input.inviteImageUploadButton(type="file" accept="image/*" @change="inviteImageUpload")
data-tables(v-if="sendInviteResponseDialogVisible" v-bind="inviteResponseMessageTable" @row-click="showSendInviteResponseConfirmDialog" style="margin-top:10px;cursor:pointer")
el-table-column(:label="$t('table.profile.invite_messages.slot')" prop="slot" sortable="custom" width="70")
el-table-column(:label="$t('table.profile.invite_messages.message')" prop="message")
@@ -88,7 +88,7 @@ mixin invites()
//- dialog Table: Send Invite Request Response Message
el-dialog.x-dialog(:before-close="beforeDialogClose" @mousedown.native="dialogMouseDown" @mouseup.native="dialogMouseUp" ref="sendInviteRequestResponseDialog" :visible.sync="sendInviteRequestResponseDialogVisible" :title="$t('dialog.invite_request_response_message.header')" width="800px")
template(v-if="API.currentUser.$isVRCPlus")
input.inviteImageUploadButton(type="file" accept="image/png,image/jpg,image/jpeg,image/webp,image/bmp,image/gif" @change="inviteImageUpload")
input.inviteImageUploadButton(type="file" accept="image/*" @change="inviteImageUpload")
data-tables(v-if="sendInviteRequestResponseDialogVisible" v-bind="inviteRequestResponseMessageTable" @row-click="showSendInviteResponseConfirmDialog" style="margin-top:10px;cursor:pointer")
el-table-column(:label="$t('table.profile.invite_messages.slot')" prop="slot" sortable="custom" width="70")
el-table-column(:label="$t('table.profile.invite_messages.message')" prop="message")
@@ -121,7 +121,7 @@ mixin invites()
//- el-button(size="mini" @click="clearImageGallerySelect" style="vertical-align:top") {{ $t('dialog.invite_message.clear_selected_image') }}
//- template(v-else)
//- el-button(size="mini" @click="showGallerySelectDialog" style="margin-right:5px") {{ $t('dialog.invite_message.select_image') }}
input.inviteImageUploadButton(type="file" accept="image/png,image/jpg,image/jpeg,image/webp,image/bmp,image/gif" @change="inviteImageUpload")
input.inviteImageUploadButton(type="file" accept="image/*" @change="inviteImageUpload")
data-tables(v-if="sendInviteDialogVisible" v-bind="inviteMessageTable" @row-click="showSendInviteConfirmDialog" style="margin-top:10px;cursor:pointer")
el-table-column(:label="$t('table.profile.invite_messages.slot')" prop="slot" sortable="custom" width="70")
el-table-column(:label="$t('table.profile.invite_messages.message')" prop="message")
@@ -138,7 +138,7 @@ mixin invites()
//- dialog Table: Send Invite Request Message
el-dialog.x-dialog(:before-close="beforeDialogClose" @mousedown.native="dialogMouseDown" @mouseup.native="dialogMouseUp" ref="sendInviteRequestDialog" :visible.sync="sendInviteRequestDialogVisible" :title="$t('dialog.invite_request_message.header')" width="800px")
template(v-if="API.currentUser.$isVRCPlus")
input.inviteImageUploadButton(type="file" accept="image/png,image/jpg,image/jpeg,image/webp,image/bmp,image/gif" @change="inviteImageUpload")
input.inviteImageUploadButton(type="file" accept="image/*" @change="inviteImageUpload")
data-tables(v-if="sendInviteRequestDialogVisible" v-bind="inviteRequestMessageTable" @row-click="showSendInviteConfirmDialog" style="margin-top:10px;cursor:pointer")
el-table-column(:label="$t('table.profile.invite_messages.slot')" prop="slot" sortable="custom" width="70")
el-table-column(:label="$t('table.profile.invite_messages.message')" prop="message")