Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Fix Image URL's and Bump Version
Browse files Browse the repository at this point in the history
  • Loading branch information
hypherionmc committed Jul 24, 2022
1 parent 8efdccf commit 278e51f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simple-rpc-editor",
"version": "3.0.1",
"version": "3.0.2",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down
6 changes: 3 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@

<v-select :options="configData.appAssets" class="image-chooser" :class="darkMode ? 'dark' : 'light'" label="name" v-if="(key === 'largeImageKey' || key === 'smallImageKey') && !appVars.manualEdit" v-model="configData.new[appVars.activeSection.current][key]" :reduce="option => option.name" taggable>
<template slot="option" slot-scope="option">
<img :src="'https://cdn.discordapp.com/app-assets/' + configData.new.general.clientID != null ? configData.new.general.clientID : configData.new.general.applicationID + '/' + option.id" style="width: 48px;"/>
<img :src="'https://cdn.discordapp.com/app-assets/' + (configData.new.general.clientID != null ? configData.new.general.clientID : configData.new.general.applicationID) + '/' + option.id" style="width: 48px;"/>
{{ option.name }}
</template>
</v-select>
Expand Down Expand Up @@ -198,7 +198,7 @@

<v-select :options="configData.appAssets" class="image-chooser" :class="darkMode ? 'dark' : 'light'" label="name" v-if="(datakey === 'largeImageKey' || datakey === 'smallImageKey')" v-model="configData.new.world_images.worlds[key][datakey]" :reduce="option => option.name" taggable>
<template slot="option" slot-scope="option">
<img :src="'https://cdn.discordapp.com/app-assets/' + configData.new.general.clientID != null ? configData.new.general.clientID : configData.new.general.applicationID + '/' + option.id" style="width: 48px;"/>
<img :src="'https://cdn.discordapp.com/app-assets/' + (configData.new.general.clientID != null ? configData.new.general.clientID : configData.new.general.applicationID) + '/' + option.id" style="width: 48px;"/>
{{ option.name }}
</template>
</v-select>
Expand Down Expand Up @@ -238,7 +238,7 @@
:reduce="option => option.name" taggable>

<template slot="option" slot-scope="option">
<img :src="'https://cdn.discordapp.com/app-assets/' + configData.new.general.clientID != null ? configData.new.general.clientID : configData.new.general.applicationID + '/' + option.id" style="width: 48px;"/>
<img :src="'https://cdn.discordapp.com/app-assets/' + (configData.new.general.clientID != null ? configData.new.general.clientID : configData.new.general.applicationID) + '/' + option.id" style="width: 48px;"/>
{{ option.name }}
</template>

Expand Down
6 changes: 3 additions & 3 deletions src/scripts/appFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const AppFunctions = {
var assetID = appRef.configData.appAssets.filter(c => c.name === appRef.configData.new[sec].largeImageKey);
if (assetID[0] !== undefined && assetID[0].hasOwnProperty("id")) {
$("#rpcLargeImage")
.css("background", "url(https://cdn.discordapp.com/app-assets/" + appRef.configData.new.general.clientID + "/" + assetID[0].id + ".png)")
.css("background", "url(https://cdn.discordapp.com/app-assets/" + (appRef.configData.new.general.clientID != null ? appRef.configData.new.general.clientID : appRef.configData.new.general.applicationID) + "/" + assetID[0].id + ".png)")
.css("background-size", "100% 100%")
.attr("title", this.dummyVars(dat.largeImageText));
} else if (appRef.configData.new[sec].largeImageKey !== undefined && appRef.configData.new[sec].largeImageKey.startsWith("http")) {
Expand All @@ -127,7 +127,7 @@ const AppFunctions = {
var assetIDSmall = appRef.configData.appAssets.filter(c => c.name === appRef.configData.new[sec].smallImageKey);
if (assetIDSmall[0] !== undefined && assetIDSmall[0].hasOwnProperty("id")) {
$("#rpcSmallImage")
.css("background", "url(https://cdn.discordapp.com/app-assets/" + appRef.configData.new.general.clientID + "/" + assetIDSmall[0].id + ".png)")
.css("background", "url(https://cdn.discordapp.com/app-assets/" + (appRef.configData.new.general.clientID != null ? appRef.configData.new.general.clientID : appRef.configData.new.general.applicationID) + "/" + assetIDSmall[0].id + ".png)")
.css("background-size", "100% 100%")
.attr("title", this.dummyVars(dat.smallImageText));
} else if (appRef.configData.new[sec].smallImageKey !== undefined && appRef.configData.new[sec].smallImageKey.startsWith("http")) {
Expand Down Expand Up @@ -174,7 +174,7 @@ const AppFunctions = {
inputText = inputText.replace("%realmdescription%", "Here be dragons and loot!");
inputText = inputText.replace("%realmgame%", "No Mini-game Loaded");
inputText = inputText.replace("%realmicon%", "https://cdn.firstdarkdev.xyz/srpc/servericon.png");

return inputText;

},
Expand Down

0 comments on commit 278e51f

Please sign in to comment.