Small fixes

This commit is contained in:
Natsumi
2022-07-12 19:14:38 +12:00
parent 78238ad7e8
commit 330a5f3bcc
2 changed files with 29 additions and 23 deletions
+18 -12
View File
@@ -8210,11 +8210,11 @@ speechSynthesis.getVoices();
database.addGamelogPortalSpawnToDatabase(entry); database.addGamelogPortalSpawnToDatabase(entry);
break; break;
case 'video-play': case 'video-play':
var videoUrl = encodeURI(gameLog.videoUrl); gameLog.videoUrl = encodeURI(gameLog.videoUrl);
if (this.lastVideoUrl === videoUrl) { if (this.lastVideoUrl === gameLog.videoUrl) {
return; return;
} }
this.lastVideoUrl = videoUrl; this.lastVideoUrl = gameLog.videoUrl;
this.addGameLogVideo(gameLog, location, userId); this.addGameLogVideo(gameLog, location, userId);
return; return;
case 'video-sync': case 'video-sync':
@@ -9613,6 +9613,10 @@ speechSynthesis.getVoices();
if (videoId === -1) { if (videoId === -1) {
videoId = 'YouTube'; videoId = 'YouTube';
} }
if (parseInt(videoPos, 10) === parseInt(videoLength, 10)) {
// ummm okay
videoPos = 0;
}
if (videoUrl === this.nowPlaying.url) { if (videoUrl === this.nowPlaying.url) {
var entry = { var entry = {
created_at: gameLog.dt, created_at: gameLog.dt,
@@ -12424,13 +12428,13 @@ speechSynthesis.getVoices();
} }
} }
} else if (input.substring(0, 4) === 'usr_') { } else if (input.substring(0, 4) === 'usr_') {
this.showUserDialog(input); this.showUserDialog(input.trim());
return true; return true;
} else if (input.substring(0, 5) === 'wrld_') { } else if (input.substring(0, 5) === 'wrld_') {
this.showWorldDialog(input); this.showWorldDialog(input.trim());
return true; return true;
} else if (input.substring(0, 5) === 'avtr_') { } else if (input.substring(0, 5) === 'avtr_') {
this.showAvatarDialog(input); this.showAvatarDialog(input.trim());
return true; return true;
} }
return false; return false;
@@ -16719,11 +16723,12 @@ speechSynthesis.getVoices();
r.onload = async function (file) { r.onload = async function (file) {
var base64File = btoa(r.result); var base64File = btoa(r.result);
var fileMd5 = await $app.genMd5(base64File); var fileMd5 = await $app.genMd5(base64File);
var fileSizeInBytes = file.total; var fileSizeInBytes = parseInt(file.total, 10);
var base64SignatureFile = await $app.genSig(base64File); var base64SignatureFile = await $app.genSig(base64File);
var signatureMd5 = await $app.genMd5(base64SignatureFile); var signatureMd5 = await $app.genMd5(base64SignatureFile);
var signatureSizeInBytes = await $app.genLength( var signatureSizeInBytes = parseInt(
base64SignatureFile await $app.genLength(base64SignatureFile),
10
); );
var avatarId = $app.avatarDialog.id; var avatarId = $app.avatarDialog.id;
var {imageUrl} = $app.avatarDialog.ref; var {imageUrl} = $app.avatarDialog.ref;
@@ -17053,11 +17058,12 @@ speechSynthesis.getVoices();
r.onload = async function (file) { r.onload = async function (file) {
var base64File = btoa(r.result); var base64File = btoa(r.result);
var fileMd5 = await $app.genMd5(base64File); var fileMd5 = await $app.genMd5(base64File);
var fileSizeInBytes = file.total; var fileSizeInBytes = parseInt(file.total, 10);
var base64SignatureFile = await $app.genSig(base64File); var base64SignatureFile = await $app.genSig(base64File);
var signatureMd5 = await $app.genMd5(base64SignatureFile); var signatureMd5 = await $app.genMd5(base64SignatureFile);
var signatureSizeInBytes = await $app.genLength( var signatureSizeInBytes = parseInt(
base64SignatureFile await $app.genLength(base64SignatureFile),
10
); );
var worldId = $app.worldDialog.id; var worldId = $app.worldDialog.id;
var {imageUrl} = $app.worldDialog.ref; var {imageUrl} = $app.worldDialog.ref;
+1 -1
View File
@@ -2017,7 +2017,7 @@ html
el-button(@click="languageDialog.languageValue='';languageDialog.languageChoice=true" size="mini") Add Language el-button(@click="languageDialog.languageValue='';languageDialog.languageChoice=true" size="mini") Add Language
//- dialog: bio //- dialog: bio
el-dialog.x-dialog(:before-close="beforeDialogClose" @mousedown.native="dialogMouseDown" @mouseup.native="dialogMouseUp" ref="bioDialog" :visible.sync="bioDialog.visible" title="Bio" width="400px") el-dialog.x-dialog(:before-close="beforeDialogClose" @mousedown.native="dialogMouseDown" @mouseup.native="dialogMouseUp" ref="bioDialog" :visible.sync="bioDialog.visible" title="Bio" width="600px")
div(v-loading="bioDialog.loading") div(v-loading="bioDialog.loading")
el-input(type="textarea" v-model="bioDialog.bio" size="mini" maxlength="512" show-word-limit :autosize="{ minRows:2, maxRows:5 }" placeholder="Please input a bio") el-input(type="textarea" v-model="bioDialog.bio" size="mini" maxlength="512" show-word-limit :autosize="{ minRows:2, maxRows:5 }" placeholder="Please input a bio")
el-input(v-for="(link, index) in bioDialog.bioLinks" :key="index" :value="link" v-model="bioDialog.bioLinks[index]" size="small" style="margin-top:5px") el-input(v-for="(link, index) in bioDialog.bioLinks" :key="index" :value="link" v-model="bioDialog.bioLinks[index]" size="small" style="margin-top:5px")