mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 22:33:50 +02:00
Fixes
This commit is contained in:
@@ -33,10 +33,20 @@ namespace VRCX
|
||||
client?.Send(ipcPacket);
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetIpcName()
|
||||
{
|
||||
var hash = 0;
|
||||
foreach (var c in Environment.UserName)
|
||||
{
|
||||
hash += c;
|
||||
}
|
||||
return $"vrcx-ipc-{hash}";
|
||||
}
|
||||
|
||||
public void CreateIPCServer()
|
||||
{
|
||||
var ipcServer = new NamedPipeServerStream("vrcx-ipc", PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances, PipeTransmissionMode.Byte, PipeOptions.Asynchronous);
|
||||
var ipcServer = new NamedPipeServerStream(GetIpcName(), PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances, PipeTransmissionMode.Byte, PipeOptions.Asynchronous);
|
||||
ipcServer.BeginWaitForConnection(DoAccept, ipcServer);
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace VRCX
|
||||
private static void IPCToMain()
|
||||
{
|
||||
new IPCServer().CreateIPCServer();
|
||||
var ipcClient = new NamedPipeClientStream(".", "vrcx-ipc", PipeDirection.InOut);
|
||||
var ipcClient = new NamedPipeClientStream(".", IPCServer.GetIpcName(), PipeDirection.InOut);
|
||||
ipcClient.Connect();
|
||||
|
||||
if (ipcClient.IsConnected)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user