Skip to content

Commit

Permalink
Merge pull request #10582 from DestinyItemManager/vendor-icon
Browse files Browse the repository at this point in the history
Clearer vendor item icon
  • Loading branch information
bhollis committed Jun 28, 2024
2 parents aa03ad7 + 1600585 commit d80e934
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 18 deletions.
4 changes: 2 additions & 2 deletions config/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@
"CompareBaseStats": "Show Base Stats",
"AssumeMasterworked": "Assume Masterworked",
"InitialItem": "This is the item the Compare tool was launched from",
"IsVendorItem": "This item is not owned. This is in a vendor's inventory and may be for sale.",
"SoldBy": "Sold by: {{vendorName}}",
"IsVendorItem": "This item is not in your inventory, but {{vendorName}} sells it.",
"Error": {
"Unmatched": "This item doesn't match the type of items being compared.",
"Invalid": "There are no valid items for comparison."
Expand Down Expand Up @@ -631,6 +630,7 @@
"ExcludedItems": "Excluded Items",
"Exotic": "Exotic Armor",
"MwExotic": "Exotic",
"ExcludeVendors": "Search \"-is:vendor\" to exclude vendor items from Loadout Optimizer.",
"ExistingLoadout": "Existing Loadout",
"ExoticSpecialCategory": "Special",
"Filter": "Settings",
Expand Down
8 changes: 1 addition & 7 deletions src/app/compare/CompareItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,7 @@ function VendorItemWarning({ item }: { item: DimItem }) {
tooltip={() => {
const vendorName =
replacer(defs.Vendor.get(item.vendor!.vendorHash)?.displayProperties?.name) || '--';
return (
<>
{t('Compare.IsVendorItem')}
<br />
{t('Compare.SoldBy', { vendorName })}
</>
);
return <>{t('Compare.IsVendorItem', { vendorName })}</>;
}}
>
<ActionButton onClick={noop} disabled>
Expand Down
2 changes: 1 addition & 1 deletion src/app/loadout/loadout-ui/Sockets.m.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
align-items: center;
justify-content: center;
> span {
color: lightgray;
color: var(--theme-accent-secondary);
font-size: calc(var(--item-icon-size) * 2 / 3);
}
}
8 changes: 3 additions & 5 deletions src/app/loadout/loadout-ui/Sockets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,15 @@ function Sockets({
function VendorItemPlug({ item }: { item: DimItem }) {
const defs = useD2Definitions()!;
const replacer = useDynamicStringReplacer(item.owner);
const vendorDef = defs.Vendor.get(item.vendor!.vendorHash);
return (
<PressTip
elementType="span"
tooltip={() => {
const vendorName =
replacer(defs.Vendor.get(item.vendor!.vendorHash)?.displayProperties?.name) || '--';
const vendorName = replacer(vendorDef?.displayProperties?.name) || '--';
return (
<>
{t('Compare.IsVendorItem')}
<br />
{t('Compare.SoldBy', { vendorName })}
{t('Compare.IsVendorItem', { vendorName })} {t('LoadoutBuilder.ExcludeVendors')}
</>
);
}}
Expand Down
6 changes: 3 additions & 3 deletions src/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,8 @@
"Unmatched": "This item doesn't match the type of items being compared."
},
"InitialItem": "This is the item the Compare tool was launched from",
"IsVendorItem": "This item is not owned. This is in a vendor's inventory and may be for sale.",
"NoModArmor": "Pre-mods",
"SoldBy": "Sold by: {{vendorName}}"
"IsVendorItem": "This item is not in your inventory, but {{vendorName}} sells it.",
"NoModArmor": "Pre-mods"
},
"Cooldown": {
"Grenade": "Grenade cooldown: {{cooldown}}",
Expand Down Expand Up @@ -664,6 +663,7 @@
"DisabledDueToMaintenance": "The Loadout Optimizer is currently disabled due to Bungie API maintenance.",
"EquipItems": "Equip",
"ExcludeItem": "Exclude Item",
"ExcludeVendors": "Search \"-is:vendor\" to exclude vendor items from Loadout Optimizer.",
"ExcludedItems": "Excluded Items",
"ExistingLoadout": "Existing Loadout",
"Exotic": "Exotic Armor",
Expand Down

0 comments on commit d80e934

Please sign in to comment.