Skip to content

Commit

Permalink
Profile Viewer: Add considerations for migrated accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainan committed Jun 30, 2024
1 parent abf673d commit 5ad9087
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,12 @@
"EventSyndicate",
];
const vallisRaceNames = [0, "Puffin’ Pastures", "Bomb the Spaceport", "Shaving Nef", "Anyo’s Ointment", "Grinding the Void", "Fortuna’s Folley", "Taxman’s Curve", "Kubrodon Twist", "Mumsie Dadsie", "Catalyst", "Skeggin’ Out", "Deathgrip", "Dog Line", "River Run", "The Hard Way", "Sky-Eye", "Pobber’s Drop", "Lord of the Board", "Breakdown Or Bust", "Frost Merchant", "Roky’s Roll", "Meat and Greet"];
const platformNames = {
"pc": "PC",
"ps4": "PlayStation",
"xb1": "Xbox",
"swi": "Switch",
};

function peColourToHex(colour)
{
Expand Down Expand Up @@ -487,7 +493,7 @@ function doLookup()
if (data)
{
window.profile = data;
window.hashprefix = "account=" + encodeURIComponent(profile.Results[0].DisplayName) + "&platform=" + document.getElementById("platform").value + "&";
window.hashprefix = "account=" + encodeURIComponent(profile.Results[0].DisplayName) + "&platform=" + profile.platform + "&";
location.hash = hashprefix + "tab=fashion"; // default tab
}
else
Expand All @@ -504,7 +510,7 @@ function renderProfile()
document.querySelector("#status").classList.add("d-none");

document.getElementById("profile-name").textContent = profile.Results[0].DisplayName;
document.getElementById("mr").textContent = "Mastery Rank " + (profile.Results[0].PlayerLevel ?? 0);
document.getElementById("mr").textContent = platformNames[profile.platform] + " Account, Mastery Rank " + (profile.Results[0].PlayerLevel ?? 0);

const accolades = [];
if (profile.Results[0].Staff)
Expand Down
2 changes: 1 addition & 1 deletion supplemental-data/profile-[DE]Rebecca.json

Large diffs are not rendered by default.

0 comments on commit 5ad9087

Please sign in to comment.