Fix print cropping and Linux custom photo path

This commit is contained in:
Natsumi
2025-02-17 13:17:43 +13:00
parent 8ee28ea3ca
commit 60d8d7682f
10 changed files with 44 additions and 26 deletions

View File

@@ -10745,12 +10745,14 @@ console.log(`isLinux: ${LINUX}`);
this.currentInstanceWorld.instance = ref;
} else {
var L = $utils.parseLocation(instanceId);
API.getInstance({
worldId: L.worldId,
instanceId: L.instanceId
}).then((args) => {
this.currentInstanceWorld.instance = args.ref;
});
if (L.isRealInstance) {
API.getInstance({
worldId: L.worldId,
instanceId: L.instanceId
}).then((args) => {
this.currentInstanceWorld.instance = args.ref;
});
}
}
}
};
@@ -17767,7 +17769,7 @@ console.log(`isLinux: ${LINUX}`);
$app.methods.refreshInstancePlayerCount = function (instance) {
var L = $utils.parseLocation(instance);
if (L.worldId && L.instanceId) {
if (L.isRealInstance) {
API.getInstance({
worldId: L.worldId,
instanceId: L.instanceId
@@ -18611,7 +18613,9 @@ console.log(`isLinux: ${LINUX}`);
console.log(`Print saved to file: ${monthFolder}\\${fileName}`);
if (this.cropInstancePrints) {
await AppApi.CropPrintImage(filePath);
if (!await AppApi.CropPrintImage(filePath)) {
console.error('Failed to crop print image');
}
}
}
@@ -22318,7 +22322,7 @@ console.log(`isLinux: ${LINUX}`);
}
if (!API.queuedInstances.has(instanceId)) {
var L = $utils.parseLocation(instanceId);
if (L.worldId && L.instanceId) {
if (L.isRealInstance) {
API.getInstance({
worldId: L.worldId,
instanceId: L.instanceId

View File

@@ -96,9 +96,12 @@ export default class extends baseClass {
if (!$app.isGameRunning && json.presence) {
if ($utils.isRealInstance(json.presence.world)) {
location = `${json.presence.world}:${json.presence.instance}`;
travelingToLocation = `${json.presence.travelingToWorld}:${json.presence.travelingToInstance}`;
} else {
location = json.presence.world;
}
if ($utils.isRealInstance(json.presence.travelingToWorld)) {
travelingToLocation = `${json.presence.travelingToWorld}:${json.presence.travelingToInstance}`;
} else {
travelingToLocation = json.presence.travelingToWorld;
}
instanceId = json.presence.instance;

View File

@@ -469,8 +469,8 @@ export default class extends baseClass {
template:
'<div @click="confirm" class="avatar-info">' +
'<span style="margin-right:5px">{{ avatarName }}</span>' +
'<span style="margin-right:5px" :class="color">{{ avatarType }}</span>' +
'<span style="color:#909399;font-family:monospace;font-size:12px;">{{ avatarTags }}</span>' +
'<span v-if="avatarType" style="margin-right:5px" :class="color">{{ avatarType }}</span>' +
'<span v-if="avatarTags" style="color:#909399;font-family:monospace;font-size:12px;">{{ avatarTags }}</span>' +
'</div>',
props: {
imageurl: String,

View File

@@ -89,6 +89,7 @@ export default {
return false;
}
switch (instanceId) {
case ':':
case 'offline':
case 'offline:offline':
case 'private':

View File

@@ -742,6 +742,7 @@
"copy_id": "Copy ID",
"copy_url": "Copy URL",
"copy_display_name": "Copy DisplayName",
"vrcplus_hides_avatar": "When a VRC+ profile photo is set, avatar info is hidden. This also hides avatar changes in the feed",
"accuracy_notice": "Info from local database may not be accurate",
"instance_full": "full",
"instance_closed": "closed",

View File

@@ -441,7 +441,13 @@ mixin userDialog
avatar-info(
:imageurl='userDialog.ref.currentAvatarImageUrl'
:userid='userDialog.id'
:avatartags='userDialog.ref.currentAvatarTags')
:avatartags='userDialog.ref.currentAvatarTags'
style='display: inline-block')
el-tooltip(
v-if='userDialog.ref.profilePicOverride && !userDialog.ref.currentAvatarImageUrl && !hideTooltips'
placement='top'
:content='$t("dialog.user.info.vrcplus_hides_avatar")')
i.el-icon-warning
.x-friend-item(style='width: 100%; cursor: default')
.detail
span.name(style='margin-bottom: 5px') {{ $t('dialog.user.info.represented_group') }}

View File

@@ -172,7 +172,7 @@ mixin friendsListSidebar
span(v-if='friend.isVIP' style='margin-left: 2px') ⭐
span.extra(v-if='friend.pendingOffline') #[i.el-icon-warning-outline] {{ $t('side_panel.pending_offline') }}
template(v-else)
template(v-if='friend.ref.travelingToLocation')
template(v-if='friend.ref.location === "traveling"')
i.el-icon.el-icon-loading(
style='display: inline-block; margin-right: 5px')
timer.extra(