This commit is contained in:
Natsumi
2024-11-26 17:27:24 +13:00
parent f9738e3797
commit 10aa51fea1
7 changed files with 61 additions and 23 deletions

View File

@@ -3660,6 +3660,9 @@ speechSynthesis.getVoices();
isSteamVRRunning,
isHmdAfk
) {
if (this.gameLogDisabled) {
return;
}
if (isGameRunning !== this.isGameRunning) {
this.isGameRunning = isGameRunning;
if (isGameRunning) {
@@ -17496,7 +17499,7 @@ speechSynthesis.getVoices();
var args = await API.call(`file/${fileId}`);
var imageUrl = args.versions[1].file.url;
var createdAt = args.versions[0].created_at;
var path = `${createdAt.slice(0, 7)}`;
var path = createdAt.slice(0, 7);
var fileNameDate = createdAt
.replace(/:/g, '-')
.replace(/T/g, '_')
@@ -17684,20 +17687,32 @@ speechSynthesis.getVoices();
false
);
$app.methods.getPrintDate = function (print) {
var createdAt = new Date();
$app.methods.getPrintLocalDate = function (print) {
if (print.createdAt) {
createdAt = new Date(print.createdAt);
} else if (print.timestamp) {
createdAt = new Date(print.timestamp);
var createdAt = new Date(print.createdAt);
// cursed convert to local time
createdAt.setMinutes(
createdAt.getMinutes() - createdAt.getTimezoneOffset()
);
return createdAt;
}
if (print.timestamp) {
var createdAt = new Date(print.timestamp);
return createdAt;
}
var createdAt = new Date();
// cursed convert to local time
createdAt.setMinutes(
createdAt.getMinutes() - createdAt.getTimezoneOffset()
);
return createdAt;
};
$app.methods.getPrintFileName = function (print) {
var authorName = print.authorName;
// fileDate format: 2024-11-03_16-14-25.757
var createdAt = this.getPrintDate(print);
var createdAt = this.getPrintLocalDate(print);
var fileNameDate = createdAt
.toISOString()
.replace(/:/g, '-')
@@ -17721,8 +17736,8 @@ speechSynthesis.getVoices();
console.error('Print image URL is missing', args);
return;
}
var createdAt = this.getPrintDate(args.json);
var path = `${createdAt.toISOString().slice(0, 7)}`;
var createdAt = this.getPrintLocalDate(args.json);
var path = createdAt.toISOString().slice(0, 7);
var fileName = this.getPrintFileName(args.json);
var status = await AppApi.SavePrintToFile(imageUrl, path, fileName);
if (status) {
@@ -19093,9 +19108,19 @@ speechSynthesis.getVoices();
break;
}
}
if (this.isRealInstance(location) && lastLocation !== location) {
if (lastLocation === location) {
return;
}
this.lastLocationDestination = '';
this.lastLocationDestinationTime = 0;
if (this.isRealInstance(location)) {
var dt = new Date().toJSON();
var L = $utils.parseLocation(location);
this.lastLocation.location = location;
this.lastLocation.date = dt;
var entry = {
created_at: dt,
type: 'Location',
@@ -19113,6 +19138,9 @@ speechSynthesis.getVoices();
this.applyUserDialogLocation();
this.applyWorldDialogInstances();
this.applyGroupDialogInstances();
} else {
this.lastLocation.location = '';
this.lastLocation.date = '';
}
};
@@ -20594,7 +20622,9 @@ speechSynthesis.getVoices();
ref.name.toLowerCase().includes(search) ||
ref.authorName.toLowerCase().includes(search)
) {
if (!results.some(r => r.id == ref.id)) results.push(ref);
if (!results.some((r) => r.id == ref.id)) {
results.push(ref);
}
}
}
}
@@ -20608,7 +20638,9 @@ speechSynthesis.getVoices();
ref.name.toLowerCase().includes(search) ||
ref.authorName.toLowerCase().includes(search)
) {
if (!results.some(r => r.id == ref.id)) results.push(ref);
if (!results.some((r) => r.id == ref.id)) {
results.push(ref);
}
}
}

View File

@@ -25,7 +25,7 @@ export default class extends baseClass {
}
if (
!this.discordActive ||
!this.isGameRunning ||
(!this.isGameRunning && !this.gameLogDisabled) ||
(!currentLocation && !this.lastLocation$.tag)
) {
this.setDiscordActive(false);

View File

@@ -453,9 +453,7 @@ export default class extends baseClass {
break;
case 'invite':
this.speak(
`${
displayName
} has invited you to ${this.displayLocation(
`${displayName} has invited you to ${this.displayLocation(
noty.details.worldId,
noty.details.worldName,
noty.groupName
@@ -526,9 +524,7 @@ export default class extends baseClass {
case 'PortalSpawn':
if (displayName) {
this.speak(
`${
displayName
} has spawned a portal to ${this.displayLocation(
`${displayName} has spawned a portal to ${this.displayLocation(
noty.instanceId,
noty.worldName,
noty.groupName

View File

@@ -443,7 +443,7 @@
},
"save_instance_stickers_to_file": {
"header": "Save Instance Stickers To File",
"description": "Save dropped Stickers to your VRChat Pictures folder"
"description": "Save placed stickers to your VRChat Pictures folder"
},
"remote_database": {
"header": "Remote Avatar Database",

View File

@@ -182,7 +182,7 @@ mixin currentUser()
span(v-else style="display:block")  
display-name.x-ellipsis(v-if="image.authorId" :userid="image.authorId" :hint="image.authorName" style="color:#909399;font-family:monospace;display:block")
span(v-else style="font-family:monospace;display:block")  
span.x-ellipsis(v-if="image.timestamp" style="color:#909399;font-family:monospace;font-size:11px;display:block") {{ image.timestamp | formatDate('long') }}
span.x-ellipsis(v-if="image.createdAt" style="color:#909399;font-family:monospace;font-size:11px;display:block") {{ image.createdAt | formatDate('long') }}
span(v-else style="display:block")  
div(style="float:right")
el-button(type="default" @click="showFullscreenImageDialog(image.files.image, getPrintFileName(image))" size="mini" icon="el-icon-picture-outline" circle)