mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
Small changes and fixes
This commit is contained in:
+37
-8
@@ -1402,6 +1402,9 @@ speechSynthesis.getVoices();
|
|||||||
if (typeof json.bio !== 'undefined') {
|
if (typeof json.bio !== 'undefined') {
|
||||||
json.bio = $app.replaceBioSymbols(json.bio);
|
json.bio = $app.replaceBioSymbols(json.bio);
|
||||||
}
|
}
|
||||||
|
if (typeof json.note !== 'undefined') {
|
||||||
|
json.note = $app.replaceBioSymbols(json.note);
|
||||||
|
}
|
||||||
if (json.currentAvatarImageUrl === $app.robotUrl) {
|
if (json.currentAvatarImageUrl === $app.robotUrl) {
|
||||||
delete json.currentAvatarImageUrl;
|
delete json.currentAvatarImageUrl;
|
||||||
delete json.currentAvatarThumbnailImageUrl;
|
delete json.currentAvatarThumbnailImageUrl;
|
||||||
@@ -2079,6 +2082,10 @@ speechSynthesis.getVoices();
|
|||||||
this.currentUser.activeFriends.length;
|
this.currentUser.activeFriends.length;
|
||||||
var count = Math.trunc(N / 50);
|
var count = Math.trunc(N / 50);
|
||||||
for (var i = count; i > -1; i--) {
|
for (var i = count; i > -1; i--) {
|
||||||
|
if (params.offset > 5000) {
|
||||||
|
// API offset limit is 5000
|
||||||
|
break;
|
||||||
|
}
|
||||||
var args = await this.getFriends(params);
|
var args = await this.getFriends(params);
|
||||||
friends = friends.concat(args.json);
|
friends = friends.concat(args.json);
|
||||||
params.offset += 50;
|
params.offset += 50;
|
||||||
@@ -2099,6 +2106,10 @@ speechSynthesis.getVoices();
|
|||||||
var N = this.currentUser.friends.length - onlineCount;
|
var N = this.currentUser.friends.length - onlineCount;
|
||||||
var count = Math.trunc(N / 50);
|
var count = Math.trunc(N / 50);
|
||||||
for (var i = count; i > -1; i--) {
|
for (var i = count; i > -1; i--) {
|
||||||
|
if (params.offset > 5000) {
|
||||||
|
// API offset limit is 5000
|
||||||
|
break;
|
||||||
|
}
|
||||||
var args = await this.getFriends(params);
|
var args = await this.getFriends(params);
|
||||||
friends = friends.concat(args.json);
|
friends = friends.concat(args.json);
|
||||||
params.offset += 50;
|
params.offset += 50;
|
||||||
@@ -6509,7 +6520,6 @@ speechSynthesis.getVoices();
|
|||||||
});
|
});
|
||||||
|
|
||||||
API.$on('LOGIN', function () {
|
API.$on('LOGIN', function () {
|
||||||
this.cachedUsers = new Map(); // fix memos loading very slowly on relogin
|
|
||||||
$app.nextFriendsRefresh = 0;
|
$app.nextFriendsRefresh = 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -10559,7 +10569,6 @@ speechSynthesis.getVoices();
|
|||||||
var query = this.searchText.toUpperCase();
|
var query = this.searchText.toUpperCase();
|
||||||
if (!query) {
|
if (!query) {
|
||||||
for (var ref of API.cachedAvatars.values()) {
|
for (var ref of API.cachedAvatars.values()) {
|
||||||
if (ref.authorId === API.currentUser.id) {
|
|
||||||
switch (this.searchAvatarFilter) {
|
switch (this.searchAvatarFilter) {
|
||||||
case 'all':
|
case 'all':
|
||||||
avatars.set(ref.id, ref);
|
avatars.set(ref.id, ref);
|
||||||
@@ -10576,7 +10585,6 @@ speechSynthesis.getVoices();
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
this.isSearchAvatarLoading = false;
|
this.isSearchAvatarLoading = false;
|
||||||
} else {
|
} else {
|
||||||
if (
|
if (
|
||||||
@@ -11019,6 +11027,7 @@ speechSynthesis.getVoices();
|
|||||||
$app.data.friendLogInitStatus = false;
|
$app.data.friendLogInitStatus = false;
|
||||||
|
|
||||||
$app.methods.initFriendLog = async function (userId) {
|
$app.methods.initFriendLog = async function (userId) {
|
||||||
|
await this.updateDatabaseVersion();
|
||||||
var sqlValues = [];
|
var sqlValues = [];
|
||||||
var friends = await API.refreshFriends();
|
var friends = await API.refreshFriends();
|
||||||
for (var friend of friends) {
|
for (var friend of friends) {
|
||||||
@@ -20010,7 +20019,9 @@ speechSynthesis.getVoices();
|
|||||||
$app.methods.updateDatabaseVersion = async function () {
|
$app.methods.updateDatabaseVersion = async function () {
|
||||||
var databaseVersion = 1;
|
var databaseVersion = 1;
|
||||||
if (this.databaseVersion !== databaseVersion) {
|
if (this.databaseVersion !== databaseVersion) {
|
||||||
console.log('Updating database...');
|
console.log(
|
||||||
|
`Updating database from ${this.databaseVersion} to ${databaseVersion}...`
|
||||||
|
);
|
||||||
await database.cleanLegendFromFriendLog(); // fix friendLog spammed with crap
|
await database.cleanLegendFromFriendLog(); // fix friendLog spammed with crap
|
||||||
await database.fixGameLogTraveling(); // fix bug with gameLog location being set as traveling
|
await database.fixGameLogTraveling(); // fix bug with gameLog location being set as traveling
|
||||||
await database.fixNegativeGPS(); // fix GPS being a negative value due to VRCX bug with traveling
|
await database.fixNegativeGPS(); // fix GPS being a negative value due to VRCX bug with traveling
|
||||||
@@ -20068,11 +20079,13 @@ speechSynthesis.getVoices();
|
|||||||
D.progressTotal = worldIdList.size;
|
D.progressTotal = worldIdList.size;
|
||||||
var data = Array.from(worldIdList);
|
var data = Array.from(worldIdList);
|
||||||
for (var i = 0; i < data.length; ++i) {
|
for (var i = 0; i < data.length; ++i) {
|
||||||
var worldId = data[i];
|
|
||||||
if (!D.visible) {
|
if (!D.visible) {
|
||||||
this.resetWorldImport();
|
this.resetWorldImport();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
if (!D.loading || !D.visible) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var worldId = data[i];
|
||||||
if (!D.worldIdList.has(worldId)) {
|
if (!D.worldIdList.has(worldId)) {
|
||||||
try {
|
try {
|
||||||
var args = await API.getWorld({
|
var args = await API.getWorld({
|
||||||
@@ -20117,17 +20130,24 @@ speechSynthesis.getVoices();
|
|||||||
D.worldImportFavoriteGroup = group;
|
D.worldImportFavoriteGroup = group;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$app.methods.cancelWorldImport = function () {
|
||||||
|
var D = this.worldImportDialog;
|
||||||
|
D.loading = false;
|
||||||
|
};
|
||||||
|
|
||||||
$app.methods.importWorldImportTable = async function () {
|
$app.methods.importWorldImportTable = async function () {
|
||||||
var D = this.worldImportDialog;
|
var D = this.worldImportDialog;
|
||||||
D.loading = true;
|
D.loading = true;
|
||||||
if (!D.worldImportFavoriteGroup) {
|
if (!D.worldImportFavoriteGroup) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = [...this.worldImportTable.data].reverse();
|
var data = [...this.worldImportTable.data].reverse();
|
||||||
D.importProgressTotal = data.length;
|
D.importProgressTotal = data.length;
|
||||||
try {
|
try {
|
||||||
for (var i = data.length - 1; i >= 0; i--) {
|
for (var i = data.length - 1; i >= 0; i--) {
|
||||||
|
if (!D.loading || !D.visible) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
var ref = data[i];
|
var ref = data[i];
|
||||||
await this.addFavoriteWorld(ref, D.worldImportFavoriteGroup);
|
await this.addFavoriteWorld(ref, D.worldImportFavoriteGroup);
|
||||||
removeFromArray(this.worldImportTable.data, ref);
|
removeFromArray(this.worldImportTable.data, ref);
|
||||||
@@ -20217,7 +20237,7 @@ speechSynthesis.getVoices();
|
|||||||
var note = '';
|
var note = '';
|
||||||
var targetUserId = '';
|
var targetUserId = '';
|
||||||
if (typeof args.json !== 'undefined') {
|
if (typeof args.json !== 'undefined') {
|
||||||
note = args.json.note;
|
note = $app.replaceBioSymbols(args.json.note);
|
||||||
}
|
}
|
||||||
if (typeof args.params !== 'undefined') {
|
if (typeof args.params !== 'undefined') {
|
||||||
targetUserId = args.params.targetUserId;
|
targetUserId = args.params.targetUserId;
|
||||||
@@ -20286,6 +20306,15 @@ speechSynthesis.getVoices();
|
|||||||
layout: 'table'
|
layout: 'table'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
API.$on('LOGIN', function () {
|
||||||
|
$app.noteExportTable.data = [];
|
||||||
|
$app.noteExportDialog.visible = false;
|
||||||
|
$app.noteExportDialog.loading = false;
|
||||||
|
$app.noteExportDialog.progress = 0;
|
||||||
|
$app.noteExportDialog.progressTotal = 0;
|
||||||
|
$app.noteExportDialog.errors = '';
|
||||||
|
});
|
||||||
|
|
||||||
$app.methods.showNoteExportDialog = function () {
|
$app.methods.showNoteExportDialog = function () {
|
||||||
this.$nextTick(() => adjustDialogZ(this.$refs.noteExportDialog.$el));
|
this.$nextTick(() => adjustDialogZ(this.$refs.noteExportDialog.$el));
|
||||||
var D = this.noteExportDialog;
|
var D = this.noteExportDialog;
|
||||||
|
|||||||
+5
-4
@@ -3000,7 +3000,7 @@ html
|
|||||||
| Enter a list of world IDs
|
| Enter a list of world IDs
|
||||||
el-input(type="textarea" v-model="worldImportDialog.input" size="mini" rows="10" resize="none" style="margin-top:15px")
|
el-input(type="textarea" v-model="worldImportDialog.input" size="mini" rows="10" resize="none" style="margin-top:15px")
|
||||||
el-button(size="small" @click="processWorldImportList" :disabled="!worldImportDialog.input") Process List
|
el-button(size="small" @click="processWorldImportList" :disabled="!worldImportDialog.input") Process List
|
||||||
span(v-if="worldImportDialog.progress" style="margin-top:10px") Progress: {{ worldImportDialog.progress }}/{{ worldImportDialog.progressTotal }}
|
span(v-if="worldImportDialog.progress" style="margin-top:10px") #[i.el-icon-loading(style="margin-right:5px")] Progress: {{ worldImportDialog.progress }}/{{ worldImportDialog.progressTotal }}
|
||||||
br
|
br
|
||||||
el-dropdown(@click.native.stop trigger="click" size="small")
|
el-dropdown(@click.native.stop trigger="click" size="small")
|
||||||
el-button(size="mini")
|
el-button(size="mini")
|
||||||
@@ -3010,8 +3010,9 @@ html
|
|||||||
template(v-for="groupAPI in API.favoriteWorldGroups" :key="groupAPI.name")
|
template(v-for="groupAPI in API.favoriteWorldGroups" :key="groupAPI.name")
|
||||||
el-dropdown-item(style="display:block;margin:10px 0" @click.native="selectWorldImportGroup(groupAPI)" :disabled="groupAPI.count >= groupAPI.capacity") {{ groupAPI.displayName }} ({{ groupAPI.count }}/{{ groupAPI.capacity }})
|
el-dropdown-item(style="display:block;margin:10px 0" @click.native="selectWorldImportGroup(groupAPI)" :disabled="groupAPI.count >= groupAPI.capacity") {{ groupAPI.displayName }} ({{ groupAPI.count }}/{{ groupAPI.capacity }})
|
||||||
el-button(size="small" @click="importWorldImportTable" style="margin:5px" :disabled="worldImportTable.data.length === 0 || !worldImportDialog.worldImportFavoriteGroup") Import Worlds
|
el-button(size="small" @click="importWorldImportTable" style="margin:5px" :disabled="worldImportTable.data.length === 0 || !worldImportDialog.worldImportFavoriteGroup") Import Worlds
|
||||||
|
el-button(v-if="worldImportDialog.loading" size="small" @click="cancelWorldImport" style="margin-top:10px") Cancel
|
||||||
span(v-if="worldImportDialog.worldImportFavoriteGroup") {{ worldImportTable.data.length }} / {{ worldImportDialog.worldImportFavoriteGroup.capacity - worldImportDialog.worldImportFavoriteGroup.count }}
|
span(v-if="worldImportDialog.worldImportFavoriteGroup") {{ worldImportTable.data.length }} / {{ worldImportDialog.worldImportFavoriteGroup.capacity - worldImportDialog.worldImportFavoriteGroup.count }}
|
||||||
span(v-if="worldImportDialog.importProgress" style="margin:10px") Import Progress: {{ worldImportDialog.importProgress }}/{{ worldImportDialog.importProgressTotal }}
|
span(v-if="worldImportDialog.importProgress" style="margin:10px") #[i.el-icon-loading(style="margin-right:5px")] Import Progress: {{ worldImportDialog.importProgress }}/{{ worldImportDialog.importProgressTotal }}
|
||||||
br
|
br
|
||||||
el-button(size="small" @click="clearWorldImportTable") Clear Table
|
el-button(size="small" @click="clearWorldImportTable") Clear Table
|
||||||
template(v-if="worldImportDialog.errors")
|
template(v-if="worldImportDialog.errors")
|
||||||
@@ -3062,8 +3063,8 @@ html
|
|||||||
el-table-column(label="Image" width="70" prop="currentAvatarThumbnailImageUrl")
|
el-table-column(label="Image" width="70" prop="currentAvatarThumbnailImageUrl")
|
||||||
template(v-once #default="scope")
|
template(v-once #default="scope")
|
||||||
el-popover(placement="right" height="500px" trigger="hover")
|
el-popover(placement="right" height="500px" trigger="hover")
|
||||||
img.friends-list-avatar(slot="reference" v-lazy="scope.row.ref.currentAvatarThumbnailImageUrl")
|
img.friends-list-avatar(slot="reference" v-lazy="userImage(scope.row.ref)")
|
||||||
img.friends-list-avatar(v-lazy="scope.row.ref.currentAvatarImageUrl" style="height:500px;cursor:pointer" @click="openExternalLink(scope.row.ref.currentAvatarImageUrl)")
|
img.friends-list-avatar(v-lazy="userImageFull(scope.row.ref)" style="height:500px;cursor:pointer" @click="openExternalLink(userImageFull(scope.row.ref))")
|
||||||
el-table-column(label="Name" width="170" prop="name")
|
el-table-column(label="Name" width="170" prop="name")
|
||||||
template(v-once #default="scope")
|
template(v-once #default="scope")
|
||||||
span.x-link(v-text="scope.row.name" @click="showUserDialog(scope.row.id)")
|
span.x-link(v-text="scope.row.name" @click="showUserDialog(scope.row.id)")
|
||||||
|
|||||||
Reference in New Issue
Block a user