uprm-inso4117-2023-2024-s2 / semester-project-study-pet

semester-project-study-pet created by GitHub Classroom
1 stars 3 forks source link

Implement setting to change background #327

Closed diego-velez-upr closed 5 months ago

diego-velez-upr commented 5 months ago

Overview

This PR closes #146, which implements a background selection system via the settings page for the home page.

Implementation

Background Images from #138 were added inside assets/backgrounds.

SettingsManagement file was added under components in order to control everything pertaining to the database. The system uses constant strings that are saved into the database. Here we also see a callback system, where components that rely on the current background add their own callback in order for it to be called whenever the current background changes.

Settings page was changed to display three buttons, each representing a different background.

HomePage was slightly reworked in order to display the background image, this replaced the background gradient. The striped background card was also removed. In here there are two ways we get the currently selected background, first from the database whenever it is initially rendered, then from the callback triggered by SettingsManagement.

PinkSylvie commented 5 months ago

image image

I can see and try it out but once I select it it freezes and crashes. Could you also implement an extra button so that we don't loose the default color and have the option to have the default green as a background?