remove debug and upload button

This commit is contained in:
Natsumi
2020-12-12 10:33:16 +13:00
committed by pypy
parent 0b6d56ed1e
commit 342ab9fed0
2 changed files with 7 additions and 9 deletions

View File

@@ -351,9 +351,8 @@ import gameLogService from './service/gamelog.js'
if (req !== undefined) { if (req !== undefined) {
return req; return req;
} }
} else if (init.test === 'a') { } else if (init.VRCPlusIcon) {
delete init.test; delete init.VRCPlusIcon;
console.log("test");
console.log(init); console.log(init);
} }
else { else {
@@ -7530,9 +7529,9 @@ import gameLogService from './service/gamelog.js'
}); });
}; };
$app.methods.onFileChange = function (e) { // requres decoding base64 body on C# side
$app.methods.onFileChangeVRCPlusIcon = function (e) {
var files = e.target.files || e.dataTransfer.files; var files = e.target.files || e.dataTransfer.files;
console.log(e);
if (!files.length) { if (!files.length) {
return; return;
} }
@@ -7542,7 +7541,6 @@ import gameLogService from './service/gamelog.js'
var bodyEnd = '\n---------------------------26696829785232761561272838397--\n'; var bodyEnd = '\n---------------------------26696829785232761561272838397--\n';
var body = bodyStart + r.result + bodyEnd var body = bodyStart + r.result + bodyEnd
var base64Body = btoa(body); var base64Body = btoa(body);
console.log(base64Body);
API.uploadVRCPlusIcon(base64Body API.uploadVRCPlusIcon(base64Body
).then((args) => { ).then((args) => {
this.$message({ this.$message({
@@ -7559,10 +7557,9 @@ import gameLogService from './service/gamelog.js'
return this.call('icon', { return this.call('icon', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'multipart/form-data; boundary=-------------------------26696829785232761561272838397', 'Content-Type': 'multipart/form-data; boundary=-------------------------26696829785232761561272838397'
'Content-Transfer-Encoding': 'base64'
}, },
test: 'a', VRCPlusIcon: true,
body: params body: params
}).then((json) => { }).then((json) => {
var args = { var args = {

View File

@@ -436,6 +436,7 @@ html
el-button(type="default" @click="displayVRCPlusIconsTable()" size="mini" icon="el-icon-refresh" circle style="margin-left:5px") el-button(type="default" @click="displayVRCPlusIconsTable()" size="mini" icon="el-icon-refresh" circle style="margin-left:5px")
el-button(type="default" @click="VRCPlusIconsTable = []" size="mini" icon="el-icon-delete" circle style="margin-left:0") el-button(type="default" @click="VRCPlusIconsTable = []" size="mini" icon="el-icon-delete" circle style="margin-left:0")
el-button(type="default" @click="setVRCPlusIcon('')" size="mini" icon="el-icon-close" circle style="margin:0" :disabled="!API.currentUser.userIcon") el-button(type="default" @click="setVRCPlusIcon('')" size="mini" icon="el-icon-close" circle style="margin:0" :disabled="!API.currentUser.userIcon")
//- input(type="file" @change="onFileChangeVRCPlusIcon")
br br
.x-friend-item(v-for="icon in VRCPlusIconsTable" :key="icon.id" style="display:inline-block;cursor:auto;") .x-friend-item(v-for="icon in VRCPlusIconsTable" :key="icon.id" style="display:inline-block;cursor:auto;")
.vrcplus-icon(style="" @click="setVRCPlusIcon(icon.id)" :class="{ 'current-vrcplus-icon': 'https://api.vrchat.cloud/api/1/file/' + icon.id + '/1' === API.currentUser.userIcon }") .vrcplus-icon(style="" @click="setVRCPlusIcon(icon.id)" :class="{ 'current-vrcplus-icon': 'https://api.vrchat.cloud/api/1/file/' + icon.id + '/1' === API.currentUser.userIcon }")