mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
Discord world images
This commit is contained in:
BIN
DiscordRPC/DiscordRPC.dll
Normal file
BIN
DiscordRPC/DiscordRPC.dll
Normal file
Binary file not shown.
3
DiscordRPC/README.md
Normal file
3
DiscordRPC/README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Discord Rich Presence
|
||||||
|
|
||||||
|
Source code is available here: [https://github.com/Lachee/discord-rpc-csharp](https://github.com/Lachee/discord-rpc-csharp)
|
||||||
15
VRCX.csproj
15
VRCX.csproj
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
@@ -61,6 +61,10 @@
|
|||||||
<Reference Include="Blake2Sharp">
|
<Reference Include="Blake2Sharp">
|
||||||
<HintPath>librsync.net\Blake2Sharp.dll</HintPath>
|
<HintPath>librsync.net\Blake2Sharp.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="DiscordRPC">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>DiscordRPC\DiscordRPC.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="librsync.net">
|
<Reference Include="librsync.net">
|
||||||
<HintPath>librsync.net\librsync.net.dll</HintPath>
|
<HintPath>librsync.net\librsync.net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -171,16 +175,13 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CefSharp.Common">
|
<PackageReference Include="CefSharp.Common">
|
||||||
<Version>100.0.230</Version>
|
<Version>101.0.150</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="CefSharp.OffScreen">
|
<PackageReference Include="CefSharp.OffScreen">
|
||||||
<Version>100.0.230</Version>
|
<Version>101.0.150</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="CefSharp.WinForms">
|
<PackageReference Include="CefSharp.WinForms">
|
||||||
<Version>100.0.230</Version>
|
<Version>101.0.150</Version>
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="DiscordRichPresence">
|
|
||||||
<Version>1.0.175</Version>
|
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications">
|
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications">
|
||||||
<Version>7.1.2</Version>
|
<Version>7.1.2</Version>
|
||||||
|
|||||||
@@ -7737,11 +7737,13 @@ speechSynthesis.getVoices();
|
|||||||
$app.data.discordInstance = configRepository.getBool('discordInstance');
|
$app.data.discordInstance = configRepository.getBool('discordInstance');
|
||||||
$app.data.discordJoinButton = configRepository.getBool('discordJoinButton');
|
$app.data.discordJoinButton = configRepository.getBool('discordJoinButton');
|
||||||
$app.data.discordHideInvite = configRepository.getBool('discordHideInvite');
|
$app.data.discordHideInvite = configRepository.getBool('discordHideInvite');
|
||||||
|
$app.data.discordHideImage = configRepository.getBool('discordHideImage');
|
||||||
$app.methods.saveDiscordOption = function () {
|
$app.methods.saveDiscordOption = function () {
|
||||||
configRepository.setBool('discordActive', this.discordActive);
|
configRepository.setBool('discordActive', this.discordActive);
|
||||||
configRepository.setBool('discordInstance', this.discordInstance);
|
configRepository.setBool('discordInstance', this.discordInstance);
|
||||||
configRepository.setBool('discordJoinButton', this.discordJoinButton);
|
configRepository.setBool('discordJoinButton', this.discordJoinButton);
|
||||||
configRepository.setBool('discordHideInvite', this.discordHideInvite);
|
configRepository.setBool('discordHideInvite', this.discordHideInvite);
|
||||||
|
configRepository.setBool('discordHideImage', this.discordHideImage);
|
||||||
if (!this.discordActive) {
|
if (!this.discordActive) {
|
||||||
Discord.SetText('', '');
|
Discord.SetText('', '');
|
||||||
Discord.SetActive(false);
|
Discord.SetActive(false);
|
||||||
@@ -9850,6 +9852,7 @@ speechSynthesis.getVoices();
|
|||||||
Discord.SetTimestamps(this.lastLocation.date, 0);
|
Discord.SetTimestamps(this.lastLocation.date, 0);
|
||||||
L = API.parseLocation(this.lastLocation.location);
|
L = API.parseLocation(this.lastLocation.location);
|
||||||
L.worldName = '';
|
L.worldName = '';
|
||||||
|
L.thumbnailImageUrl = '';
|
||||||
L.worldCapacity = 0;
|
L.worldCapacity = 0;
|
||||||
L.joinUrl = '';
|
L.joinUrl = '';
|
||||||
L.accessName = '';
|
L.accessName = '';
|
||||||
@@ -9857,12 +9860,14 @@ speechSynthesis.getVoices();
|
|||||||
var ref = API.cachedWorlds.get(L.worldId);
|
var ref = API.cachedWorlds.get(L.worldId);
|
||||||
if (ref) {
|
if (ref) {
|
||||||
L.worldName = ref.name;
|
L.worldName = ref.name;
|
||||||
|
L.thumbnailImageUrl = ref.thumbnailImageUrl;
|
||||||
L.worldCapacity = ref.capacity * 2;
|
L.worldCapacity = ref.capacity * 2;
|
||||||
} else {
|
} else {
|
||||||
API.getWorld({
|
API.getWorld({
|
||||||
worldId: L.worldId
|
worldId: L.worldId
|
||||||
}).then((args) => {
|
}).then((args) => {
|
||||||
L.worldName = args.ref.name;
|
L.worldName = args.ref.name;
|
||||||
|
L.thumbnailImageUrl = args.ref.thumbnailImageUrl;
|
||||||
L.worldCapacity = args.ref.capacity * 2;
|
L.worldCapacity = args.ref.capacity * 2;
|
||||||
return args;
|
return args;
|
||||||
});
|
});
|
||||||
@@ -9941,8 +9946,7 @@ speechSynthesis.getVoices();
|
|||||||
partyMaxSize = 0;
|
partyMaxSize = 0;
|
||||||
buttonText = '';
|
buttonText = '';
|
||||||
buttonUrl = '';
|
buttonUrl = '';
|
||||||
}
|
} else if (this.isRpcWorld(L.tag)) {
|
||||||
if (!hidePrivate && this.isRpcWorld(L.tag)) {
|
|
||||||
// dance world rpc
|
// dance world rpc
|
||||||
if (L.worldId === 'wrld_f20326da-f1ac-45fc-a062-609723b097b1') {
|
if (L.worldId === 'wrld_f20326da-f1ac-45fc-a062-609723b097b1') {
|
||||||
appId = '784094509008551956';
|
appId = '784094509008551956';
|
||||||
@@ -9978,6 +9982,8 @@ speechSynthesis.getVoices();
|
|||||||
1000
|
1000
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
} else if (!this.discordHideImage && L.thumbnailImageUrl) {
|
||||||
|
bigIcon = L.thumbnailImageUrl;
|
||||||
}
|
}
|
||||||
Discord.SetAssets(
|
Discord.SetAssets(
|
||||||
bigIcon, // big icon
|
bigIcon, // big icon
|
||||||
|
|||||||
@@ -1144,6 +1144,9 @@ html
|
|||||||
div.options-container-item
|
div.options-container-item
|
||||||
span.name Hide world details in private
|
span.name Hide world details in private
|
||||||
el-switch(v-model="discordHideInvite" @change="saveDiscordOption" :disabled="!discordActive")
|
el-switch(v-model="discordHideInvite" @change="saveDiscordOption" :disabled="!discordActive")
|
||||||
|
div.options-container-item
|
||||||
|
span.name Hide world images
|
||||||
|
el-switch(v-model="discordHideImage" @change="saveDiscordOption" :disabled="!discordActive")
|
||||||
el-tab-pane(label="Advanced")
|
el-tab-pane(label="Advanced")
|
||||||
div.options-container(style="margin-top:0")
|
div.options-container(style="margin-top:0")
|
||||||
span.header Advanced
|
span.header Advanced
|
||||||
|
|||||||
Reference in New Issue
Block a user