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

Make skin stealer consistent with Cape Stealer #204

Merged

Conversation

StillLutto
Copy link
Contributor

This Pull Request addresses #169, trying to make the skin-stealer consistent with cape-stealer.

Changes made:

  • Add a search button.
  • Say when an account is invalid.
  • Add a spinning loading wheel.
  • Remove the now unnecessary debounce.

Code Changes

  • Added a skinContainer variable that is bound to the skin viewer canvas.
  • Add loading variable and call it in the updateSkin when it's fetching the data.
  • Add a noAccountFound variable.
  • Add an if statement to load in something different whenever it's loading, no account has been found and whenever it's supposed to show the skin.
  • Hide sharable link when it's loading.
  • Add a loadSkinViewer function that loads the skinViewer, this is needed because when the if statement is false, aka. when it's loading or no account has been found, the canvas does not exist in the page. So even if it's bound to skinContainer, the skinViewer will need to be reinstantiated. Another solution to this problem would be to create a separate Skin component.
  • Remove the skinViewer instantiation in the onMount and instead call the loadSkinViewer function in the updateSkin function, this needs to happen 1 millisecond after the loading variable, otherwise it can't find the skinContainer canvas element.

When it's loading:
screencapture-localhost-5173-skin-stealer-2024-04-04-16_45_41 (1)
And when no account has been found:
screencapture-localhost-5173-skin-stealer-2024-04-04-16_57_43 (1)

Please let me know if you want anything changed.

@stephendotgg stephendotgg merged commit c5b1fd2 into flytegg:master Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants