Skip to content

Conversation

@GODrums
Copy link
Collaborator

@GODrums GODrums commented Dec 13, 2024

Motivation

Closes #143.

Description

This PR adds the well-known enhancements from tradeoffer-popouts to the /tradeoffers-overview:

  • FetchSteamTrades-handler to fetch the data from the Steam API through the access token
  • trade_offers.ts page script:
    • Calculates and stores the api data in an accessible format in the DOM
    • Utilizes the localStorage as cache to avoid refetching from the API if there are no new trades since the last fetch
  • TradeOfferHolderMetadata Lit-component, which reads the required properties from the DOM
  • Removes the check regarding a CSFloat account for the "offer tracking on csfloat"-button. Since all Steam-API features rely on the same host permission, enabling the "offer tracking" is a mandatory pre-condition

Screenshots

Received tradeoffer example:
Screenshot 2024-12-13 211319
Sent tradeoffer example:
Screenshot 2024-12-13 211311

@GODrums GODrums requested a review from Step7750 December 13, 2024 20:27
@GODrums GODrums self-assigned this Dec 13, 2024
Step7750 added a commit that referenced this pull request Jan 7, 2025
Previously it included the sender in the ID, however it seems like devices such as Chrome have random properties in this for each run.

Now it only caches based on the request data, tested locally using PR #283
@GODrums GODrums requested a review from Step7750 January 8, 2025 23:37
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.

LGTM

@GODrums GODrums merged commit b651874 into master Jan 10, 2025
2 checks passed
@GODrums GODrums deleted the 143-metadata-trade-offers-pages branch January 10, 2025 15:30
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 Float Values on Trade Offers Page

3 participants