mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-05 14:26:06 +02:00
Fixes
This commit is contained in:
+11
-1
@@ -34,9 +34,19 @@ namespace VRCX
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string GetIpcName()
|
||||||
|
{
|
||||||
|
var hash = 0;
|
||||||
|
foreach (var c in Environment.UserName)
|
||||||
|
{
|
||||||
|
hash += c;
|
||||||
|
}
|
||||||
|
return $"vrcx-ipc-{hash}";
|
||||||
|
}
|
||||||
|
|
||||||
public void CreateIPCServer()
|
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);
|
ipcServer.BeginWaitForConnection(DoAccept, ipcServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ namespace VRCX
|
|||||||
private static void IPCToMain()
|
private static void IPCToMain()
|
||||||
{
|
{
|
||||||
new IPCServer().CreateIPCServer();
|
new IPCServer().CreateIPCServer();
|
||||||
var ipcClient = new NamedPipeClientStream(".", "vrcx-ipc", PipeDirection.InOut);
|
var ipcClient = new NamedPipeClientStream(".", IPCServer.GetIpcName(), PipeDirection.InOut);
|
||||||
ipcClient.Connect();
|
ipcClient.Connect();
|
||||||
|
|
||||||
if (ipcClient.IsConnected)
|
if (ipcClient.IsConnected)
|
||||||
|
|||||||
+44
-12
@@ -3660,6 +3660,9 @@ speechSynthesis.getVoices();
|
|||||||
isSteamVRRunning,
|
isSteamVRRunning,
|
||||||
isHmdAfk
|
isHmdAfk
|
||||||
) {
|
) {
|
||||||
|
if (this.gameLogDisabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (isGameRunning !== this.isGameRunning) {
|
if (isGameRunning !== this.isGameRunning) {
|
||||||
this.isGameRunning = isGameRunning;
|
this.isGameRunning = isGameRunning;
|
||||||
if (isGameRunning) {
|
if (isGameRunning) {
|
||||||
@@ -17496,7 +17499,7 @@ speechSynthesis.getVoices();
|
|||||||
var args = await API.call(`file/${fileId}`);
|
var args = await API.call(`file/${fileId}`);
|
||||||
var imageUrl = args.versions[1].file.url;
|
var imageUrl = args.versions[1].file.url;
|
||||||
var createdAt = args.versions[0].created_at;
|
var createdAt = args.versions[0].created_at;
|
||||||
var path = `${createdAt.slice(0, 7)}`;
|
var path = createdAt.slice(0, 7);
|
||||||
var fileNameDate = createdAt
|
var fileNameDate = createdAt
|
||||||
.replace(/:/g, '-')
|
.replace(/:/g, '-')
|
||||||
.replace(/T/g, '_')
|
.replace(/T/g, '_')
|
||||||
@@ -17684,20 +17687,32 @@ speechSynthesis.getVoices();
|
|||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
$app.methods.getPrintDate = function (print) {
|
$app.methods.getPrintLocalDate = function (print) {
|
||||||
var createdAt = new Date();
|
|
||||||
if (print.createdAt) {
|
if (print.createdAt) {
|
||||||
createdAt = new Date(print.createdAt);
|
var createdAt = new Date(print.createdAt);
|
||||||
} else if (print.timestamp) {
|
// cursed convert to local time
|
||||||
createdAt = new Date(print.timestamp);
|
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;
|
return createdAt;
|
||||||
};
|
};
|
||||||
|
|
||||||
$app.methods.getPrintFileName = function (print) {
|
$app.methods.getPrintFileName = function (print) {
|
||||||
var authorName = print.authorName;
|
var authorName = print.authorName;
|
||||||
// fileDate format: 2024-11-03_16-14-25.757
|
// fileDate format: 2024-11-03_16-14-25.757
|
||||||
var createdAt = this.getPrintDate(print);
|
var createdAt = this.getPrintLocalDate(print);
|
||||||
var fileNameDate = createdAt
|
var fileNameDate = createdAt
|
||||||
.toISOString()
|
.toISOString()
|
||||||
.replace(/:/g, '-')
|
.replace(/:/g, '-')
|
||||||
@@ -17721,8 +17736,8 @@ speechSynthesis.getVoices();
|
|||||||
console.error('Print image URL is missing', args);
|
console.error('Print image URL is missing', args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var createdAt = this.getPrintDate(args.json);
|
var createdAt = this.getPrintLocalDate(args.json);
|
||||||
var path = `${createdAt.toISOString().slice(0, 7)}`;
|
var path = createdAt.toISOString().slice(0, 7);
|
||||||
var fileName = this.getPrintFileName(args.json);
|
var fileName = this.getPrintFileName(args.json);
|
||||||
var status = await AppApi.SavePrintToFile(imageUrl, path, fileName);
|
var status = await AppApi.SavePrintToFile(imageUrl, path, fileName);
|
||||||
if (status) {
|
if (status) {
|
||||||
@@ -19093,9 +19108,19 @@ speechSynthesis.getVoices();
|
|||||||
break;
|
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 dt = new Date().toJSON();
|
||||||
var L = $utils.parseLocation(location);
|
var L = $utils.parseLocation(location);
|
||||||
|
|
||||||
|
this.lastLocation.location = location;
|
||||||
|
this.lastLocation.date = dt;
|
||||||
|
|
||||||
var entry = {
|
var entry = {
|
||||||
created_at: dt,
|
created_at: dt,
|
||||||
type: 'Location',
|
type: 'Location',
|
||||||
@@ -19113,6 +19138,9 @@ speechSynthesis.getVoices();
|
|||||||
this.applyUserDialogLocation();
|
this.applyUserDialogLocation();
|
||||||
this.applyWorldDialogInstances();
|
this.applyWorldDialogInstances();
|
||||||
this.applyGroupDialogInstances();
|
this.applyGroupDialogInstances();
|
||||||
|
} else {
|
||||||
|
this.lastLocation.location = '';
|
||||||
|
this.lastLocation.date = '';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -20594,7 +20622,9 @@ speechSynthesis.getVoices();
|
|||||||
ref.name.toLowerCase().includes(search) ||
|
ref.name.toLowerCase().includes(search) ||
|
||||||
ref.authorName.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.name.toLowerCase().includes(search) ||
|
||||||
ref.authorName.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 (
|
if (
|
||||||
!this.discordActive ||
|
!this.discordActive ||
|
||||||
!this.isGameRunning ||
|
(!this.isGameRunning && !this.gameLogDisabled) ||
|
||||||
(!currentLocation && !this.lastLocation$.tag)
|
(!currentLocation && !this.lastLocation$.tag)
|
||||||
) {
|
) {
|
||||||
this.setDiscordActive(false);
|
this.setDiscordActive(false);
|
||||||
|
|||||||
@@ -453,9 +453,7 @@ export default class extends baseClass {
|
|||||||
break;
|
break;
|
||||||
case 'invite':
|
case 'invite':
|
||||||
this.speak(
|
this.speak(
|
||||||
`${
|
`${displayName} has invited you to ${this.displayLocation(
|
||||||
displayName
|
|
||||||
} has invited you to ${this.displayLocation(
|
|
||||||
noty.details.worldId,
|
noty.details.worldId,
|
||||||
noty.details.worldName,
|
noty.details.worldName,
|
||||||
noty.groupName
|
noty.groupName
|
||||||
@@ -526,9 +524,7 @@ export default class extends baseClass {
|
|||||||
case 'PortalSpawn':
|
case 'PortalSpawn':
|
||||||
if (displayName) {
|
if (displayName) {
|
||||||
this.speak(
|
this.speak(
|
||||||
`${
|
`${displayName} has spawned a portal to ${this.displayLocation(
|
||||||
displayName
|
|
||||||
} has spawned a portal to ${this.displayLocation(
|
|
||||||
noty.instanceId,
|
noty.instanceId,
|
||||||
noty.worldName,
|
noty.worldName,
|
||||||
noty.groupName
|
noty.groupName
|
||||||
|
|||||||
@@ -443,7 +443,7 @@
|
|||||||
},
|
},
|
||||||
"save_instance_stickers_to_file": {
|
"save_instance_stickers_to_file": {
|
||||||
"header": "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": {
|
"remote_database": {
|
||||||
"header": "Remote Avatar Database",
|
"header": "Remote Avatar Database",
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ mixin currentUser()
|
|||||||
span(v-else style="display:block")
|
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")
|
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(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")
|
span(v-else style="display:block")
|
||||||
div(style="float:right")
|
div(style="float:right")
|
||||||
el-button(type="default" @click="showFullscreenImageDialog(image.files.image, getPrintFileName(image))" size="mini" icon="el-icon-picture-outline" circle)
|
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