Skip to content

Commit

Permalink
Merge pull request #2948 from kshammer/master
Browse files Browse the repository at this point in the history
updated image urls to use new cdn
  • Loading branch information
howardchung authored Jun 23, 2022
2 parents 3f589a4 + fbc97ec commit 048c444
Show file tree
Hide file tree
Showing 20 changed files with 6,711 additions and 6,711 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ REACT_APP_API_HOST=https://api.opendota.com
BROWSER=none
REACT_APP_ENABLE_GOSUAI=
REACT_APP_ENABLE_BOTTOM_BANNER=true
REACT_APP_IMAGE_CDN=https://steamcdn-a.akamaihd.net
REACT_APP_IMAGE_CDN=https://cdn.cloudflare.steamstatic.com
REACT_APP_ENABLE_ADSENSE=true
REACT_APP_ENABLE_DOTA_COACH=true
4 changes: 2 additions & 2 deletions src/components/AbilityTooltip/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,13 @@ const AbilityTooltip = ({ ability, inflictor }) => (
<Resources>
{ability.mc &&
<span>
<ResourceIcon src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/tooltips/mana.png`} alt="" />
<ResourceIcon src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/tooltips/mana.png`} alt="" />
<span className="values">{formatValues(ability.mc)}</span>
</span>
}
{ability.cd &&
<span>
<ResourceIcon src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/tooltips/cooldown.png`} alt="" />
<ResourceIcon src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/tooltips/cooldown.png`} alt="" />
<span className="values">{formatValues(ability.cd)}</span>
</span>
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/ItemTooltip/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ const ItemTooltip = ({ item, inflictor }) => (
<img id="item-img" src={`${process.env.REACT_APP_IMAGE_CDN}${item.img}`} alt="" />
<HeaderText>
<div>{item.dname}</div>
<div id="gold">{<img src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/tooltips/gold.png`} alt="" />}{item.cost}</div>
<div id="gold">{<img src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/tooltips/gold.png`} alt="" />}{item.cost}</div>
</HeaderText>
</div>
</Header>
Expand All @@ -215,13 +215,13 @@ const ItemTooltip = ({ item, inflictor }) => (
<div className="resources">
{type === 'active' && item.mc &&
<span>
<ResourceIcon src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/tooltips/mana.png`} alt="" />
<ResourceIcon src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/tooltips/mana.png`} alt="" />
<span className="values">{item.mc}</span>
</span>
}
{type === 'active' && item.cd &&
<span>
<ResourceIcon src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/tooltips/cooldown.png`} alt="" />
<ResourceIcon src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/tooltips/cooldown.png`} alt="" />
<span className="values">{item.cd}</span>
</span>
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Match/BuildingMap/BuildingMap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ const BuildingMap = ({ match, strings }) => {
</span>
:
<span>
{type !== 'fort' && <img src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/tooltips/gold.png`} alt="" />}
{type !== 'fort' && <img src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/tooltips/gold.png`} alt="" />}
{strings.building_lasthit}
</span>
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Match/MatchStory.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const GoldSpan = (amount) => {
width="25px"
height="17px"
alt={` ${strings.story_gold}`}
src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/tooltips/gold.png`}
src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/tooltips/gold.png`}
style={{ marginLeft: '3px' }}
/>
</StyledStorySpan>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Match/Overview/Timeline.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ const Timeline = ({
<font style={{ color: constants.colorGolden }}>{Math.abs(death.gold_delta)} </font>
<img
alt=""
src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/tooltips/gold.png`}
src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/tooltips/gold.png`}
/>
</span>
</section>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Match/TeamfightMap/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export const TeamfightIcon = ({
export const GoldDelta = ({ radiantGoldDelta }) => (
<div className="goldChange">
{isRadiant(radiantGoldDelta) ? radiantGoldDelta : radiantGoldDelta * -1}
<img src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/tooltips/gold.png`} alt="" />
<img src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/tooltips/gold.png`} alt="" />
</div>
);

Expand Down
4 changes: 2 additions & 2 deletions src/components/Match/Vision/VisionFilter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import PlayerThumb from '../PlayerThumb';
const data = [
{
type: 'observer',
image: <img height="24" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/items/ward_observer_lg.png`} alt="" />,
image: <img height="24" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/items/ward_observer.png`} alt="" />,
},
{
type: 'sentry',
image: <img height="24" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/items/ward_sentry_lg.png`} alt="" />,
image: <img height="24" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/items/ward_sentry.png`} alt="" />,
},
];

