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

UI enhance and dynamic pixel-rate #14

Merged
merged 6 commits into from
Dec 6, 2022
Merged

Conversation

xinze-zheng
Copy link
Contributor

@xinze-zheng xinze-zheng commented Dec 5, 2022

Overview

This PR enhances the frontend UI and exposes a route for pixel-rate change.
Acknowledgement to zoezheng126 with UX idea and help.
#11 #5

UI enhancement

  • Adding alert when secret is invalid, missing, or color is not selected.
  • Button will change and secret text field will be disabled when secret is accepted.
  • Alert can be closed or will automatically close in 1.2 seconds.
    1201670214933_ pic

Screen Shot 2022-12-04 at 10 36 17 pm

Screen Shot 2022-12-04 at 10 35 46 pm

Pixel_rate_change

  • Expose a route to change pixel rate as shown below.
  • Modify the update_pixel method that will return pixel_rate to PG everytime so that PG can be aware of pixel rate change. This feature might be implemented more decently with Socket.

POST /changePixelRate

This route is used to update the pixel rate.

Request Data: JSON containing the keys "new_rate" and "token".

Response Status Codes: If everything is okay and the pixel_rate is updated, 200 OK is returned. If the response has an invalid token (i.e. the PG isn't registered), 401 Unauthorized is returned. If there are missing attributes in the json file 400 Missing attributes is returned.

@wadefagen wadefagen merged commit d21d0b5 into illinois:main Dec 6, 2022
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.

3 participants