mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
Fixes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user