RiiConnect24 / RiiTag

RiiTag is a customizable gamertag for the Wii.
https://tag.rc24.xyz/
GNU Affero General Public License v3.0
14 stars 7 forks source link

Gen2 Mii Support #37

Closed TheShadowEevee closed 3 years ago

TheShadowEevee commented 3 years ago

Implements feature requested in #36

Main Changes:

This PR adds a field in /edit allowing users to upload a QR Code for a Mii in the Gen2 (WiiU, 3DS, Miitomo) format. This is parsed in the edit.js file and sent to src/renderGen2Mii.js to be rendered and set as a Mii.

Minor Changes: (Not the main focus, but are still included)

  1. Adds .vs to .gitignore

Closing

This should implement the Gen2 Mii support requested in #36 by @larsenv. I spent way too long over complicating this, and then spent way too long trying to figure out why "fetch" wasn't working only to discover there was a custom function already in edit.js already called fetch (This has been renamed to httpFetch.)

TheShadowEevee commented 3 years ago

Conflicts have been resolved between my testing-36 branch and the master branch. This PR should be ready to be merged.

TheShadowEevee commented 3 years ago

I had to remove a space in app.js line 107 (See commit 69189f6) in order to prevent tripping the CodeQL test complaining about filesystem access without rate limiting; I'm not sure if that's intended but it should be no different from how it's always worked so I figure removing that space is fine for now.

There are no merge conflicts left, and all tests are passing.

TheShadowEevee commented 3 years ago

Fixed a bug related to CORS caused by requesting the rendering server as http instead of https

I hate this bug and everything about it.

TheShadowEevee commented 3 years ago

For a reason I cannot comprehend the remote studio.cgi api returns without a "Access-Control-Allow-Origin" header if it cannot parse the image file.

This only happens on a QR it cannot parse (or an image that isn't a QR at all), so technically things work mostly as intended; there's just a CORS policy error in the browsers console if a bad file is sent.