Expand Down
2 changes: 1 addition & 1 deletion src/components/Match/Vision/VisionLog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const generateData = (match, strings) => (log) => {

return {
...match.players[log.player],
type: <img height="29" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/items/ward_${log.type}_lg.png`} alt="" />,
type: <img height="29" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/items/ward_${log.type}.png`} alt="" />,
enter_time: formatSeconds(log.entered.time),
left_time: formatSeconds(((log.left && log.left.time) || (match && match.duration)) - discrepancy) || '-',
duration: <span style={{ color: durationColor }}>{formatSeconds(duration - discrepancy)}</span>,
Expand Down
22 changes: 11 additions & 11 deletions src/components/Match/matchColumns.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ export default (strings) => {
center: true,
displayName: (
<div style={{ display: 'inline-flex', verticalAlign: 'middle' }}>
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/items/ward_observer_lg.png`} alt="" />
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/items/ward_observer.png`} alt="" />
&nbsp;{strings.th_duration_shorthand}
</div>
),
Expand All @@ -1323,7 +1323,7 @@ export default (strings) => {
center: true,
displayName: (
<div style={{ display: 'inline-flex', verticalAlign: 'middle' }}>
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/items/ward_sentry_lg.png`} alt="" />
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/items/ward_sentry.png`} alt="" />
&nbsp;{strings.th_duration_shorthand}
</div>
),
Expand All @@ -1338,7 +1338,7 @@ export default (strings) => {
center: true,
displayName: (
<div style={{ display: 'inline-flex', verticalAlign: 'middle' }}>
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/items/ward_observer_lg.png`} alt="" />
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/items/ward_observer.png`} alt="" />
&nbsp;{strings.th_purchase_shorthand}
</div>
),
Expand All @@ -1353,7 +1353,7 @@ export default (strings) => {
center: true,
displayName: (
<div style={{ display: 'inline-flex', verticalAlign: 'middle' }}>
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/items/ward_sentry_lg.png`} alt="" />
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/items/ward_sentry.png`} alt="" />
&nbsp;{strings.th_purchase_shorthand}
</div>
),
Expand All @@ -1368,7 +1368,7 @@ export default (strings) => {
center: true,
displayName: (
<div style={{ display: 'inline-flex', verticalAlign: 'middle' }}>
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/items/dust_lg.png`} alt="" />
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/items/dust.png`} alt="" />
&nbsp;{strings.th_purchase_shorthand}
</div>
),
Expand All @@ -1383,7 +1383,7 @@ export default (strings) => {
center: true,
displayName: (
<div style={{ display: 'inline-flex', verticalAlign: 'middle' }}>
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/items/smoke_of_deceit_lg.png`} alt="" />
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/items/smoke_of_deceit.png`} alt="" />
&nbsp;{strings.th_purchase_shorthand}
</div>
),
Expand All @@ -1398,7 +1398,7 @@ export default (strings) => {
center: true,
displayName: (
<div style={{ display: 'inline-flex', verticalAlign: 'middle' }}>
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/items/gem_lg.png`} alt="" />
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/items/gem.png`} alt="" />
&nbsp;{strings.th_purchase_shorthand}
</div>
),
Expand All @@ -1416,7 +1416,7 @@ export default (strings) => {
center: true,
displayName: (
<div style={{ display: 'inline-flex', verticalAlign: 'middle' }}>
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/items/ward_observer_lg.png`} alt="" />
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/items/ward_observer.png`} alt="" />
&nbsp;{visionStrings.th_use_shorthand}
</div>
),
Expand All @@ -1432,7 +1432,7 @@ export default (strings) => {
center: true,
displayName: (
<div style={{ display: 'inline-flex', verticalAlign: 'middle' }}>
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/items/ward_sentry_lg.png`} alt="" />
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/items/ward_sentry.png`} alt="" />
&nbsp;{visionStrings.th_use_shorthand}
</div>
),
Expand All @@ -1448,7 +1448,7 @@ export default (strings) => {
center: true,
displayName: (
<div style={{ display: 'inline-flex', verticalAlign: 'middle' }}>
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/items/dust_lg.png`} alt="" />
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/items/dust.png`} alt="" />
&nbsp;{visionStrings.th_use_shorthand}
</div>
),
Expand All @@ -1463,7 +1463,7 @@ export default (strings) => {
center: true,
displayName: (
<div style={{ display: 'inline-flex', verticalAlign: 'middle' }}>
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/items/smoke_of_deceit_lg.png`} alt="" />
<img height="15" src={`${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/items/smoke_of_deceit.png`} alt="" />
&nbsp;{visionStrings.th_use_shorthand}
</div>
),
Expand Down
4 changes: 2 additions & 2 deletions src/components/Visualizations/inflictorWithValue.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,14 @@ class InflictorWithValue extends React.Component {
} else if (neutralAbility) {
image = neutralAbility.img;
} else {
image = `${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/abilities/${resolvedInflictor}_sm.png`;
image = `${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/abilities/${resolvedInflictor}.png`;
}
tooltip = <AbilityTooltip ability={ability} inflictor={resolvedInflictor} />;
} else if (item) {
if (customImageIcon.includes(resolvedInflictor)) {
image = `/assets/images/dota2/${resolvedInflictor}.png`;
} else {
image = `${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/items/${getInflictorImage(resolvedInflictor)}_lg.png`;
image = `${process.env.REACT_APP_IMAGE_CDN}/apps/dota2/images/dota_react/items/${getInflictorImage(resolvedInflictor)}.png`;
}
tooltip = <ItemTooltip item={item} inflictor={resolvedInflictor} />;
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/utility/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export const IMAGESIZE_ENUM = {
},

// if you ever wanna see what the above look like (change the suffix):
// https://api.opendota.com/apps/dota2/images/heroes/abaddon_full.png
// https://api.opendota.com/apps/dota2/images/dota_react/heroes/abaddon_full.png
};

const getTitle = (row, col, heroName) => {
Expand Down
Loading

0 comments on commit 048c444

Please sign in to comment.