diff --git a/DiscordRPC/DiscordRPC.dll b/DiscordRPC/DiscordRPC.dll new file mode 100644 index 00000000..18927e0f Binary files /dev/null and b/DiscordRPC/DiscordRPC.dll differ diff --git a/DiscordRPC/README.md b/DiscordRPC/README.md new file mode 100644 index 00000000..cdc24bb8 --- /dev/null +++ b/DiscordRPC/README.md @@ -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) diff --git a/VRCX.csproj b/VRCX.csproj index 41e88530..36f61a33 100644 --- a/VRCX.csproj +++ b/VRCX.csproj @@ -1,4 +1,4 @@ - + @@ -61,6 +61,10 @@ librsync.net\Blake2Sharp.dll + + False + DiscordRPC\DiscordRPC.dll + librsync.net\librsync.net.dll @@ -171,16 +175,13 @@ - 100.0.230 + 101.0.150 - 100.0.230 + 101.0.150 - 100.0.230 - - - 1.0.175 + 101.0.150 7.1.2 diff --git a/html/src/app.js b/html/src/app.js index 47c3cb5f..19a828f6 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -7737,11 +7737,13 @@ speechSynthesis.getVoices(); $app.data.discordInstance = configRepository.getBool('discordInstance'); $app.data.discordJoinButton = configRepository.getBool('discordJoinButton'); $app.data.discordHideInvite = configRepository.getBool('discordHideInvite'); + $app.data.discordHideImage = configRepository.getBool('discordHideImage'); $app.methods.saveDiscordOption = function () { configRepository.setBool('discordActive', this.discordActive); configRepository.setBool('discordInstance', this.discordInstance); configRepository.setBool('discordJoinButton', this.discordJoinButton); configRepository.setBool('discordHideInvite', this.discordHideInvite); + configRepository.setBool('discordHideImage', this.discordHideImage); if (!this.discordActive) { Discord.SetText('', ''); Discord.SetActive(false); @@ -9850,6 +9852,7 @@ speechSynthesis.getVoices(); Discord.SetTimestamps(this.lastLocation.date, 0); L = API.parseLocation(this.lastLocation.location); L.worldName = ''; + L.thumbnailImageUrl = ''; L.worldCapacity = 0; L.joinUrl = ''; L.accessName = ''; @@ -9857,12 +9860,14 @@ speechSynthesis.getVoices(); var ref = API.cachedWorlds.get(L.worldId); if (ref) { L.worldName = ref.name; + L.thumbnailImageUrl = ref.thumbnailImageUrl; L.worldCapacity = ref.capacity * 2; } else { API.getWorld({ worldId: L.worldId }).then((args) => { L.worldName = args.ref.name; + L.thumbnailImageUrl = args.ref.thumbnailImageUrl; L.worldCapacity = args.ref.capacity * 2; return args; }); @@ -9941,8 +9946,7 @@ speechSynthesis.getVoices(); partyMaxSize = 0; buttonText = ''; buttonUrl = ''; - } - if (!hidePrivate && this.isRpcWorld(L.tag)) { + } else if (this.isRpcWorld(L.tag)) { // dance world rpc if (L.worldId === 'wrld_f20326da-f1ac-45fc-a062-609723b097b1') { appId = '784094509008551956'; @@ -9978,6 +9982,8 @@ speechSynthesis.getVoices(); 1000 ); } + } else if (!this.discordHideImage && L.thumbnailImageUrl) { + bigIcon = L.thumbnailImageUrl; } Discord.SetAssets( bigIcon, // big icon diff --git a/html/src/index.pug b/html/src/index.pug index 4fc531f4..365086a8 100644 --- a/html/src/index.pug +++ b/html/src/index.pug @@ -1144,6 +1144,9 @@ html div.options-container-item span.name Hide world details in private 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") div.options-container(style="margin-top:0") span.header Advanced