Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Selected Item Info for Commodities #273

Merged
merged 4 commits into from
Nov 18, 2024

Conversation

GODrums
Copy link
Collaborator

@GODrums GODrums commented Nov 17, 2024

Motivation

By now CSFloat support selling of many different item types. To reflect this in the inventory, we want to display the "List on CSFloat" or "Listed for $..."-buttons for all supported items.
Fixes #271.

Description

This PR reworks the selected_item_info-element according to the current selling capabilities on CSFloat:

  • Show "List on CSFloat"-button for Agents, Sticker, Pins, Patches and Cases
  • Change the link of the "List on CSFloat"-button to the actual selling page, i.e. https://csfloat.com/sell
  • Fixed a bug where the "Charm Detachment Pack" got classified as Charm
  • Support stall prices for Agents
    Screenshot 2024-11-17 235851

Implementation notes:

  • since we now support items without inspect links (i.e. cases), we now have to re-render the element for every newly selected item. I utilitzed the isLoading-variable for this purpose, but there might be a better approach?
  • I decided on using a white-list approach on support item types to stay compatible when new items are added

@GODrums GODrums added the bug label Nov 17, 2024
@GODrums GODrums self-assigned this Nov 17, 2024
Copy link
Member

@Step7750 Step7750 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks @GODrums !

A couple small comments, but looks good 👍

src/lib/components/inventory/selected_item_info.ts Outdated Show resolved Hide resolved
src/lib/components/inventory/selected_item_info.ts Outdated Show resolved Hide resolved
src/lib/components/inventory/selected_item_info.ts Outdated Show resolved Hide resolved
src/lib/utils/skin.ts Outdated Show resolved Hide resolved
@GODrums GODrums merged commit 8519b08 into master Nov 18, 2024
2 checks passed
@GODrums GODrums deleted the fix/inventory-selected-commodity branch November 18, 2024 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Show Stall Prices If Non-Skin (ie. Commodity)
2 participants