mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-14 12:23:52 +02:00
Save Instance Prints To File
This commit is contained in:
@@ -39,7 +39,7 @@ export default class extends baseClass {
|
||||
if (this.gameLogDisabled) {
|
||||
return;
|
||||
}
|
||||
var userId = gameLog.userId;
|
||||
var userId = String(gameLog.userId || '');
|
||||
if (!userId && gameLog.displayName) {
|
||||
for (var ref of API.cachedUsers.values()) {
|
||||
if (ref.displayName === gameLog.displayName) {
|
||||
@@ -257,6 +257,25 @@ export default class extends baseClass {
|
||||
// if (!userId) {
|
||||
// break;
|
||||
// }
|
||||
|
||||
if (!$app.saveInstancePrints) {
|
||||
break;
|
||||
}
|
||||
try {
|
||||
var printId = '';
|
||||
var url = new URL(gameLog.url);
|
||||
if (
|
||||
url.pathname.substring(0, 14) === '/api/1/prints/'
|
||||
) {
|
||||
var pathArray = url.pathname.split('/');
|
||||
printId = pathArray[4];
|
||||
}
|
||||
if (printId && printId.length === 41) {
|
||||
$app.trySavePrintToFile(printId);
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
break;
|
||||
case 'avatar-change':
|
||||
var ref = this.lastLocation.playerList.get(userId);
|
||||
|
||||
@@ -598,6 +598,9 @@ export default class extends baseClass {
|
||||
},
|
||||
key() {
|
||||
this.parse();
|
||||
},
|
||||
userid() {
|
||||
this.parse();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@@ -514,19 +514,34 @@ export default class extends baseClass {
|
||||
var contentType = content.contentType;
|
||||
console.log('content-refresh', content);
|
||||
if (contentType === 'icon') {
|
||||
if ($app.galleryDialogVisible) {
|
||||
if (
|
||||
$app.galleryDialogVisible &&
|
||||
!$app.galleryDialogIconsLoading
|
||||
) {
|
||||
$app.refreshVRCPlusIconsTable();
|
||||
}
|
||||
} else if (contentType === 'gallery') {
|
||||
if ($app.galleryDialogVisible) {
|
||||
if (
|
||||
$app.galleryDialogVisible &&
|
||||
!$app.galleryDialogGalleryLoading
|
||||
) {
|
||||
$app.refreshGalleryTable();
|
||||
}
|
||||
} else if (contentType === 'emoji') {
|
||||
if ($app.galleryDialogVisible) {
|
||||
if (
|
||||
$app.galleryDialogVisible &&
|
||||
!$app.galleryDialogEmojisLoading
|
||||
) {
|
||||
$app.refreshEmojiTable();
|
||||
}
|
||||
} else if (contentType === 'print') {
|
||||
if ($app.galleryDialogVisible) {
|
||||
} else if (
|
||||
contentType === 'print' ||
|
||||
contentType === 'prints'
|
||||
) {
|
||||
if (
|
||||
$app.galleryDialogVisible &&
|
||||
!$app.galleryDialogPrintsLoading
|
||||
) {
|
||||
$app.refreshPrintTable();
|
||||
}
|
||||
} else if (contentType === 'avatar') {
|
||||
|
||||
Reference in New Issue
Block a user