Skip to content

Commit

Permalink
Merge pull request #898 from the-hideout/profile-improvements
Browse files Browse the repository at this point in the history
Profile improvements
  • Loading branch information
Razzmatazzz authored Mar 26, 2024
2 parents 862e212 + 85d2c2c commit 46a78c3
Show file tree
Hide file tree
Showing 15 changed files with 305 additions and 96 deletions.
1 change: 1 addition & 0 deletions src/features/achievements/do-fetch-achievements.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class AchievementsQuery extends APIQuery {
description
hidden
playersCompletedPercent
adjustedPlayersCompletedPercent
normalizedRarity
rarity
}
Expand Down
21 changes: 20 additions & 1 deletion src/features/meta/do-fetch-meta.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ class MetaQuery extends APIQuery {
level
exp
}
skills(lang: ${language}) {
id
name
}
mastering {
id
weapons {
id
}
level2
level3
}
}`;

const metaData = await this.graphqlRequest(query);
Expand Down Expand Up @@ -72,7 +84,14 @@ class MetaQuery extends APIQuery {
}
}

return {flea: metaData.data.fleaMarket, armor: metaData.data.armorMaterials, categories: metaData.data.itemCategories, playerLevels: metaData.data.playerLevels};
return {
flea: metaData.data.fleaMarket,
armor: metaData.data.armorMaterials,
categories: metaData.data.itemCategories,
playerLevels: metaData.data.playerLevels,
skills: metaData.data.skills,
mastering: metaData.data.mastering,
};
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/achievements/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function Achievements() {
{
Header: t('Player %'),
id: 'playersCompletedPercent',
accessor: 'playersCompletedPercent',
accessor: 'adjustedPlayersCompletedPercent',
Cell: (props) => {
return (
<div className="center-content">
Expand Down
4 changes: 2 additions & 2 deletions src/pages/api-docs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ function APIDocs() {
<div className="section-text-wrapper">
<h3>{t('Is there a rate limit?')}</h3>
<Trans i18nKey={'api-faq-rate-limit-p'}>
Nope! We currently do not have a rate-limit enabled. That being said, please respect this and do not hammer the API with requests just because you can. Use common sense!
We occasionally get hit with a lot of traffic from bad actors that require implementing rate limits.
Price data is updated every 5 minutes, so there's really no need to query faster than that.
To view an up-to-date definition of our rate-limits (or lack there-of), check our Cloudflare GitHub repo where they are defined: <a href="https://github.com/the-hideout/cloudflare/blob/main/terraform/security.tf" target="_blank" rel="noopener noreferrer">rate limit definition</a>.
Use common sense, and you should be fine.
</Trans>
</div>
<div className="section-text-wrapper">
Expand Down
9 changes: 8 additions & 1 deletion src/pages/player/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,11 @@ ul.favorite-item-list li {

.turnstile-widget {
margin-top: 20px;
}
}

.profile-button {
padding: .2rem;
border-radius: 4px;
vertical-align: middle;
margin-left: 20px;
}
Loading

0 comments on commit 46a78c3

Please sign in to comment.